These are chat archives for AvaloniaUI/Avalonia

14th
Nov 2015
Nikita Tsukanov
@kekekeks
Nov 14 2015 00:17
@EgorBo how to enable native resolution?
blob
I've got something on screen using libperspesk and sw rasterizer
Next step is to enable OpenGL
The good thing is that bindings can be completely unchanged
Egor Bogatov
@EgorBo
Nov 14 2015 09:40
@kekekeks what do you mean by native resolution?
Nikita Tsukanov
@kekekeks
Nov 14 2015 11:43
Disabled scaling
Wiesław Šoltés
@wieslawsoltes
Nov 14 2015 11:56
@grokys FindControl is not working for names in UserControl's. I can get control in Window, but not from UserControl
Nikita Tsukanov
@kekekeks
Nov 14 2015 12:02
Oh, threre is UIScreenMode
Nikita Tsukanov
@kekekeks
Nov 14 2015 12:28
Meh, whatever, I'll just use UIScreen::scale to get actual resolution in my rendering code
Nikita Tsukanov
@kekekeks
Nov 14 2015 13:25
Well, GL rendering works but is offset for some reason some reason
blob
Nikita Tsukanov
@kekekeks
Nov 14 2015 14:26
Mkay, now I somehow need to build all that for all platforms and strip unneded data so resulting package won't weight 600MB
Egor Bogatov
@EgorBo
Nov 14 2015 14:42
how many platform*archs do you want to build it for? :)
only Android has 7 abis according to http://developer.android.com/intl/ru/ndk/guides/abis.html
  • 3 (4?) ios, + 2 windows + 2 mac os
