OFGB
OFGB copied to clipboard
Avalonia version
Just a POC. It support AOT by default. And try to match WPF version look and feel.
The only issue is the two native lib libHarfBuzzSharp.dll
and libSkiaSharp.dll
not bundled. It should be possible to static link them with the help of this issue. But it's too much for this poc.
The PR contains 2 commit to ease review with renamed files.
I will be totally fine if you don't accept this pull request.
I don't recommend introducing the additional dependency / complexity here.
@riverar What do you mean by "additional dependency / complexity" ? Can you elaborate and explain why?
Since the idea of the project was simplicity and this adds more to maintain, also I am not familiar with Avalonia. Because of that I don't intend on accepting this re-write.
So the new size would be 25mb instead of the current 166kb? I was going to check out Avalonia one day but you have successfully discouraged me from doing so.
@terax6669, 166kb means you have to download the dotnet desktop runtime. For net8 the installer is 55MB.
@xM4ddy I think this should be revisited/reconsidered. Avalonia is a big project, supported by both MS and a huge part of the C#/.NET community. I'm also of the opinion that 170MB for the self-contained release is a bit too much. (Siding with #6 here)
If Avalonia is not an option to consider, I would rather work on developing this as a C++ desktop app. It will be much much lighter, and everyone will be able to run it OOTB without installing .NET runtimes or wasting bandwidth.
Just a POC. It support AOT by default. And try to match WPF version look and feel.
The only issue is the two native lib
libHarfBuzzSharp.dll
andlibSkiaSharp.dll
not bundled. It should be possible to static link them with the help of this issue. But it's too much for this poc.The PR contains 2 commit to ease review with renamed files.
I will be totally fine if you don't accept this pull request.
Hey could I get some more info about this? What’s the benefits, drawbacks, startup time, additional or reduced complexity, file size etc? I’m interested in the idea but I’m unfamiliar with it though from everything I’ve read it doesn’t seem like too too big a leap. Thanks!
@xM4ddy You most likely won't notice any performance benefits or drawbacks porting to Avalonia due to the app being one-screen. The render time is basically the same (due to there only being one screen with some labels).
When it comes to the basics of UI, WPF and Avalonia offer a 90% similar interface. Most of the differences you would notice with Avalonia won't be here (datagrids and stuff like that).
@latop2604 We can include native libraries only if we do single-file publishing. I've tested and it ends up at about 55.7 MB. AOT ends up at 34.1 MB but produces 3 external dlls. If we can get static linking sorted, that would be really neat :)
Avalonia framework does not add complexity. At least if you don't go too deep. It simplify some part like css like style selector. The datagrid exists too in Avalonia but in a dedicated nuget package. An extension exists for Rider, VS and VS code to have xaml preview.
Avalonia provide light and dark them by default (as why I removed the dark.xaml
file)
The main benefit is the crossplat support, but for this project it's useless. The second benefit is the trim and aot support. The bigger the app is, the bigger the startup time reduction is. As OFGB is pretty small, the startup improvement is barely noticeable.
The negative point is about the native dependencies. When publishing the app it produce 3 dll. av_libglesv2.dll
is not used and can be removed.
It is possible to get ride of the last two dll, as described in this issue, but it will increase a lot the project complexity.