-
-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Avalonia to latest version, enable basic PublishAot scenario #782
Conversation
@@ -33,7 +33,7 @@ | |||
<ContentPresenter Name="watermark" | |||
Margin="40" | |||
HorizontalAlignment="Center" | |||
Content="{Binding WatermarkText}" | |||
Content="WatermarkText" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure what is this supposed to bind to. It's necessary to provide a proper context for the compiled bindings.
For reference, on macOS ARM64 this produces 30Mb self-contained executable and about 20Mb of native libraries:
|
@filipnavara this looks great. Now that Avalonia 11.1 is out, are you intending to come back to this? |
Sure, I can update it to 11.1. |
Enable PublishAot scenario
0f01c75
to
8eba952
Compare
This comment was marked as outdated.
This comment was marked as outdated.
I pushed a commit that fixed the arrows. 😉 |
I've been using this locally and it all seems good from my perspective 🙂 |
@KirillOsenkov would you be able to review when you get a chance, we can then follow up with some macOS packaging improvements following this guide |
Yes, I'll try to find time within the next couple of weeks, sorry I'm super busy as always. Do you think theoretically this PR is ready to go or does it need more work? Should we perhaps look at #645 as well and see what can be salvaged from it? I don't know what the state of these two PRs is. |
It is ready to go. The non-browser bits from #645 are salvaged here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I really appreciate the help!
Since this is now merged, could someone with a Mac try out the latest main, try out the instructions to build the Mac version, and see if it all works fine? Also our AppVeyor build is producing two zip files with Mac versions for x64 and arm64, do these need updated? Should we start publishing the AOT versions? Sorry I'm not a Mac expert and not sure what's best here. Every time I publish a release I've been also publishing these two Mac zips in each release. |
It should. I've been primarily testing it on macOS.
Ideally we should publish a single universal app. That's a bit tricky with Avalonia. Under normal circumstances you just target However, historically Avalonia doesn't depend on the macOS API bindings from Either way, to do proper macOS publishing one needs an Apple Developer account and appropriate certificates. Otherwise you cannot sign the app, and distributing unsigned / ad-hoc signed (ie. signed but without dev certificate) is quite pointless. Such apps cannot be run on modern macOS without resigning or system-wide integrity turned off. Neither of those options are practical. I do have templates to setup the Apple distribution with a valid developer account, but it still means going through the legalese of creating the account and paying 99 USD per year which may be hard pill to swallow. The alternative is offering source-only builds, or global .NET tool (which is ad-hoc signed on the target machine on installation). |
Small correction to the post above. There are apparently still free Apple Developer accounts. I was not sure if that was still the case, but it's still advertised on their web. |
I can confirm the latest AppVeyor zip worked for me with the instructions in the README |
The free apple developer account thing seems to be a sort of trial, rather than a free offering for open source projects. I'd be happy to cover the 99 USD per year, through GH sponsorship of whatever is most appropriate. |
ok let me do some research on the apple dev account... |
Unlike #645 this takes a very minimalistic approach to the Avalonia upgrade. It updates all code to compile and run but it doesn't add Browser support or any optimizations.
For the AOT part, .NET 8 TFM build is added to
StructuredLogger
with couple of annotations. Additionally, the TinyJSON parser is replaced with source generated System.Text.Json deserializer. I didn't update this for thenetstandard2.0
build since I don't want to add dependency on out-of-the-box package.