Nikita Tsukanov
@kekekeks
Nov 14 2015 14:44
Well, for iOS I need arm, arm64 and i386
So it can be published in App Store and run on simulator
Egor Bogatov
@EgorBo
Nov 14 2015 14:45
you mean armv7 ?
Nikita Tsukanov
@kekekeks
Nov 14 2015 14:45
Likely
Egor Bogatov
@EgorBo
Nov 14 2015 14:45
there is an armv7s ;)
Nikita Tsukanov
@kekekeks
Nov 14 2015 14:45
There is "default architectures" option in xcode
Well, armv7 code can run on armv7s
Egor Bogatov
@EgorBo
Nov 14 2015 14:46
yeah, I know
Nikita Tsukanov
@kekekeks
Nov 14 2015 14:46
For android I'm currently building for armv7 and x86
Egor Bogatov
@EgorBo
Nov 14 2015 14:46
you mean armeabi-v7a?
you said you want to support old shit like 2.3 ;) so you'll have to build for armeabi too
Nikita Tsukanov
@kekekeks
Nov 14 2015 14:47
Yep, sure
Once we get linux build CI up and running
For now I'm building everything manually
Egor Bogatov
@EgorBo
Nov 14 2015 14:49
it takes 40 minutes for my native code to compile for all those basic archs :(
Nikita Tsukanov
@kekekeks
Nov 14 2015 14:51
Well, we don't need to rebuild the whole skia
We will likely stick to some specific version
Darnell Williams
@Seeker1437
Nov 14 2015 16:57
@kekekeks PCL does not have RandomNumberGenerator.... do you know of any ways around this?
Not even bouncycastle stuff has it D:
Egor Bogatov
@EgorBo
Nov 14 2015 18:24
perspex uses some security related stuff?
Nikita Tsukanov
@kekekeks
Nov 14 2015 18:38
@grokys
How about to move to Packet
We had some issues with nuget in the past
Darnell Williams
@Seeker1437
Nov 14 2015 19:37
Its doesnt but I needed to be able to use it with an app I am writing for my Perspex application
Nikita Tsukanov
@kekekeks
Nov 14 2015 19:38
Meh, PCLs are useless for actual apps
use shared projects
You'll have full access to target framework and the power of #ifdef
Darnell Williams
@Seeker1437
Nov 14 2015 19:40
Okay
Nikita Tsukanov
@kekekeks
Nov 14 2015 20:45
Wow
Stripping object files reduced per-arch size to 15M
not sure if it will still compile after that through
Nikita Tsukanov
@kekekeks
Nov 14 2015 21:48
$ ls -la build/libperspesk_standalone.a
-rw-r--r-- 1 keks staff 38847088 15 ноя 00:48 build/libperspesk_standalone.a
39MB should be acceptable
Egor Bogatov
@EgorBo
Nov 14 2015 21:51
is it "fat"?
Nikita Tsukanov
@kekekeks
Nov 14 2015 21:51
$ lipo -info build/libperspesk_standalone.a 
Architectures in the fat file: build/libperspesk_standalone.a are: armv7 i386 x86_64 arm64
I've manually repacked only needed object files
Nikita Tsukanov
@kekekeks
Nov 14 2015 22:47
@EgorBo It seems that Xamarin.IOS can't reference our PCL
Egor Bogatov
@EgorBo
Nov 14 2015 22:47
which profile do you use?
Nikita Tsukanov
@kekekeks
Nov 14 2015 22:47
Profile7
Egor Bogatov
@EgorBo
Nov 14 2015 22:47
me either
Nikita Tsukanov
@kekekeks
Nov 14 2015 22:47
Xamarin.Android worked fine
Egor Bogatov
@EgorBo
Nov 14 2015 22:48
works for me :worried: I mean profile7 + xamarin.ios
Nikita Tsukanov
@kekekeks
Nov 14 2015 22:48
1>C:\Users\keks\Projects\GitHub\Perspex\src\Skia\Perspex.Skia\BitmapImpl.cs(11,11,11,21): error CS0012: The type 'IDisposable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
1>C:\Users\keks\Projects\GitHub\Perspex\src\Skia\Perspex.Skia\DrawingContextImpl.cs(9,18,9,36): error CS0012: The type 'IDisposable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
1>C:\Users\keks\Projects\GitHub\Perspex\src\Skia\Perspex.Skia\NativeBrush.cs(70,16,70,28): error CS0208: Cannot take the address of, get the size of, or declare a pointer to a managed type ('NativeBrush')
1>C:\Users\keks\Projects\GitHub\Perspex\src\Skia\Perspex.Skia\SkiaPoint.cs(27,41,27,50): error CS0012: The type 'ValueType' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
1>C:\Users\keks\Projects\GitHub\Perspex\src\Skia\Perspex.Skia\StreamGeometryImpl.cs(66,15,66,28): error CS0012: The type 'IDisposable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
1>C:\Users\keks\Projects\GitHub\Perspex\src\Skia\Perspex.Skia\FormattedTextImpl.cs(10,18,10,35): error CS0012: The type 'IDisposable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
1>C:\Users\keks\Projects\GitHub\Perspex\src\Skia\Perspex.Skia\PlatformRenderInterface.cs(12,44,12,68): error CS0012: The type 'Stream' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.IO, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
1>C:\Users\keks\Projects\GitHub\Perspex\src\Skia\Perspex.Skia\RenderTarget.cs(11,11,11,23): error CS0012: The type 'IDisposable' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
1>C:\Users\keks\Projects\GitHub\Perspex\src\Skia\Perspex.Skia\FormattedTextImpl.cs(10,59,10,77): error CS0012: The type 'IEnumerable<>' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
Egor Bogatov
@EgorBo
Nov 14 2015 22:49
can you paste version of XS you use?
I am currently on the latest alpha channel one
but it worked for stable too
Nikita Tsukanov
@kekekeks
Nov 14 2015 22:49
I've downloaded stable update from Nov11
    <TargetFrameworkProfile>Profile7</TargetFrameworkProfile>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
That's what our PCLs use
Egor Bogatov
@EgorBo
Nov 14 2015 22:51
and at the end of the file there is a targets node
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\Portable\$(TargetFrameworkVersion)\Microsoft.Portable.CSharp.targets" />
this?
Nikita Tsukanov
@kekekeks
Nov 14 2015 22:52
yep
The weird thing is that Xamarin.Android works fine
It also gives me weird errors:
13>C:\Users\keks\Projects\GitHub\Perspex\src\Skia\Perspex.Skia\NativeBrush.cs(70,16,70,28): error CS0208: Cannot take the address of, get the size of, or declare a pointer to a managed type ('NativeBrush')
NativeBrush is a struct with [StructLayout(LayoutKind.Sequential)]
Wiesław Šoltés
@wieslawsoltes
Nov 14 2015 22:55
Did you try to add <Reference Include="System.Runtime" /> to Perspex.Skia project
Nikita Tsukanov
@kekekeks
Nov 14 2015 22:55
Compiler entered herpderp mode
@wieslawsoltes doesn't work
Egor Bogatov
@EgorBo
Nov 14 2015 22:56
looks exactly the same as mine. I didn't use any <Reference/> too. Let me check one more thing
Wiesław Šoltés
@wieslawsoltes
Nov 14 2015 22:57
I get this kind of error on old msbuild tools version 4.0
Nikita Tsukanov
@kekekeks
Nov 14 2015 22:57
Well, try to download Perspex solution and create iOS Binding Library. Then include Skia and Renderhelpers shared projets
Egor Bogatov
@EgorBo
Nov 14 2015 22:59
wow, a lot of projects :)
it stucked on restoring packages. I suspect it mines bitcoins
Nikita Tsukanov
@kekekeks
Nov 14 2015 23:01
It downloads SharpDX
Which is essentially the same thing
Egor Bogatov
@EgorBo
Nov 14 2015 23:01
:)
I've created ios binding project. I should only add Perspex.Skia and Renderhelpers as refs?
Nikita Tsukanov
@kekekeks
Nov 14 2015 23:05
Also almost every PCL lib
See Perspex.Skia.Android
Wow
Egor Bogatov
@EgorBo
Nov 14 2015 23:07
0 errors
Nikita Tsukanov
@kekekeks
Nov 14 2015 23:07
It now fails with Xamarin.Android
It seems that Nov11 update has broken things
Egor Bogatov
@EgorBo
Nov 14 2015 23:07
but I had to comment public static readonly MethodTable Instance = null;//new MethodTableImpl(); in MethodTable
Nikita Tsukanov
@kekekeks
Nov 14 2015 23:08
How to update Xamarin to latest alpha?
Egor Bogatov
@EgorBo
Nov 14 2015 23:08
Android.Skia doesn't compile. it says /Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets: Error: Error executing task CreateNativeLibraryArchive: ../native/Android/arm_v7/libperspesk.so does not exist (Perspex.Skia.Android)
um... in XS ?
Nikita Tsukanov
@kekekeks
Nov 14 2015 23:09
Yep, you need to run getnative.ps1 in src/Skia

