feat(launcher): find, browse and drop .nx archives beside .nup files #77

Merged
HumanBean merged 1 commit from nussico/LongshotLauncher:feat/nx-format into main 2026-11-15 04:37:17 +00:00
Contributor

Players who keep their game as a .nx archive (NXFormat, made with nxconvert pack-nup; MagicBeanDev/Longshot#411) can't pick it in the launcher: it only finds, browses and accepts .nup files. With this PR the launcher treats a .nx like a .nup and hands it to make_game.py --nup, which reads both once the Longshot PR adding the reader is in (MagicBeanDev/Longshot#685).

Merge order: after a Longshot release with that PR. With older tools, a .nx is refused by the check with nup.py's message ("not a .nup"), not a crash.

What changed

  • Core/GameFiles.cs: IsGameFile() (a .nup or .nx by name) used by Find (Downloads, Desktop, ...) and FromPath (Browse, a drop). *.nx alone also matches .nxs on Windows (8.3 names), hence the name check.
  • App/MainWindow.axaml.cs, App/ViewModels/ViewModelBase.cs: PickFileAsync takes a list of patterns; WizardViewModel asks for *.nup and *.nx.
  • Strings: "Your game file (.nup or .nx)", "That is not a .nup or .nx file.", "Drop a .nup or .nx file, ...", and the home screen's "a .nup or .nx file, or its romfs and exefs folders". The translations write .nup/.nx where they had .nup.
  • tests/launcher_core/ScreenChecks.cs: a .nx is found, dropped and built from like a .nup; a .nxs is not.
  • scripts/release.py: nx added to NOT_A_RELEASE_FILE, as in the Longshot PR (a .nx is a whole dump).

Tested (Windows 11 build 26300, .NET 8)

  • python -I tests/test_launcher_core.py --strict --longshot <Longshot checkout>: 1019 checks passed; the new check failed before the change (oot.nx not found).
  • dotnet build App -c Release: 0 warnings, 0 errors.
  • python -I tests/test_release.py: 1 failure and 5 errors, the same on main @ 8acdd00 on this PC (git-cliff and the release lookups).
  • Note for Windows contributors: with git's core.autocrlf=true, tests/fixtures/release/* are checked out with CRLF and test_launcher_core.py stops at "SHA256SUMS is not signed by a key this launcher trusts"; a .gitattributes with tests/fixtures/** -text would fix it (not in this PR).

Not tested: the launcher window by hand (Browse and drop with a .nx), and Linux. A build from a .nx with the Longshot change was run in Hookshot's tree (same code): the game builds and plays.

Players who keep their game as a `.nx` archive (NXFormat, made with `nxconvert pack-nup`; MagicBeanDev/Longshot#411) can't pick it in the launcher: it only finds, browses and accepts `.nup` files. With this PR the launcher treats a `.nx` like a `.nup` and hands it to `make_game.py --nup`, which reads both once the Longshot PR adding the reader is in (MagicBeanDev/Longshot#685). **Merge order:** after a Longshot release with that PR. With older tools, a `.nx` is refused by the check with nup.py's message ("not a .nup"), not a crash. **What changed** - `Core/GameFiles.cs`: `IsGameFile()` (a `.nup` or `.nx` by name) used by `Find` (Downloads, Desktop, ...) and `FromPath` (Browse, a drop). `*.nx` alone also matches `.nxs` on Windows (8.3 names), hence the name check. - `App/MainWindow.axaml.cs`, `App/ViewModels/ViewModelBase.cs`: `PickFileAsync` takes a list of patterns; `WizardViewModel` asks for `*.nup` and `*.nx`. - Strings: "Your game file (.nup or .nx)", "That is not a .nup or .nx file.", "Drop a .nup or .nx file, ...", and the home screen's "a .nup or .nx file, or its romfs and exefs folders". The translations write `.nup/.nx` where they had `.nup`. - `tests/launcher_core/ScreenChecks.cs`: a `.nx` is found, dropped and built from like a `.nup`; a `.nxs` is not. - `scripts/release.py`: `nx` added to `NOT_A_RELEASE_FILE`, as in the Longshot PR (a `.nx` is a whole dump). **Tested** (Windows 11 build 26300, .NET 8) - `python -I tests/test_launcher_core.py --strict --longshot <Longshot checkout>`: 1019 checks passed; the new check failed before the change (`oot.nx` not found). - `dotnet build App -c Release`: 0 warnings, 0 errors. - `python -I tests/test_release.py`: 1 failure and 5 errors, the same on `main` @ 8acdd00 on this PC (git-cliff and the release lookups). - Note for Windows contributors: with git's `core.autocrlf=true`, `tests/fixtures/release/*` are checked out with CRLF and `test_launcher_core.py` stops at "SHA256SUMS is not signed by a key this launcher trusts"; a `.gitattributes` with `tests/fixtures/** -text` would fix it (not in this PR). **Not tested:** the launcher window by hand (Browse and drop with a `.nx`), and Linux. A build from a `.nx` with the Longshot change was run in Hookshot's tree (same code): the game builds and plays.
feat(launcher): find, browse and drop .nx archives beside .nup files
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Compile and test (pull_request) Blocked by required conditions
40216fc1d3
HumanBean deleted branch feat/nx-format 2026-11-15 04:37:17 +00:00
Some checks are pending
CI / Conventional Commit title (pull_request) Blocked by required conditions
CI / Compile and test (pull_request) Blocked by required conditions
Some workflows are waiting to be reviewed.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!77
No description provided.