Skip to content

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

Launcher: the several-games pattern matches the engine's new text too

v0lumehi1717106be4f2
diff --git a/frontend-qt/nspb_qt/build_failure.py b/frontend-qt/nspb_qt/build_failure.py
index 479e2824..4ec52200 100644
--- a/frontend-qt/nspb_qt/build_failure.py
+++ b/frontend-qt/nspb_qt/build_failure.py
@@ -42,7 +42,7 @@ TABLE: list[tuple[str, str, str]] = [
('nsp.damaged', DAMAGED_NSP, r"files fail the NCA's hash check"),
('arm32.program', A32_PROGRAM, r'is a 32-bit ARM program'),
('keys.missing', KEYS, r'(?m)^\[RED\] no such file: '),
- ('games.several', SEVERAL_GAMES, r'more than one game in the folder, keep one game per folder'),
+ ('games.several', SEVERAL_GAMES, r'more than one game in the folder'),
('games.noTitleID', NO_TITLE_ID, r'no NSP with a readable title ID in '),
('disk.low', DISK_FULL, r'less than [0-9]+ GB free on the volume of '),
('disk.full', DISK_FULL, r'No space left on device'),
diff --git a/frontend-qt/tests/test_build_failure_hints.py b/frontend-qt/tests/test_build_failure_hints.py
index df07a8e3..e116a91c 100644
--- a/frontend-qt/tests/test_build_failure_hints.py
+++ b/frontend-qt/tests/test_build_failure_hints.py
@@ -98,6 +98,10 @@ class Rows(unittest.TestCase):
self.assertEqual(bf.classify(fixture(pid)['text']).kind, kind, pid)
self.assertEqual(bf.classify('copying: no such file: x').kind, bf.UNKNOWN)
+ def test_the_older_several_games_message_still_classifies(self): # the stable and experimental engine channels can still serve the text before the pin of cd859c38
+ log = '[RED] more than one game in the folder, keep one game per folder: 0100000000010000, 01006F8002326000'
+ self.assertEqual(bf.classify(log).kind, bf.SEVERAL_GAMES)
+
def test_details(self):
self.assertEqual(bf.classify(fixture('disk.low')['text']).detail, fixture('disk.low')['gb'])
self.assertIsNone(bf.classify(fixture('disk.full')['text']).detail)
diff --git a/frontend/Sources/NSPortBuilder/BuildFailure.swift b/frontend/Sources/NSPortBuilder/BuildFailure.swift
index 91c9be50..4c53b484 100644
--- a/frontend/Sources/NSPortBuilder/BuildFailure.swift
+++ b/frontend/Sources/NSPortBuilder/BuildFailure.swift
@@ -61,7 +61,7 @@ enum BuildFailureClassifier {
("nsp.damaged", .damagedNSP, "files fail the NCA's hash check"),
("arm32.program", .a32Program, "is a 32-bit ARM program"),
("keys.missing", .keys, "(?m)^\\[RED\\] no such file: "),
- ("games.several", .severalGames, "more than one game in the folder, keep one game per folder"),
+ ("games.several", .severalGames, "more than one game in the folder"),
("games.noTitleID", .noTitleID, "no NSP with a readable title ID in "),
("disk.low", .diskFull, "less than [0-9]+ GB free on the volume of "),
("disk.full", .diskFull, "No space left on device"),
diff --git a/frontend/Tests/Fixtures/build_failures.json b/frontend/Tests/Fixtures/build_failures.json
index 75a50a65..29e3cea5 100644
--- a/frontend/Tests/Fixtures/build_failures.json
+++ b/frontend/Tests/Fixtures/build_failures.json
@@ -81,8 +81,8 @@
"id": "games.several",
"kind": "severalGames",
"source": "scripts/build_ipa_from_nsp.py",
- "fragment": "more than one game in the folder, keep one game per folder",
- "text": "[RED] more than one game in the folder, keep one game per folder: 0100000000010000, 01006F8002326000"
+ "fragment": "more than one game in the folder",
+ "text": "[RED] more than one game in the folder: 0100000000010000, 01006F8002326000; keep one game per folder, or name the one to pack with --title-id / TITLE_ID (a cartridge dump that holds two games)"
},
{
"id": "games.noTitleID",
diff --git a/frontend/Tests/NSPortBuilderTests/BuildFailureTests.swift b/frontend/Tests/NSPortBuilderTests/BuildFailureTests.swift
index aba52d98..4e0c05f6 100644
--- a/frontend/Tests/NSPortBuilderTests/BuildFailureTests.swift
+++ b/frontend/Tests/NSPortBuilderTests/BuildFailureTests.swift
@@ -53,6 +53,11 @@ final class BuildFailureTests: XCTestCase {
}
}
+ func testTheOlderSeveralGamesMessageStillClassifies() { // the stable and experimental engine channels can still serve the text before the pin of cd859c38
+ let log = "[RED] more than one game in the folder, keep one game per folder: 0100000000010000, 01006F8002326000"
+ XCTAssertEqual(BuildFailureClassifier.classify(log).kind, .severalGames)
+ }
+
func testTheFailureIsFoundAboveTheLastLine() {
let log = "[3/9] extract\n[RED] the NSP is damaged: 2 files fail the NCA's hash check (x)\n---- last lines of /w/extract.log ----\n[RED] nx_extract exit code 3 (full output: /w/extract.log)\n"
XCTAssertEqual(BuildFailureClassifier.classify(log).kind, .damagedNSP)