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 strings a CI build wipes are in the shared table now, and the linker is named directly

LNPANDY23e532a858ed
diff --git a/frontend-qt/nspb_qt/localization.py b/frontend-qt/nspb_qt/localization.py
index 56cbd82a..6f7266e1 100644
--- a/frontend-qt/nspb_qt/localization.py
+++ b/frontend-qt/nspb_qt/localization.py
@@ -34,6 +34,32 @@ TABLE: dict[str, tuple[str, str]] = {
'dev.team': ('签名团队', 'Signing team'),
'dev.noTeam': ('没有开发证书。在 Xcode 中登录 Apple ID(设置 → 账户)即可获得。', 'No development certificate. Sign in to Xcode with your Apple ID (Settings → Accounts) to get one.'),
'dev.note': ('Xcode 会为这台设备签名并直接安装,游戏数据(romfs.img)复制到 App 的“文稿”中,与侧载相同;第一次复制大型游戏需要几分钟。第一次需要在设备上开启开发者模式,并信任开发者(设置 → 通用 → VPN 与设备管理)。', 'Xcode signs the game for this device and installs it there, then copies the game data (romfs.img) into the app’s Documents, as for sideloading; the first copy of a large game takes a few minutes. The first time, turn on Developer Mode on the device and trust the developer (Settings → General → VPN & Device Management).'),
+ 'saves.menu': ('存档…', 'Saves…'),
+ 'saves.title': ('存档', 'Saves'),
+ 'saves.mac': ('这台 Mac', 'This Mac'),
+ 'saves.saved': ('保存于 %@', 'Saved %@'),
+ 'saves.none': ('还没有存档', 'No save yet'),
+ 'saves.reading': ('正在读取…', 'Reading…'),
+ 'saves.notInstalled': ('这个游戏没有从这里安装到 iPhone 或 iPad。在“构建”页面选择设备和签名团队安装后,就可以在这里复制存档。', 'This game was not installed on an iPhone or iPad from here. Install it from the Builds page (a device and a signing team), then its save can be copied here.'),
+ 'saves.unreachable': ('无法读取:%@', 'Cannot be read: %@'),
+ 'saves.newer': ('较新', 'Newer'),
+ 'saves.toDevice': ('Mac → %@', 'Mac → %@'),
+ 'saves.toMac': ('%@ → Mac', '%@ → Mac'),
+ 'saves.backups': ('显示备份', 'Show backups'),
+ 'saves.note': ('复制前请先在 Mac 和 %@ 上关闭游戏。被替换的存档会先备份到 Mac 上。', 'Close the game on the Mac and on %@ first. The save being replaced is backed up on the Mac first.'),
+ 'saves.askToDevice': ('用这台 Mac 的存档替换 %@ 上的存档?', 'Replace the save on %@ with the one from this Mac?'),
+ 'saves.askToMac': ('用 %@ 的存档替换这台 Mac 上的存档?', 'Replace the save on this Mac with the one from %@?'),
+ 'saves.askNote': ('请先在 %1$@ 上关闭游戏:正在运行的游戏之后会用自己的存档覆盖复制过去的存档。被替换的存档会先保存到 %2$@。', 'Close the game on %1$@ first: a running game writes its own save over the copy later. The save being replaced is kept in %2$@ first.'),
+ 'saves.cancel': ('取消', 'Cancel'),
+ 'saves.replace': ('替换', 'Replace'),
+ 'saves.copying': ('正在复制存档…', 'Copying the save…'),
+ 'saves.copied': ('已复制。', 'Copied.'),
+ 'saves.copiedBackup': ('已复制。被替换的存档在 %@。', 'Copied. The save it replaced is in %@.'),
+ 'saves.running': ('%@ 正在这台 Mac 上运行。请先退出游戏。', '%@ is running on this Mac. Quit it first.'),
+ 'saves.noMacSave': ('这台 Mac 上还没有这个游戏的存档。', 'This Mac has no save for this game yet.'),
+ 'saves.noDeviceSave': ('%@ 上还没有这个游戏的存档。', '%@ has no save for this game yet.'),
+ 'saves.failed': ('复制失败:%@', 'Copying failed: %@'),
+ 'pad.saves': ('存档', 'Saves'),
'dev.signStage': ('为 %@ 签名', 'Sign for %@'),
'dev.installStage': ('安装到 %@', 'Install on %@'),
'dev.copyStage': ('复制游戏文件到 %@', 'Copy the game files to %@'),
@@ -58,6 +84,32 @@ TABLE: dict[str, tuple[str, str]] = {
'build.saveTo': ('保存到', 'Save to'),
'build.saveDefault': ('游戏文件旁边', 'Next to the game files'),
'build.log': ('构建日志', 'Build log'),
+ 'section.log': ('构建日志', 'Log'),
+ 'free.menu': ('释放空间…', 'Free space…'),
+ 'free.title': ('释放空间', 'Free space'),
+ 'free.note': ('删除这个游戏的构建文件,下次构建时会重新生成。应用、IPA、游戏数据归档和 NSP 文件都会保留。', 'Removes this game’s build files, which the next build makes again. The app, the IPA, the game data archive and the NSPs stay.'),
+ 'free.part.extracted': ('解包的游戏文件', 'Extracted game files'),
+ 'free.part.shaders': ('着色器输出', 'Shader output'),
+ 'free.part.xcode': ('Xcode 项目和应用构建文件', 'Xcode project and app build'),
+ 'free.part.caches': ('其他缓存', 'Other caches'),
+ 'free.cost.extracted': ('下次构建会重新解包游戏。', 'The next build extracts the game again.'),
+ 'free.cost.shaders': ('下次构建会重新编译着色器,可能需要很长时间。', 'The next build compiles the shaders again, which can take a long time.'),
+ 'free.cost.xcode': ('下次构建会重新准备并编译应用。', 'The next build prepares and compiles the app again.'),
+ 'free.cost.caches': ('构建工具、改写后的游戏代码、DLC 镜像和临时文件:下次构建会重新生成。', 'Build tools, rewritten game code, DLC images and temporary files: the next build makes them again.'),
+ 'free.kept': ('保留', 'Kept'),
+ 'free.keptNote': ('日志、游戏配置、转换后的 NSP 和存档', 'Logs, the game’s profile, converted NSPs and saves'),
+ 'free.empty': ('这个游戏的构建文件夹中没有可删除的内容。', 'There is nothing to remove in this game’s build folder.'),
+ 'free.measuring': ('正在计算大小…', 'Measuring…'),
+ 'free.running': ('正在构建。构建完成后才能删除构建文件。', 'A build is running. Build files can be removed when it has finished.'),
+ 'free.selected': ('已选 %@', '%@ selected'),
+ 'free.remove': ('删除…', 'Remove…'),
+ 'free.confirm': ('删除 %@ 的构建文件?', 'Remove %@ of build files?'),
+ 'free.confirmButton': ('删除', 'Remove'),
+ 'free.confirmNote': ('文件会被直接删除,不会移到废纸篓。', 'The files are deleted, not moved to the Trash.'),
+ 'free.freed': ('已释放 %@。', 'Freed %@.'),
+ 'free.failed': ('有些文件无法删除:%@', 'Some files could not be removed: %@'),
+ 'free.clones': ('在同一个磁盘上构建的 Mac 应用与这里的游戏文件和着色器共享数据(APFS 克隆),因此实际释放的空间可能少于显示的大小。', 'A Mac app built on the same drive shares its game files and shaders with this folder (APFS clones), so removing them can free less than shown.'),
+ 'free.done': ('完成', 'Done'),
'library.folderUnset': ('尚未设置', 'Not set'),
'app.version': ('版本 %@', 'Version %@'),
'library.scrollBack': ('向前滚动', 'Scroll back'),
@@ -83,6 +135,11 @@ TABLE: dict[str, tuple[str, str]] = {
'library.building': ('正在构建', 'Building'),
'library.notBuilt': ('尚未构建', 'Not built yet'),
'library.play': ('开始游戏', 'Play'),
+ 'library.olderTools': ('用旧版构建工具构建', 'Built with older tools'),
+ 'library.olderToolsShort': ('工具较旧', 'Older tools'),
+ 'library.olderToolsHelp': ('这个游戏构建之后,构建工具有了会影响它的更改。重新构建即可用上这些更改。', 'The build tools changed in ways that affect this game since it was built. Rebuild it to get the changes.'),
+ 'library.rebuild': ('用当前工具重新构建…', 'Rebuild with current tools…'),
+ 'library.rebuildShort': ('重新构建', 'Rebuild'),
'library.buildForMac': ('为 Mac 构建', 'Build for Mac'),
'library.newBuild': ('构建游戏', 'Build game'),
'library.firstBuild': ('构建第一个游戏', 'Build your first game'),
@@ -108,6 +165,16 @@ TABLE: dict[str, tuple[str, str]] = {
'build.heading': ('构建游戏', 'Build game'),
'build.intro': ('选择游戏文件和运行设备。', 'Choose game files and an output.'),
'build.files': ('1. 选择游戏文件', '1. Choose your game files'),
+ 'keycheck.fits': ('密钥匹配:可以打开这些游戏文件', 'Keys fit: they open these game files'),
+ 'keycheck.unreadable': ('无法读取 prod.keys', 'prod.keys can’t be read'),
+ 'keycheck.noHeaderKey': ('prod.keys 中缺少 header_key', 'header_key is missing from prod.keys'),
+ 'keycheck.wrongHeaderKey': ('prod.keys 中的 header_key 打不开 %@', 'The header_key in prod.keys doesn’t open %@'),
+ 'keycheck.cannotCheck': ('构建前无法检查这种格式:%@', 'Can’t check this format before building: %@'),
+ 'keycheck.tooOld': ('这些密钥比%1$@所需的旧:缺少 %2$@。', 'These keys are older than %1$@ needs: %2$@ is missing.'),
+ 'keycheck.firmware': ('请从系统版本 %@ 或更新的 Switch 重新导出 prod.keys。', 'Dump prod.keys again from a Switch on firmware %@ or newer.'),
+ 'keycheck.part.base': ('游戏本体', 'the base game'),
+ 'keycheck.part.update': ('更新包', 'the update'),
+ 'keycheck.part.dlc': ('追加内容', 'the add-on content'),
'build.folderNote': ('选择包含游戏的文件夹,或逐个选择文件。', 'Choose the folder containing your game, or select the files below.'),
'build.options': ('更新和附加内容(可选)', 'Updates & add-on content (optional)'),
'build.details': ('构建详情', 'Build details'),
@@ -140,8 +207,31 @@ TABLE: dict[str, tuple[str, str]] = {
'app.checking': ('正在检查 App 更新…', 'Checking for a new app version…'),
'app.upToDate': ('App 已是最新版本', 'The app is up to date'),
'app.found': ('App 有新版本 %@,点右上角按钮更新', 'A new version %@ is out — update from the top-right button'),
+ 'app.noAsset': ('发现新版本 %@,但这个版本找不到对应的安装包——请到发布页手动下载', 'Version %@ is out, but this build cannot find its own download in it — get it from the release page'),
'app.updateBtn': ('更新到 %@', 'Update to %@'),
- 'app.downloading': ('正在下载新版本…', 'Downloading the new version…'),
+ 'app.downloading': ('正在下载 %@…', 'Downloading %@…'),
+ 'app.staging': ('正在后台下载 %@…', 'Downloading %@ in the background…'),
+ 'app.ready': ('%@ 已下载并校验:退出 App 时安装,或点「立即重启」', '%@ is downloaded and verified: it installs when you quit, or Restart now'),
+ 'app.restartNow': ('立即重启', 'Restart now'),
+ 'app.waitForBuild': ('构建进行中:更新会等构建结束', 'A build is running: the update waits until it is done'),
+ 'app.stageNetFail': ('%@ 下载失败(GitHub 不通?下次打开时再试)', 'Could not download %@ (GitHub unreachable? it tries again next launch)'),
+ 'app.noDigest': ('%@ 已发布,但 GitHub 没有提供校验值,所以不会自动安装——可以手动更新', '%@ is out, but GitHub gave no checksum for it, so it is not installed automatically — update by hand'),
+ 'app.digestMismatch': ('%@ 的下载与校验值不符,已丢弃', 'The download of %@ did not match its checksum and was discarded'),
+ 'app.unpackFail': ('%@ 的下载无法解压,已丢弃', 'The download of %@ could not be unpacked and was discarded'),
+ 'app.notOurApp': ('%@ 的下载不是 NX2Apple,已丢弃', 'The download of %@ is not an NX2Apple app and was discarded'),
+ 'app.devBuild': ('%@ 已发布。这个启动器是从仓库构建的,不会替换自己', '%@ is out. This launcher was built from the repository and does not replace itself'),
+ 'app.readOnly': ('%@ 已发布,但 App 无法在当前位置替换自己——请把它移到「应用程序」文件夹', '%@ is out, but the app cannot replace itself where it is — move it to Applications'),
+ 'app.auto': ('自动安装更新', 'Install updates automatically'),
+ 'app.autoNote': ('在后台下载并校验,退出 App 时安装;构建进行中绝不安装', 'Downloaded and verified in the background, installed when you quit; never during a build'),
+ 'app.autoDev': ('从仓库构建的启动器不会自动更新', 'Not for a launcher built from the repository'),
+ 'app.autoReadOnly': ('App 所在的文件夹不可写,无法自动更新', "The app's folder is not writable, so it cannot update itself"),
+ 'library.appReady': ('NX2Apple %@ 已就绪', 'NX2Apple %@ is ready'),
+ 'update.title': ('有新版本可用', 'A new version is out'),
+ 'update.fromTo': ('当前 %@ → 新版本 %@', 'You have %@ — the new version is %@'),
+ 'update.noNotes': ('这一版没有写更新说明,可以打开发布页查看。', 'This release has no notes; open the release page to see it.'),
+ 'update.now': ('现在更新', 'Update now'),
+ 'update.later': ('稍后', 'Later'),
+ 'update.openPage': ('打开发布页', 'Open the release page'),
'app.installing': ('正在安装…(旧版本会进废纸篓)', 'Installing… (the old version goes to the Trash)'),
'app.relaunching': ('已更新到 %@,正在重启 App…', 'Updated to %@ — restarting…'),
'app.installFail': ('安装失败:%@——新版本已下载,可手动替换', 'Install failed: %@ — the new version was downloaded; replace by hand'),
@@ -155,8 +245,14 @@ TABLE: dict[str, tuple[str, str]] = {
'repo.behind': ('有更新:%d 个新提交,点「拉取更新」', 'Updates available: %d new commits — pull them'),
'repo.pull': ('拉取更新', 'Pull updates'),
'repo.pulling': ('正在更新…(构建不受影响,之前的构建文件不在仓库里)', 'Updating… (your builds are safe — their files live outside the repository)'),
+ 'repo.auto': ('打开时自动更新', 'Update automatically when the app opens'),
+ 'repo.autoNote': ('仅限 main 分支且没有本地改动的仓库', 'Only a checkout on main with no local changes'),
+ 'repo.autoPulled': ('打开时已自动更新:%ld 个新提交', 'Updated automatically when the app opened: %ld new commits'),
+ 'repo.autoSkipped': ('未自动更新:仓库有本地改动或不在 main 分支', 'Not updated automatically: the checkout has local changes or is not on main'),
+ 'library.toolsUpdated': ('构建工具已更新:%ld 个新提交', 'Build tools updated: %ld new commits'),
'repo.pulled': ('已更新到最新', 'Updated to the latest'),
'repo.pullFail': ('更新失败——详情见日志(本地文件被改过?)', 'Update failed — see the log (local changes?)'),
+ 'repo.pullDiverged': ('这个仓库有自己的提交历史,无法直接更新。点「选择仓库…」指向一个新的 NX2Apple 副本(或删除该文件夹后重新下载)', 'This checkout has its own history and cannot be fast-forwarded. Use Choose repository… to point at a fresh NX2Apple copy (or delete the folder and download again)'),
'repo.gitInstalling': ('没找到 git,正在自动安装 PortableGit…(约 57 MB,无需管理员权限)', 'git not found — installing PortableGit… (about 57 MB, no administrator rights needed)'),
'repo.gitInstallFail': ('git 自动安装失败:%@——可到 git-scm.com 手动安装', 'Could not install git: %@ — install it from git-scm.com'),
'repo.gitMissing': ('没找到 git:Windows 请到 git-scm.com 下载安装,macOS 运行 xcode-select --install', 'git not found: install it from git-scm.com (Windows), or run xcode-select --install (macOS)'),
@@ -178,6 +274,14 @@ TABLE: dict[str, tuple[str, str]] = {
'data.noBase': ('这个文件夹里没有本体 NSP([xxxx…000])', 'No base game NSP in this folder ([xxxx…000])'),
'data.noNsp': ('这个文件夹里没有 NSP/XCI', 'No NSP/XCI in this folder'),
'build.start': ('开始构建', 'Start build'),
+ 'notify.doneTitle': ('%@ 构建完成', '%@ is built'),
+ 'notify.failedTitle': ('%@ 构建失败', '%@ couldn’t be built'),
+ 'notify.forMac': ('用于这台 Mac,已在游戏库中', 'For this Mac, in your library'),
+ 'notify.forIOS': ('用于 iPhone / iPad', 'For iPhone / iPad'),
+ 'notify.installedOn': ('已安装到 %@', 'Installed on %@'),
+ 'settings.notify': ('构建完成时通知', 'Notify when a build ends'),
+ 'settings.notifyNote': ('仅在 NX2Apple 不在前台时,构建完成或失败都会通知', 'When a build finishes or fails while NX2Apple is in the background'),
+ 'settings.notifyUnbundled': ('需要 NX2Apple.app:用 swift run 启动时没有通知', 'Needs NX2Apple.app: no notifications when started with swift run'),
'build.cancel': ('取消构建', 'Cancel build'),
'msg.macAppDone': ('Mac App 已生成,可在访达里双击运行', 'Mac app ready — double-click it in the Finder'),
'msg.macAppMissing': ('构建结束但没有找到 .app(仓库里缺 dm/mac/pack_app.py?)', 'Build finished but no .app was produced (is dm/mac/pack_app.py in the checkout?)'),
@@ -207,10 +311,8 @@ TABLE: dict[str, tuple[str, str]] = {
'dep.checkFailed': ('依赖检测失败——详情见日志(不是「已就绪」)', 'Dependency check failed — see the log (this is not a pass)'),
'dep.allReady': ('全部就绪', 'All ready'),
'dep.missing': ('缺 %d 项', '%d missing'),
- 'dep.onlyOptional': ('必备项都齐了(%d 项可选未装,只影响部分游戏)',
- 'everything required is installed (%d optional missing, only some games need them)'),
- 'dep.missingOptional': ('缺 %d 项(另有 %d 项可选,只影响部分游戏)',
- '%d missing (%d optional, only some games need them)'),
+ 'dep.missingOptional': ('缺 %d 项(另有 %d 项可选,只影响部分游戏)', '%d missing (%d optional, only some games need them)'),
+ 'dep.onlyOptional': ('必备项都齐了(%d 项可选未装,只影响部分游戏)', 'everything required is installed (%d optional missing, only some games need them)'),
'dep.llvm': ('LLVM-MinGW(交叉编译)', 'LLVM-MinGW (cross compiler)'),
'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)'),
@@ -232,6 +334,10 @@ TABLE: dict[str, tuple[str, str]] = {
'dep.glslang.hint': ('仅 OpenGL 游戏需要', 'only needed for OpenGL games'),
'dep.installTimeout': ('安装超时(30 分钟)——网络太慢或卡住了', 'Install timed out (30 minutes) — the network is slow or stuck'),
'dep.installAll': ('一键安装全部缺失项', 'Install all missing'),
+ 'diag.title': ('诊断信息', 'Diagnostics'),
+ 'diag.note': ('用于问题报告:版本、工具和上次构建的日志,不含密钥。', 'For a bug report: versions, tools, the last build’s log. No keys.'),
+ 'diag.copy': ('复制诊断信息', 'Copy diagnostics'),
+ 'diag.copied': ('已复制', 'Copied'),
'dep.recheck': ('重新检测', 'Check again'),
'dep.install': ('安装', 'Install'),
'dep.installing': ('安装中…', 'Installing…'),
@@ -247,10 +353,7 @@ TABLE: dict[str, tuple[str, str]] = {
'dep.xcodegen.hint': ('Xcode 工程生成', 'generates the Xcode project'),
'dep.zstd': ('brew: zstd', 'brew: zstd'),
'dep.spirv.win': ('spirv-cross', 'spirv-cross'),
- 'dep.spirv.hint.win': ('仅 OpenGL 游戏(如 Balatro、Digimon)需要,Metal 游戏用不到。装 <a href="https://vulkan.lunarg.com/sdk/home">Vulkan SDK</a> 即可,本程序会自动在 %VULKAN_SDK%\\Bin 和 C:\\VulkanSDK\\<版本>\\Bin 里找到它,不用改任何配置',
- 'only OpenGL games (Balatro, Digimon) need it; Metal games never do. Install the '
- '<a href="https://vulkan.lunarg.com/sdk/home">Vulkan SDK</a> and this app finds it in '
- '%VULKAN_SDK%\\Bin or C:\\VulkanSDK\\<version>\\Bin by itself — no configuration'),
+ 'dep.spirv.hint.win': ('仅 OpenGL 游戏(如 Balatro、Digimon)需要,Metal 游戏用不到。装 <a href="https://vulkan.lunarg.com/sdk/home">Vulkan SDK</a> 即可,本程序会自动在 %VULKAN_SDK%\\\\Bin 和 C:\\\\VulkanSDK\\\\<版本>\\\\Bin 里找到它,不用改任何配置', 'only OpenGL games (Balatro, Digimon) need it; Metal games never do. Install the <a href="https://vulkan.lunarg.com/sdk/home">Vulkan SDK</a> and this app finds it in %VULKAN_SDK%\\\\Bin or C:\\\\VulkanSDK\\\\<version>\\\\Bin by itself — no configuration'),
'dep.zstd.win': ('zstd', 'zstd'),
'dep.zstd.hint.win': ('解压——点「安装」由 App 下载(facebook/zstd 官方 Windows 版)', "decompression — press Install and the app fetches it (facebook/zstd's official Windows build)"),
'dep.metal.hint.win': ('需要 <a href="https://developer.apple.com/download/all/">Apple 开发者下载页</a> 的「Metal Developer Tools for Windows」(需 Apple ID)', 'needs <a href="https://developer.apple.com/download/all/">Apple developer downloads</a>: "Metal Developer Tools for Windows" (Apple ID required)'),
@@ -269,7 +372,8 @@ TABLE: dict[str, tuple[str, str]] = {
'dep.python.missing': ('%@ 缺包', '%@ is missing packages'),
'dep.install.begin': ('开始安装 %@…', 'Installing %@…'),
'dep.install.fail': ('安装失败:%@(详情见日志)', 'Install failed: %@ (see the log)'),
- 'dep.python.old': ('Python %@ 太旧(需要 3.9 或更新);这个解释器没有构建需要的包', 'Python %@ is too old (need 3.9 or newer); it lacks the packages the build needs'),
+ 'dep.python.old': ('Python %@ 太旧(需要 %@ 或更新);这个解释器没有构建需要的包', 'Python %@ is too old (need %@ or newer); it lacks the packages the build needs'),
+ 'dep.python.notFound': ('没找到 Python %@ 或更新版本;先装一个(brew install python@%@),再点「重新检测」', 'No Python %@ or newer found; install one (brew install python@%@), then press Check again'),
'dep.python.none': ('没找到可用的 Python(%@ 不行)——点右侧「安装」,App 会下载 3.12 并静默装到自己的目录', 'No usable Python found (%@ will not run) — press Install and the app fetches 3.12 into its own folder'),
'msg.workdirHint': ('提示:「输出目录」同时是构建缓存的位置(输出目录/<ID>_build)。已有构建资源时,把它选回上次的同一位置即可复用(解包、shader 不重跑);换新位置会从头再来。', 'Tip: the output folder is also where the build cache lives (<output>/<ID>_build). To reuse an existing build, point it back at the same folder; a new folder starts over.'),
'msg.chainChanged': ('上游代码更新了 shader 翻译链,之前构建的 shader 库无法复用——本次构建用新翻译器重建(每个版本一次,之后的构建恢复复用)。', 'An upstream update changed the shader translator, so previously built shader libraries cannot be reused — this build rebuilds them with the new one (once per update; later builds reuse as before).'),
@@ -309,6 +413,8 @@ TABLE: dict[str, tuple[str, str]] = {
'msg.buildFailedReason': ('构建失败,见下方日志。最后一行:%@', 'Build failed — see the log below. Last line: %@'),
'msg.exitCode': ('退出码 %d', 'exit code %d'),
'msg.stagingFailed': ('无法在暂存文件夹里建立链接(文件在不同磁盘?)', 'Could not create links in the staging folder (files on different volumes?)'),
+ 'msg.stagedFromSharedFolder': ('文件夹里还有其他游戏:只把选中的这个游戏(%@)临时复制出去构建', 'The folder holds other games: building from a temporary copy of this one (%@)'),
+ 'drop.hint': ('松开以添加:NSP、NSZ、XCI 文件,文件夹或 prod.keys', 'Drop to add: NSP, NSZ or XCI files, a folder, prod.keys'),
'msg.launchFailed': ('无法启动构建脚本:%@', 'Could not start the build script: %@'),
'msg.repoInvalid': ('仓库路径无效:%@——用上方的「选择仓库…」指向本项目的 clone', 'Invalid repository path: %@ — use Choose repository… above to point at your clone'),
'msg.repoInvalidEmpty': ('仓库路径无效:未选择——用上方的「选择仓库…」指向本项目的 clone', 'Invalid repository path: none chosen — use Choose repository… above'),
@@ -334,6 +440,18 @@ TABLE: dict[str, tuple[str, str]] = {
'controls.padNote': ('按钮按位置命名:右侧为 A,下方为 B,上方为 X,左侧为 Y。', 'Buttons are named by position: A on the right, B at the bottom, X at the top, Y on the left.'),
'controls.applied': ('下次在这里按下“开始游戏”时生效。较早的构建会忽略这些设置。', 'Applied the next time you press Play here. Older builds ignore it.'),
'controls.reset': ('恢复默认', 'Reset to defaults'),
+ 'controls.mode': ('手柄:布局', 'Controller: layout'),
+ 'controls.modeRow': ('按钮布局', 'Button layout'),
+ 'controls.mode.auto': ('自动', 'Auto'),
+ 'controls.mode.standard': ('标准布局', 'Standard layout'),
+ 'controls.mode.byLabel': ('按标签', 'By label'),
+ 'controls.mode.custom': ('自定义', 'Custom'),
+ 'controls.modeNote.standard': ('按位置,采用任天堂布局:右侧 A,下方 B,上方 X,左侧 Y。适用于 PlayStation 和其他手柄。', 'By position, in the Nintendo layout: right A, bottom B, top X, left Y. For PlayStation and other controllers.'),
+ 'controls.modeNote.byLabel': ('A、B、X、Y 与按钮上印的字母一致。适用于任天堂和 Xbox 手柄。', 'A, B, X and Y as printed on the buttons. For Nintendo and Xbox controllers.'),
+ 'controls.modeNote.custom': ('每个按钮发送下面选择的按键。更改任何按钮都会切换到自定义。', 'Each button sends what is chosen below. Changing any button switches to Custom.'),
+ 'controls.modeNote.auto': ('按开始游戏时连接的手柄选择:任天堂或 Xbox 手柄按标签,其他手柄用标准布局。所有手柄共用一种布局,因此同时连接两种不同的手柄时,无法两者都正确。', 'Picked from the controller connected when you press Play: by label for a Nintendo or Xbox controller, the standard layout for any other. Every controller gets the same layout, so two different kinds at once can’t both be right.'),
+ 'controls.connected': ('已连接:%1$@。自动选择“%2$@”。', 'Connected: %@. Auto picks %@.'),
+ 'controls.noController': ('没有连接手柄。自动选择“%@”。', 'No controller connected. Auto picks %@.'),
'controls.clear': ('不使用按键', 'No key'),
'controls.press': ('请按一个键…', 'Press a key…'),
'controls.none': ('无', 'None'),
@@ -362,6 +480,25 @@ TABLE: dict[str, tuple[str, str]] = {
'controls.fn.LS': ('按下左摇杆', 'Left stick press'),
'controls.fn.RS': ('按下右摇杆', 'Right stick press'),
'controls.fn.Shake': ('摇动手柄', 'Shake'),
+ 'launch.display': ('显示模式', 'Display mode'),
+ 'launch.display.window': ('窗口', 'Window'),
+ 'launch.display.fullscreen': ('全屏', 'Fullscreen'),
+ 'launch.advanced': ('高级设置', 'Advanced settings'),
+ 'launch.advancedCount': ('%ld 项', '%ld settings'),
+ 'launch.scaleOfDocked': ('底座模式 %2$@ 的 %1$ld%%', '%ld%% of %@ docked'),
+ 'launch.scaleOfHandheld': ('掌机模式 %2$@ 的 %1$ld%%', '%ld%% of %@ handheld'),
+ 'launch.mods': ('模组', 'Mods'),
+ 'launch.modsNone': ('还没有模组', 'No mods yet'),
+ 'launch.modsHow': ('把每个模组放进模组文件夹中自己的文件夹(打开模组文件夹)。修改游戏代码的模组(exefs)不受支持。', 'Put each mod in a folder of its own in the mods folder (Open mods folder). Mods that change the game’s code (exefs) are not supported.'),
+ 'launch.modCode': ('修改游戏代码(exefs),不受支持', 'Changes the game’s code (exefs): not supported'),
+ 'launch.modsRefresh': ('刷新', 'Refresh'),
+ 'launch.modsOpen': ('打开模组文件夹', 'Open mods folder'),
+ 'launch.savesShow': ('显示存档', 'Show saves'),
+ 'launch.modsNote': ('模组会改变游戏读取的文件。开关模组前请先备份存档:用模组存的档,去掉模组后可能无法读取。', 'A mod changes the files the game reads. Back up the saves before switching a mod on or off: a save made with a mod may not load without it.'),
+ 'launch.modsNoteOrder': ('模组会改变游戏读取的文件。开关模组前请先备份存档:用模组存的档,去掉模组后可能无法读取。两个模组替换同一个文件时,列表中靠上的生效。', 'A mod changes the files the game reads. Back up the saves before switching a mod on or off: a save made with a mod may not load without it. Where two mods replace the same file, the one higher in the list wins.'),
+ 'pad.play': ('开始游戏', 'Play'),
+ 'pad.options': ('启动选项', 'Options'),
+ 'pad.back': ('返回', 'Back'),
'msg.archiveLog': ('归档:%@ → %@', 'Archive: %@ → %@'),
}
diff --git a/frontend-qt/nspb_qt/ui.py b/frontend-qt/nspb_qt/ui.py
index f3dbe82e..759c482c 100644
--- a/frontend-qt/nspb_qt/ui.py
+++ b/frontend-qt/nspb_qt/ui.py
@@ -376,9 +376,13 @@ class MainWindow(QMainWindow):
h = QHBoxLayout(row)
h.setContentsMargins(0, 0, 0, 0)
h.setSpacing(6)
- mark = QLabel('●' if d.ok else ('◐' if d.state is DepState.OLD else '✕'))
+ # An optional tool that is missing reads as a muted ○, not a red ✕: it does not block
+ # the build in front of the player, and the red row made a complete Metal toolchain look
+ # broken (the report's screenshot: spirv-cross and glslangValidator, both OpenGL-only).
+ optional_missing = not d.ok and not getattr(d, 'required', True)
+ mark = QLabel('●' if d.ok else ('◐' if d.state is DepState.OLD else ('○' if optional_missing else '✕')))
mark.setFixedWidth(14)
- mark.setStyleSheet(f'color: {GREEN if d.ok else (ORANGE if d.state is DepState.OLD else RED)};')
+ mark.setStyleSheet(f'color: {GREEN if d.ok else (MUTED if optional_missing else (ORANGE if d.state is DepState.OLD else RED))};')
h.addWidget(mark)
name = QLabel(self.m.t(d.title_key))
name.setFixedWidth(140)
diff --git a/frontend-qt/nspb_qt/win/toolchain.py b/frontend-qt/nspb_qt/win/toolchain.py
index e45d7022..e54f4030 100644
--- a/frontend-qt/nspb_qt/win/toolchain.py
+++ b/frontend-qt/nspb_qt/win/toolchain.py
@@ -940,11 +940,12 @@ def probe_link(sdk: Path) -> tuple[bool, str]:
c = Path(td) / 'probe.c'
out = Path(td) / 'probe'
c.write_text(src, encoding='utf-8')
+ # --ld-path names the linker directly. -fuse-ld=lld + PATH prepend worked on the machines
+ # that probed green, but the report's machine failed with exit 1 and no output — on Windows
+ # clang's linker lookup has more moving parts (PATHEXT, the llvm-mingw driver config), so
+ # name the binary and let the failure say what actually went wrong.
cmd = [str(clang), '-target', f'arm64-apple-ios{IOS_DEPLOYMENT}', '-isysroot', str(sdk),
- '-fuse-ld=lld', '-o', str(out), str(c)]
- # clang finds ld64.lld by name; give it the folder we created the copy in
- env = dict(os.environ)
- env['PATH'] = str(lld.parent) + os.pathsep + env.get('PATH', '')
+ '-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,
**no_window())
@@ -957,7 +958,7 @@ def probe_link(sdk: Path) -> tuple[bool, str]:
# missing", not "the linker is bad" — the report's "link failed: no output" carried
# neither, because an empty output tail replaced the code
tail = ((r.stderr or r.stdout or '').strip().splitlines() or ['(no output)'])[-1]
- return False, f'link exit {r.returncode} (0x{r.returncode & 0xFFFFFFFF:08x}): {tail[:200]}'
+ return False, f'link exit {r.returncode} (0x{r.returncode & 0xFFFFFFFF:08x}): {tail[:400]}'
try:
data = out.read_bytes()
except OSError as e:
diff --git a/frontend/Sources/NSPortBuilder/Localization.swift b/frontend/Sources/NSPortBuilder/Localization.swift
index 3799a976..0764d70c 100644
--- a/frontend/Sources/NSPortBuilder/Localization.swift
+++ b/frontend/Sources/NSPortBuilder/Localization.swift
@@ -381,6 +381,8 @@ enum L10n {
"dep.checkFailed": ("依赖检测失败——详情见日志(不是「已就绪」)", "Dependency check failed — see the log (this is not a pass)"),
"dep.allReady": ("全部就绪", "All ready"),
"dep.missing": ("缺 %d 项", "%d missing"),
+ "dep.missingOptional": ("缺 %d 项(另有 %d 项可选,只影响部分游戏)", "%d missing (%d optional, only some games need them)"),
+ "dep.onlyOptional": ("必备项都齐了(%d 项可选未装,只影响部分游戏)", "everything required is installed (%d optional missing, only some games need them)"),
"dep.llvm": ("LLVM-MinGW(交叉编译)", "LLVM-MinGW (cross compiler)"),
"dep.llvm.hint": ("Windows 上编译 iOS 二进制用(app 内自动下载)",
"builds the iOS binary on Windows (downloaded in-app)"),
@@ -432,8 +434,8 @@ enum L10n {
"dep.xcodegen.hint": ("Xcode 工程生成", "generates the Xcode project"),
"dep.zstd": ("brew: zstd", "brew: zstd"),
"dep.spirv.win": ("spirv-cross", "spirv-cross"),
- "dep.spirv.hint.win": ("仅 OpenGL 游戏需要——<a href=\"https://vulkan.lunarg.com/sdk/home\">Vulkan SDK</a> 自带(装完在 toolchain.json 里指一下 Bin 目录)",
- "only OpenGL games need it — the <a href=\"https://vulkan.lunarg.com/sdk/home\">Vulkan SDK</a> ships it (point \"spirv_cross_dir\" in toolchain.json at its Bin folder)"),
+ "dep.spirv.hint.win": ("仅 OpenGL 游戏(如 Balatro、Digimon)需要,Metal 游戏用不到。装 <a href=\"https://vulkan.lunarg.com/sdk/home\">Vulkan SDK</a> 即可,本程序会自动在 %VULKAN_SDK%\\Bin 和 C:\\VulkanSDK\\<版本>\\Bin 里找到它,不用改任何配置",
+ "only OpenGL games (Balatro, Digimon) need it; Metal games never do. Install the <a href=\"https://vulkan.lunarg.com/sdk/home\">Vulkan SDK</a> and this app finds it in %VULKAN_SDK%\\Bin or C:\\VulkanSDK\\<version>\\Bin by itself — no configuration"),
"dep.zstd.win": ("zstd", "zstd"),
"dep.zstd.hint.win": ("解压——点「安装」由 App 下载(facebook/zstd 官方 Windows 版)", "decompression — press Install and the app fetches it (facebook/zstd's official Windows build)"),
"dep.metal.hint.win": ("需要 <a href=\"https://developer.apple.com/download/all/\">Apple 开发者下载页</a> 的「Metal Developer Tools for Windows」(需 Apple ID)",