fix(portable): a portable launcher's builds follow its folder when it is renamed or moved (#140) #153

Merged
HumanBean merged 1 commit from HumanBean/LongshotLauncher:fix/portable-rename-140 into main 2026-11-16 21:45:44 +00:00
Owner

Renaming a portable launcher's folder, or a folder above it (D:\CGames\Zelda OOT → anything else), left every build "not built: its game is missing" and Play disabled until the old name came back, because builds.json kept the old absolute paths.

Fixes #140

What changes

  • builds.json records the home it was saved in (home; an older launcher reads past it).
  • At start, a portable launcher runs BuildRegistry.FollowHome: each build's folder (and its .nup/romfs/exefs) that was inside the launcher's folder is taken to the same place in the folder's new path, only when the old path is gone and the new one is there. A build elsewhere, and a copy of the folder whose original is still there, keep their paths.
  • A list saved before this (no home) finds its old home by the data folder's name (LongshotLauncher-data), so the reporter's existing list is fixed on first start of the new launcher.
  • Installed launchers are untouched.

Checks

  • python -I tests/test_launcher_core.py: 1378 checks passed (new: renamed folder follows, a build elsewhere stays, an old list without home, a copy whose original is still there).
  • python -I tests/test_release.py: OK.

No screen change, so no screenshots.

🤖 Generated with Claude Code

Renaming a portable launcher's folder, or a folder above it (`D:\CGames\Zelda OOT` → anything else), left every build "not built: its game is missing" and Play disabled until the old name came back, because `builds.json` kept the old absolute paths. Fixes #140 ## What changes - `builds.json` records the home it was saved in (`home`; an older launcher reads past it). - At start, a portable launcher runs `BuildRegistry.FollowHome`: each build's folder (and its `.nup`/romfs/exefs) that was inside the launcher's folder is taken to the same place in the folder's new path, **only** when the old path is gone and the new one is there. A build elsewhere, and a copy of the folder whose original is still there, keep their paths. - A list saved before this (no `home`) finds its old home by the data folder's name (`LongshotLauncher-data`), so the reporter's existing list is fixed on first start of the new launcher. - Installed launchers are untouched. ## Checks - `python -I tests/test_launcher_core.py`: 1378 checks passed (new: renamed folder follows, a build elsewhere stays, an old list without `home`, a copy whose original is still there). - `python -I tests/test_release.py`: OK. No screen change, so no screenshots. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(portable): a portable launcher's builds follow its folder when it, or a folder above it, is renamed or moved (#140)
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
4a20fba5dd
builds.json kept the absolute paths it had, so after renaming the launcher's
folder (or one above it) its builds showed "not built: its game is missing"
until the old name came back. The list now records the home it was saved in,
and a portable launcher takes each path that was in its folder to the same
place in the folder's new path, when the old one is gone and the new one is
there. A list saved before this finds its old home by the data folder's name.

Fixes #140

Co-Authored-By: Claude Opus 5.5 <[email protected]>
HumanBean changed title from WIP: fix(portable): a portable launcher's builds follow its folder when it is renamed or moved (#140) to fix(portable): a portable launcher's builds follow its folder when it is renamed or moved (#140) 2026-11-16 21:33:46 +00:00
HumanBean deleted branch fix/portable-rename-140 2026-11-16 21:45:44 +00:00
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!153
No description provided.