Support Windows ARM64#2797
Conversation
|
(Windows tests failing because the stub binary URL has changed to include a platform suffix) |
freakboy3742
left a comment
There was a problem hiding this comment.
Broadly, this looks great - a couple of minor details flagged inline, mostly around naming (similar naming issues to the template), and property vs method use.
|
I've done some initial testing of this, in conjunction with the updated Visual Studio template. I got a VSStudio project to build, but I needed to:
Even with that, I get an error launching a Toga app because it can't load |
|
Regarding build tools, I've not updated the version because the GitHub runner still uses Visual Studio 2022. This will apparently change next month, but I'm not sure if the ARM runner will be updated at the same time: actions/partner-runner-images#150 |
Yes, looks like a Python.net issue. I had a look and was able to modify pythonnet/clr-loader to build ARM64 DLLs but the app then failed with this:
No luck figuring it out so far. Let me know if you think we should add an error if the Toga bootstrap is used for now. |
|
I've found the source of the problem; the issue is that .NET Framework 4.x doesn't provide ARM64 builds, even though it's installed by default on Windows on ARM machine. You have to use .NET Core 8 (or newer) on an ARM64 machine, or use an x86-64 interpreter running in emulation mode. See beeware/toga#2782 (comment) for details; I've just pushed beeware/toga#4331 that adds ARM64 support to Toga's Winforms backend. |
freakboy3742
left a comment
There was a problem hiding this comment.
Thanks for those updates. I've flagged some cosmetic details, plus one edge case with Python 3.10 and 3.11 that we'll need to handle.
We should also update the VSCode install instructions to remove the reference to VSCode 2022 (since 2026 is what you can download now), and include a reference to needing MSVS v143 VS 2022 C++ ARM64/x64 build tools.
The only other question left is exactly how to land the PR with the other dependencies. I've merged the Visual Studio template, but I can't automate tagging new binaries until we merge this PR; but this PR can't be merged until CI passes, and that won't happen until there's a Toga version that has ARM support. Obviously we'll need to test some pieces manually and add automated CI checks afterwards to break the stalemate; but I need to work out what sequence will be best for that.
freakboy3742
left a comment
There was a problem hiding this comment.
Thanks for those updates - two more small tweaks, and I think we're good to go.
freakboy3742
left a comment
There was a problem hiding this comment.
One last tweak to the archive name for the stub binary - this became apparent when I manually generated the stub binary so these tests would pass.
|
I've manually published stub binaries with the new names (using both your prefixing scheme, and the one that I've suggested inline), and re-run CI; and the ARM jobs are all passing, except for:
We can put those two on the skip list for now. |
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
Co-authored-by: Russell Keith-Magee <russell@keith-magee.com>
|
docs-lint apparently failed due to a temporary issue with an apple.com link. |
freakboy3742
left a comment
There was a problem hiding this comment.
I think we can call this done. I'm still working on Toga, and there's a couple of tweaks needed to the Visual Studio template before I can tag "official" binaries (including a minor walk-back of the stdout re-opening - see this pr for details) - but this does everything the Briefcase part needs to do. Thanks for the PR!
This adds support for Windows ARM64.
PR Checklist: