Skip to content

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

Windows: the link probe crashed with NameError instead of probing

LNPANDY2240e23bbd38
diff --git a/frontend-qt/nspb_qt/win/toolchain.py b/frontend-qt/nspb_qt/win/toolchain.py
index e54f4030..ae64595b 100644
--- a/frontend-qt/nspb_qt/win/toolchain.py
+++ b/frontend-qt/nspb_qt/win/toolchain.py
@@ -947,7 +947,8 @@ def probe_link(sdk: Path) -> tuple[bool, str]:
cmd = [str(clang), '-target', f'arm64-apple-ios{IOS_DEPLOYMENT}', '-isysroot', str(sdk),
'-fuse-ld=lld', f'--ld-path={lld}', '-o', str(out), str(c)]
try:
- r = subprocess.run(cmd, capture_output=True, text=True, timeout=180, env=env,
+ r = subprocess.run(cmd, capture_output=True, text=True, timeout=180,
+ env=dict(os.environ), # a child on Windows needs the full env (SystemRoot etc.)
**no_window())
except subprocess.TimeoutExpired:
return False, 'link timed out'