Play your own Switch games on iPhone/iPad — one-click macOS app, no terminal. | 把 Switch 游戏装进 iPhone:图形界面一键构建,不用命令行。Bring your own game.
Swift apple-siliconcustom-formathomebrewiosipaipadipadosiphonemetalnative-portnintendo-switchnxnativeromfsswitch-games
Triage: check every required form field and detect the game form
v0lumehi7dcb1d1c086a
diff --git a/.github/scripts/tests/test_triage_prepare.py b/.github/scripts/tests/test_triage_prepare.pyindex 03de2a23..056d350c 100644--- a/.github/scripts/tests/test_triage_prepare.py+++ b/.github/scripts/tests/test_triage_prepare.py@@ -17,9 +17,10 @@ def form(**fields):return '\n\n'.join(f'### {h}\n\n{v}' for h, v in fields.items()) + '\n'-GAME = {'Game, title ID and versions': 'X, 0100000000000000, 1.0', 'Where it runs': 'Mac app (built for This Mac)', 'Device, chip and RAM': 'M2',- 'macOS or iOS / iPadOS version': 'macOS 26.1', 'NX2Apple version': 'v0.4.9', 'What happens, and when': 'crash',- 'Copy diagnostics': 'diag', "The game's log": 'log text'}+GAME = {'Game and title ID': 'X, 0100000000000000', 'Base game and update versions': '1.0, 1.0.1', 'Where it runs': 'Mac app (built for This Mac)',+ 'Device, chip and RAM': 'M2', 'macOS or iOS / iPadOS version': 'macOS 26.1', 'How it was installed': 'DMG', 'NX2Apple version': 'v0.4.9',+ 'What happens, and when': 'crash', 'Launch options changed from the defaults': 'None',+ 'Copy diagnostics': 'diag', 'Game profile lines from the build log': 'profile', "The game's log": 'log text'}class Form(unittest.TestCase):@@ -33,6 +34,16 @@ class Form(unittest.TestCase):f = dict(GAME, **{'NX2Apple version': '_No response_', 'Copy diagnostics': '_No response_'})self.assertEqual(self.missing(form(**f)), ['NX2Apple version', 'Copy diagnostics'])+ def test_empty_game_and_title_id_is_missing(self):+ f = dict(GAME, **{'Game and title ID': '_No response_'})+ self.assertEqual(self.missing(form(**f)), ['game and title ID'])+ self.assertEqual(self.missing(form(**{'Game and title ID': '_No response_'})), ['game and title ID'])++ def test_every_required_game_field_is_checked(self):+ for h in GAME:+ r = self.missing(form(**dict(GAME, **{h: '_No response_'})))+ self.assertEqual(len(r), 1, h)+def test_empty_fenced_field_is_missing(self):f = dict(GAME, **{'Copy diagnostics': '```markdown\n\n```'})self.assertEqual(self.missing(form(**f)), ['Copy diagnostics'])diff --git a/.github/scripts/triage_prepare.py b/.github/scripts/triage_prepare.pyindex 19062eee..68f41556 100644--- a/.github/scripts/triage_prepare.py+++ b/.github/scripts/triage_prepare.py@@ -32,6 +32,18 @@ REQUIRED = {'Build log': 'build log','The message': 'the error message','Game, title ID and versions': 'game, title ID and versions',+ 'Game and title ID': 'game and title ID',+ 'Base game and update versions': 'base game and update versions',+ 'How it was installed': 'how it was installed',+ 'What happens, and when': 'what happens, and when',+ 'Launch options changed from the defaults': 'launch options',+ 'Game profile lines from the build log': 'game profile lines from the build log',+ 'What happens, or what you would like': 'what happens, or what you would like',+ 'Which step failed': 'which step failed',+ 'Built for': 'built for',+ 'Game files': 'game files',+ 'Where it runs': 'where it runs',+ 'This is': 'what this is',}KIND_HEADINGS = {'Which step failed': 'build', 'Where it runs': 'game', 'This is': 'launcher'}@@ -78,7 +90,8 @@ def analyse_form(body, readable_attachments):The log counts as given when its own form field has text or a log attachment could be read; a `[RED]` line quoted in another fielddoes not. `Copy diagnostics` is not asked of an idea (the form says it is not needed)."""sec = sections(body)- from_form = any(h in sec for h in ('NX2Apple version', 'No keys, no game files', 'Game, title ID and versions'))+ from_form = any(h in sec for h in ('NX2Apple version', 'No keys, no game files', 'Game, title ID and versions',+ 'Game and title ID'))missing, kind, target = [], None, Noneif from_form:for h, k in KIND_HEADINGS.items():