Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0affcf6
Allow running on Windows ARM64
abdnh Apr 10, 2026
dc9b616
Fix VS packaging root for ARM
abdnh Apr 10, 2026
9a0e635
Pass platform to MSBuild
abdnh Apr 10, 2026
86bd5da
Construct correct stub binary filename for ARM
abdnh Apr 10, 2026
2c04b80
Refactor platform checks
abdnh Apr 13, 2026
aa32d1c
Add changes note
abdnh Apr 13, 2026
2b9ca76
Add windows-11-arm runner
abdnh Apr 13, 2026
aece505
Add suffix for amd64
abdnh Apr 13, 2026
209724f
Update tests
abdnh Apr 13, 2026
873f553
Replace hardcoded amd64 suffix in tests
abdnh Apr 13, 2026
c25b340
Update platform support tables
abdnh Apr 13, 2026
5adf8a4
Rename to vscode_platform and make a property
abdnh Apr 14, 2026
1f923fb
Convert packaging_root to a property
abdnh Apr 14, 2026
c91b437
Refuse to run with a x86_64 interpreter
abdnh Apr 14, 2026
a2fae66
Fix non-Windows coverage
abdnh Apr 14, 2026
9a81caa
Add missing space
abdnh Apr 16, 2026
bd2e6a9
Update release note
abdnh Apr 16, 2026
c660799
Detect ARM64 on older Python versions
abdnh Apr 16, 2026
db4b58f
Merge remote-tracking branch 'origin' into windows-arm
abdnh Apr 16, 2026
9eceb52
Add a test
abdnh Apr 16, 2026
f435a2d
Update Visual Studio docs
abdnh Apr 16, 2026
a483bcb
Add additional test for more coverage
abdnh Apr 16, 2026
05b5ce2
Fix spelling lint
abdnh Apr 16, 2026
371794a
Add a test for Python 3.12+
abdnh Apr 16, 2026
9149fdd
Update message about required VSCode components
abdnh Apr 17, 2026
54db50d
Tweak stub binary name
abdnh Apr 21, 2026
fba519f
Skip Toga/Pygame on Windows ARM runner
abdnh Apr 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ jobs:
fail-fast: false
matrix:
framework: [ "toga", "pyside6", "pygame", "console" ]
runner-os: [ "macos-15-intel", "macos-latest", "ubuntu-24.04", "ubuntu-24.04-arm", "windows-latest" ]
runner-os: [ "macos-15-intel", "macos-latest", "ubuntu-24.04", "ubuntu-24.04-arm", "windows-latest", "windows-11-arm"]

verify-apps:
name: Build app
Expand All @@ -250,4 +250,4 @@ jobs:
fail-fast: false
matrix:
framework: [ "toga", "pyside6", "pygame", "console" ]
runner-os: [ "macos-15-intel", "macos-15", "ubuntu-24.04", "ubuntu-24.04-arm", "windows-latest" ]
runner-os: [ "macos-15-intel", "macos-15", "ubuntu-24.04", "ubuntu-24.04-arm", "windows-latest", "windows-11-arm" ]
Comment thread
abdnh marked this conversation as resolved.
1 change: 1 addition & 0 deletions changes/1887.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Windows on ARM64 is now supported.
Comment thread
abdnh marked this conversation as resolved.
Outdated
4 changes: 2 additions & 2 deletions docs/en/reference/platforms/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@
<td></td>
<td></td>
<td colspan="2">{{ ci_tested }}</td>
<td colspan="2"></td>
<td colspan="2">{{ ci_tested }}</td>
<td></td>
<td></td>
<td></td>
Expand All @@ -165,7 +165,7 @@
<td></td>
<td></td>
<td colspan="2">{{ ci_tested }}</td>
<td colspan="2"></td>
<td colspan="2">{{ ci_tested }}</td>
<td></td>
<td></td>
<td></td>
Expand Down
2 changes: 1 addition & 1 deletion docs/en/reference/platforms/windows/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
<td></td>
<td></td>
<td colspan="2">{{ ci_tested }}</td>
<td colspan="2"></td>
<td colspan="2">{{ ci_tested }}</td>
<td></td>
<td></td>
<td></td>
Expand Down
10 changes: 9 additions & 1 deletion src/briefcase/commands/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,15 @@ def support_package_url(self, support_revision: str) -> str:
def stub_binary_filename(self, support_revision: str, is_console_app: bool) -> str:
"""The filename for the stub binary."""
stub_type = "Console" if is_console_app else "GUI"
return f"{stub_type}-Stub-{self.python_version_tag}-b{support_revision}.zip"
win_suffix = (
f"-{self.tools.host_arch.lower()}"
if self.tools.host_os == "Windows"
else ""
)
return (
f"{stub_type}-Stub-{self.python_version_tag}-b{support_revision}"
f"{win_suffix}.zip"
Comment thread
abdnh marked this conversation as resolved.
Outdated
)

def stub_binary_url(self, support_revision: str, is_console_app: bool) -> str:
"""The URL of the stub binary to use for apps of this type."""
Expand Down
21 changes: 11 additions & 10 deletions src/briefcase/platforms/windows/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ def bundle_package_executable_path(self, app):
return f"{app.formal_name}.exe"

def bundle_package_path(self, app):
return self.bundle_path(app) / self.packaging_root
return self.bundle_path(app) / self.packaging_root()

def binary_path(self, app):
return self.package_path(app) / self.package_executable_path(app)
Expand All @@ -88,24 +88,24 @@ def distribution_path(self, app):
suffix = "zip" if app.packaging_format == "zip" else "msi"
return self.dist_path / f"{app.formal_name}-{app.version}.{suffix}"

def architecture(self):
Comment thread
freakboy3742 marked this conversation as resolved.
Outdated
return "ARM64" if self.tools.host_arch == "ARM64" else "x64"

def verify_host(self):
super().verify_host()
# The stub app only supports x86-64 right now, and our VisualStudio and WiX code
# is the same (#1887). However, we can package an external x86-64 app on any
# build machine.
if self.tools.host_arch != "AMD64":
if self.tools.host_arch not in ("AMD64", "ARM64"):
Comment thread
freakboy3742 marked this conversation as resolved.
if all(app.external_package_path for app in self.apps.values()):
if not self.is_clone:
self.console.warning(f"""
*************************************************************************
** WARNING: Possible architecture mismatch **
*************************************************************************

The build machine is {self.tools.host_arch}, but Briefcase on Windows currently only
supports x86-64 installers.
The build machine is {self.tools.host_arch}, but Briefcase on Windows only
supports x86-64 and ARM64 installers.

You are responsible for ensuring that the content of external_package_path
is compatible with x86-64.
is compatible with supported platforms.

*************************************************************************
""")
Expand All @@ -127,7 +127,8 @@ def verify_host(self):

class WindowsCreateCommand(CreateCommand):
def support_package_filename(self, support_revision):
return f"python-{self.python_version_tag}.{support_revision}-embed-amd64.zip"
arch = self.tools.host_arch.lower()
return f"python-{self.python_version_tag}.{support_revision}-embed-{arch}.zip"

def support_package_url(self, support_revision):
micro = re.match(r"\d+", str(support_revision)).group(0)
Expand Down Expand Up @@ -594,7 +595,7 @@ def _package_msi(self, app):
"-ext",
self.tools.wix.ext_path("UI"),
"-arch",
"x64", # Default is x86, regardless of the build machine.
self.architecture().lower(),
f"{app.app_name}.wxs",
"-loc",
"unicode.wxl",
Expand Down
4 changes: 3 additions & 1 deletion src/briefcase/platforms/windows/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@

class WindowsAppMixin(WindowsMixin):
output_format = "app"
packaging_root = Path("src")
supports_external_packaging = True

def packaging_root(self):
Comment thread
freakboy3742 marked this conversation as resolved.
return Path("src")

def project_path(self, app):
return self.bundle_path(app)

Expand Down
5 changes: 4 additions & 1 deletion src/briefcase/platforms/windows/visualstudio.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@

class WindowsVisualStudioMixin(WindowsMixin):
output_format = "VisualStudio"
packaging_root = Path("x64/Release")

def packaging_root(self):
return Path(f"{self.architecture()}/Release")

def project_path(self, app):
return self.bundle_path(app) / f"{app.formal_name}.sln"
Expand Down Expand Up @@ -65,6 +67,7 @@ def build_app(self, app: BaseConfig, **kwargs):
"-property:RestorePackagesConfig=true",
f"-target:{app.formal_name}",
"-property:Configuration=Release",
f"-property:Platform={self.architecture()}",
(
"-verbosity:detailed"
if self.console.is_deep_debug
Expand Down
8 changes: 4 additions & 4 deletions tests/platforms/windows/app/create/test_create.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ def test_unsupported_host_os(create_command, host_os):
create_command()


@pytest.mark.parametrize("host_arch", ["i686", "ARM64", "wonky"])
@pytest.mark.parametrize("host_arch", ["i686", "wonky"])
def test_unsupported_arch(create_command, host_arch, first_app_config):
"""Internal apps can only be developed on x86-64."""
"""Internal apps can only be developed on x86-64 and ARM64."""
create_command.tools.host_os = "Windows"
create_command.tools.host_arch = host_arch
create_command.apps["first"] = first_app_config
Expand All @@ -42,7 +42,7 @@ def test_unsupported_arch(create_command, host_arch, first_app_config):
create_command.verify_host()


@pytest.mark.parametrize("host_arch", ["i686", "ARM64", "wonky"])
@pytest.mark.parametrize("host_arch", ["i686", "wonky"])
def test_unsupported_arch_external(create_command, host_arch, first_app_config, capsys):
"""External apps can be built on a different architecture, with a warning."""
create_command.tools.host_os = "Windows"
Expand Down Expand Up @@ -162,7 +162,7 @@ def test_support_package_url(
expected_link = (
f"https://www.python.org/ftp/python"
f"/{sys.version_info.major}.{sys.version_info.minor}.{micro}"
f"/python-{sys.version_info.major}.{sys.version_info.minor}.{revision}-embed-amd64.zip"
f"/python-{sys.version_info.major}.{sys.version_info.minor}.{revision}-embed-{create_command.tools.host_arch.lower()}.zip"
)
assert create_command.support_package_url(revision) == expected_link

Expand Down
1 change: 1 addition & 0 deletions tests/platforms/windows/visualstudio/test_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ def test_build_app(build_command, first_app_config, tool_debug_mode, tmp_path):
"-property:RestorePackagesConfig=true",
"-target:First App",
"-property:Configuration=Release",
f"-property:Platform={build_command.architecture()}",
"-verbosity:detailed" if tool_debug_mode else "-verbosity:normal",
],
check=True,
Expand Down
Loading