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.
| ): | ||
| raise UnsupportedHostError( | ||
| "The Python interpreter that is being used to run Briefcase has been " | ||
| "compiled for x86_64, and is running in emulation mode on ARM64" |
There was a problem hiding this comment.
| "compiled for x86_64, and is running in emulation mode on ARM64" | |
| "compiled for x86_64, and is running in emulation mode on ARM64 " |
| @@ -0,0 +1 @@ | |||
| Windows on ARM64 is now supported. | |||
There was a problem hiding this comment.
| Windows on ARM64 is now supported. | |
| Briefcase can now build Windows apps for ARM64 devices. |
| # build machine. | ||
| if self.tools.host_arch != "AMD64": | ||
| if ( | ||
| self.tools.host_arch == "ARM64" |
There was a problem hiding this comment.
There's an edge case here that I (re)-discovered in testing: if you're on Python 3.10 or 3.11, platform.machine() returns the architecture of the executing binary, not the underlying machine architecture.
Since host_arch underpins a lot of this logic (and host_arch is populated by platform.machine()), we will need to add some extra logic to "correct" host_arch on Py < 3.12 on Windows.
This adds support for Windows ARM64.
PR Checklist: