Skip to content

Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.

Windows: x86-64 host only, no ARM64 toolchain

LNPANDY5252288b0c6a
diff --git a/frontend-qt/nspb_qt/localization.py b/frontend-qt/nspb_qt/localization.py
index 974b5f6c..88e4f77a 100644
--- a/frontend-qt/nspb_qt/localization.py
+++ b/frontend-qt/nspb_qt/localization.py
@@ -82,6 +82,8 @@ TABLE: dict[str, tuple[str, str]] = {
'dep.llvm.hint': ('Windows 上编译 iOS 二进制用(app 内自动下载)', 'builds the iOS binary on Windows (downloaded in-app)'),
'dep.llvm.downloading': ('正在下载 LLVM-MinGW…(约 250 MB)', 'Downloading LLVM-MinGW… (about 250 MB)'),
'dep.llvm.done': ('LLVM-MinGW 已安装:%@', 'LLVM-MinGW installed: %@'),
+ 'dep.hostArch': ('运行架构', 'host architecture'),
+ 'dep.hostArch.hint': ('Windows on ARM 会用 x86-64 工具链模拟运行(较慢但可用)', 'Windows on ARM runs the x86-64 tools emulated (slower, works)'),
'dep.lld': ('Mach-O 链接器(ld64.lld)', 'Mach-O linker (ld64.lld)'),
'dep.lld.hint': ('随 LLVM-MinGW 提供', 'comes with LLVM-MinGW'),
'dep.iossdk.downloading': ('正在下载 iPhoneOS SDK…(约 100 MB)', 'Downloading the iPhoneOS SDK… (about 100 MB)'),
diff --git a/frontend-qt/nspb_qt/model.py b/frontend-qt/nspb_qt/model.py
index 0b7da1fa..41da77db 100644
--- a/frontend-qt/nspb_qt/model.py
+++ b/frontend-qt/nspb_qt/model.py
@@ -285,6 +285,10 @@ class Model(QObject):
d.state = DepState.OK if p.ok else DepState.OK
d.detail = p.path if p.ok else self.t('dep.optionalMissing')
out.append(d)
+ # Windows-on-ARM gets a visible note: the tools are x86-64 and run emulated.
+ if note := wtc.host_arch_note():
+ out.append(Dep('host_arch', 'dep.hostArch', 'dep.hostArch.hint',
+ DepState.OK, note))
return out
diff --git a/frontend-qt/nspb_qt/win/fetch.py b/frontend-qt/nspb_qt/win/fetch.py
index 2610458c..fcf46e60 100644
--- a/frontend-qt/nspb_qt/win/fetch.py
+++ b/frontend-qt/nspb_qt/win/fetch.py
@@ -251,9 +251,8 @@ def install_git(arch: str | None = None, dest: Path | None = None,
def _arch_key() -> str:
- import platform
- m = platform.machine().lower()
- return 'ARM64' if m in ('arm64', 'aarch64') else 'AMD64'
+ """Always AMD64: this app publishes only the x86-64 host tools (see toolchain._arch)."""
+ return 'AMD64'
def _download_unverified(url: str, dest: Path, log: Callable[[str], None],
diff --git a/frontend-qt/nspb_qt/win/toolchain.py b/frontend-qt/nspb_qt/win/toolchain.py
index 4add7686..28b8e67a 100644
--- a/frontend-qt/nspb_qt/win/toolchain.py
+++ b/frontend-qt/nspb_qt/win/toolchain.py
@@ -42,8 +42,9 @@ ENV_METAL = 'NSPB_METAL_DIR'
# ---------------------------------------------------------------- pinned versions
-#: LLVM-MinGW release the port was validated with (LLVM 23.1.4). Two architectures, because a
-#: player may run either Windows build; the ARM64 one matters for Windows-on-ARM.
+#: LLVM-MinGW release the port was validated with (LLVM 23.1.4). x86-64 only: Windows-on-ARM
+#: devices are rare enough that a second 186 MB download (and the packaging that goes with it)
+#: is not worth carrying. The target is iOS arm64 either way — this is the host architecture.
LLVM_MINGW_VERSION = '20261020'
LLVM_MINGW_LLVM = '23.1.4'
LLVM_MINGW_ASSETS = {
@@ -52,11 +53,6 @@ LLVM_MINGW_ASSETS = {
'sha256': 'fd5462b7f5d93b2ff981fcd3f9c7e427e47f3203c64ea91c27bcc444eebd74cd',
'size': 190612575,
},
- 'ARM64': {
- 'name': f'llvm-mingw-{LLVM_MINGW_VERSION}-ucrt-aarch64.zip',
- 'sha256': '8f24fedd0b75c674c6c83dec2d76a7ac31a690120212843a17e465ef49854f69',
- 'size': 185737889,
- },
}
LLVM_MINGW_RELEASE_URL = ('https://github.com/mstorsjo/llvm-mingw/releases/download/'
+ LLVM_MINGW_VERSION)
@@ -73,11 +69,6 @@ GIT_ASSETS = {
'sha256': 'b1f3e52216e2ed6882d1bebfd4d3fdf319bec40d2edbbf9fd26ec4fd3fce7ed1',
'size': 57200000,
},
- 'ARM64': {
- 'name': f'PortableGit-{GIT_VERSION}-arm64.7z.exe',
- 'sha256': '044110f9d951858452ddb5e4b5415ea0f2b5b2598e794d6fec77fe28b9aa8cc0',
- 'size': 57100000,
- },
}
# The tag is v<version>.windows.<n>, and GIT_VERSION already carries the patch number after the
# last dot, so the tag is v2.56.0.windows.4 for GIT_VERSION 2.56.0.4 — spelled out here because
@@ -790,8 +781,20 @@ def missing_required(probes: list[Probe]) -> list[Probe]:
def _arch() -> str:
- """Which llvm-mingw archive this machine needs."""
- return 'ARM64' if os.environ.get('PROCESSOR_ARCHITECTURE', '').upper() in ('ARM64', 'AARCH64') else 'AMD64'
+ """The llvm-mingw archive to use. Only x86-64 is published by this app.
+
+ A Windows-on-ARM machine runs the x86-64 tools under emulation, which works but is slower;
+ there is no ARM64 archive here on purpose (the device population is too small to justify a
+ second 186 MB download). host_arch_note() says so in the dependency panel.
+ """
+ return 'AMD64'
+
+
+def host_arch_note() -> str | None:
+ """A line to show when the host is ARM64 and will run the x86-64 tools emulated."""
+ if os.environ.get('PROCESSOR_ARCHITECTURE', '').upper() in ('ARM64', 'AARCH64'):
+ return 'Windows on ARM: running the x86-64 toolchain under emulation (slower, works)'
+ return None
def download_asset(arch: str | None = None) -> dict:
diff --git a/frontend/Sources/NSPortBuilder/Localization.swift b/frontend/Sources/NSPortBuilder/Localization.swift
index ed125afb..3a836026 100644
--- a/frontend/Sources/NSPortBuilder/Localization.swift
+++ b/frontend/Sources/NSPortBuilder/Localization.swift
@@ -136,6 +136,9 @@ enum L10n {
"builds the iOS binary on Windows (downloaded in-app)"),
"dep.llvm.downloading": ("正在下载 LLVM-MinGW…(约 250 MB)", "Downloading LLVM-MinGW… (about 250 MB)"),
"dep.llvm.done": ("LLVM-MinGW 已安装:%@", "LLVM-MinGW installed: %@"),
+ "dep.hostArch": ("运行架构", "host architecture"),
+ "dep.hostArch.hint": ("Windows on ARM 会用 x86-64 工具链模拟运行(较慢但可用)",
+ "Windows on ARM runs the x86-64 tools emulated (slower, works)"),
"dep.lld": ("Mach-O 链接器(ld64.lld)", "Mach-O linker (ld64.lld)"),
"dep.lld.hint": ("随 LLVM-MinGW 提供", "comes with LLVM-MinGW"),
"dep.iossdk.downloading": ("正在下载 iPhoneOS SDK…(约 100 MB)",