um... in XS

I'm using Visual studio, you know

Egor Bogatov
@EgorBo
Nov 14 2015 23:10
oh. I tested everything in XS (but I also prefer VS)
Nikita Tsukanov
@kekekeks
Nov 14 2015 23:10
Mkay, let me try in XS
Nikita Tsukanov
@kekekeks
Nov 14 2015 23:11
tnx
XS fails to compile C#6 for some reason
WTF
Egor Bogatov
@EgorBo
Nov 14 2015 23:13
I meant XS under Mac OS ;)
Nikita Tsukanov
@kekekeks
Nov 14 2015 23:14
I'm running MacOS in KVM
It's not that fast to run XS there
BTW I noticed that XCode's build/deploy was lightning-fast
Egor Bogatov
@EgorBo
Nov 14 2015 23:15
but that one will work well with C#6
Nikita Tsukanov
@kekekeks
Nov 14 2015 23:15
Can't say the same about Xamarin
Egor Bogatov
@EgorBo
Nov 14 2015 23:17
for my project XCode rebuilds everything on each change in SDL (I know I probably can tune it with pch,etc) but it's annoying. It takes ages to test
ps: I used to work with mac os under vmware, it wasn't that bad
however seems it's not possible in any VM to use host's GPU for mac os
Nikita Tsukanov
@kekekeks
Nov 14 2015 23:20
Well, if you have a desktop PC with two video cards you can use PCI passthrough
Egor Bogatov
@EgorBo
Nov 14 2015 23:21
if you have money for two video cards you can probably afford a mac mini at least :)
Nikita Tsukanov
@kekekeks
Nov 14 2015 23:22
Well, the is a mac mini in another room here, but I can't stand apple keyboards
Egor Bogatov
@EgorBo
Nov 14 2015 23:22
I work with my mac via team viewer :)
Nikita Tsukanov
@kekekeks
Nov 14 2015 23:22
That's not a portable solution
Why does it need to connect to mac host while building a class library?
Egor Bogatov
@EgorBo
Nov 14 2015 23:30
I've no idea :(
Nikita Tsukanov
@kekekeks
Nov 14 2015 23:34
========== Build: 1 succeeded, 0 failed, 12 up-to-date, 0 skipped ==========
Updating to alpha channed did the trick
Is there some direct link to alpha xamarin installer?
Because updater seems to be frozen
Egor Bogatov
@EgorBo
Nov 14 2015 23:36
I don't think so, but I might be wrong
Nikita Tsukanov
@kekekeks
Nov 14 2015 23:38
Updater is weird . Every click is followed by rainbow mouse cursor that lasts for 30 sec or something
And i can't switch channel
Oh, it started downloading something
It's probably some GTK# issue since I see the same issue with our test app
that worked fine before mono update
Egor Bogatov
@EgorBo
Nov 14 2015 23:42
XS utilizes it's own Mono btw
*installs
but you can point it to the one you installed manually
Nikita Tsukanov
@kekekeks
Nov 14 2015 23:57
@EgorBo how to use CFBridgingRetain from xamarin?