feat(home): builds and saves follow a player between the installed and a portable launcher #189

Open
madebyjordan wants to merge 2 commits from madebyjordan/LongshotLauncher:feat/other-launcher-data into main
Member

A player who goes from the installed launcher to a portable one, or back, finds no builds and no saves: each launcher keeps its own list and, on Windows, its own save folder. The only way back was Manage saves > Import > Another folder, for saves only; a build folder could not be listed at all.

Related: #141 (a portable launcher whose builds dropped off its list; fixed separately in #187).

What changes

  • A portable launcher with no build offers the installed launcher's, once, on the home: Your installed launcher's builds and saves, Not now or Use them.

    • Builds are listed where they are; nothing is moved or copied.
    • Saves (%APPDATA%\Longshot\save) are copied in only when this launcher's save folder has no file yet.
    • Not now is remembered (InstalledLauncherAsked).
  • Add a build folder… on the home, beside Build another version. The empty home also has Built it already? Add its folder…. It takes:

    • a game folder;
    • a folder of game folders (a builds folder);
    • a launcher's data folder (LongshotLauncher-data, or the folder it sits in). From that, it takes that launcher's builds whose game is there, the games in its own builds folder that its list lost, and its saves when this launcher has none yet.

    Only Longshot's own games: a release's or a nightly's version, as #187's relisting takes. Never a Hookshot 2.x game or one with no version.

  • A save is never copied over another. These all count as a save:

    • any file in the save folder;
    • a save that a gather cut short left set aside beside it (.save.longshot-old);
    • a linked save folder.

    The home then says to import it from Manage saves, which backs up first. The same saves copied before say nothing.

  • How the copy is made:

    • Nothing is copied while Longshot runs.
    • It holds the gather lock, as a gather does (the start's, Play's, a Delete's), since they share the staging folder, and checks again inside it.
    • A save a cut-short gather left aside is put back first, so Manage saves shows it.
    • The copy is compared file for file with the source before it goes into place.
    • It is made beside the save folder and renamed into place. An empty save folder is removed folder by folder, never recursively.
    • mouse_sens.txt and present.txt come too if missing.
  • When the home offers what:

    • The offer names saves only when they could be copied in. Use them is off while a version is being deleted, and if another gather holds the saves the offer stays for another try.
    • Add a build folder… is off while a version is being deleted, because its gather shares the save folder.
    • Picking a folder whose games are all listed already says so.
  • The other launcher's builds.json is only read (BuildRegistry.Peek). A broken one counts as no list, and nothing is written beside it, unlike Load.

  • On Linux every launcher already shares one save folder, so only builds are taken.

  • Texts and docs: new texts in all 12 catalogs, with es-419's own words where they differ. README and docs/saves.md explain switching.

Screenshots

In the comment below: home (the empty home's new link), home-installed-offer, home-add-folder (tools/screenshots).

Testing

Windows 11, .NET SDK 10.0.404, TEMP on its long path.

  • python -I tests/test_launcher_core.py: 1908 checks passed (rebased onto main with #182, #186 and #187).
  • What OtherLauncherChecks covers:
    • The installed launcher found from a portable one, but not by itself.
    • Builds whose game is there, listed with the default and channel.
    • Saves copied into an empty folder with the player's files; the originals stay.
    • Taken twice: no row twice, and no save over a save.
    • A save folder with any file is left alone.
    • While Longshot runs: builds listed, saves not copied.
    • A portable data folder, picked itself or by the folder it sits in, including games its list lost.
    • The installed home picked.
    • A folder with no list.
    • GamesIn.
    • A broken list read and left untouched.
    • Linux: no saves.
    • A Hookshot 2.x game or one with no version is never taken.
    • A save set aside by a cut-short gather counts as a save.
    • The gather lock held elsewhere: nothing copied.
    • A copy that fails part way: the save folder as it was, no staging left.
    • A save folder with only empty folders: the copy takes its place.
    • A list with null rows reads as none.
  • Mutations caught:
    • The empty-save rule removed.
    • The running rule removed.
    • The lock not taken.
    • The set-aside save ignored.
    • The version filter removed.
  • python -I tests/test_release.py: 9 errors on this PC, the same without this change (signing tools); release code untouched.
  • Reviewed cold twice by a second agent (code only). The first found the missing gather lock and the set-aside save; both are fixed here. The second approved; its suggestions are in.

Not tested:

  • The offer and the folder picker in a real window. The screenshots are headless.
  • A real installed launcher beside a portable one on a USB drive.

Known, not changed here:

  • A listed build in another launcher's folder can still be updated or deleted by either launcher, and each keeps its own row for it. The other launcher's row details (name, dump paths, upscalers) are not carried over, so an update asks for the dump again.
  • Delete's checks protect only this launcher's own home and saves, not a portable launcher's data inside a listed game folder.

🤖 Generated with Claude Code

A player who goes from the installed launcher to a portable one, or back, finds no builds and no saves: each launcher keeps its own list and, on Windows, its own save folder. The only way back was *Manage saves > Import > Another folder*, for saves only; a build folder could not be listed at all. Related: #141 (a portable launcher whose builds dropped off its list; fixed separately in #187). ## What changes - **A portable launcher with no build offers the installed launcher's**, once, on the home: *Your installed launcher's builds and saves*, **Not now** or **Use them**. - **Builds** are listed where they are; nothing is moved or copied. - **Saves** (`%APPDATA%\Longshot\save`) are copied in only when this launcher's save folder has no file yet. - **Not now** is remembered (`InstalledLauncherAsked`). - **Add a build folder…** on the home, beside *Build another version*. The empty home also has *Built it already? Add its folder…*. It takes: - a game folder; - a folder of game folders (a builds folder); - a launcher's data folder (`LongshotLauncher-data`, or the folder it sits in). From that, it takes that launcher's builds whose game is there, the games in its own builds folder that its list lost, and its saves when this launcher has none yet. Only Longshot's own games: a release's or a nightly's version, as #187's relisting takes. Never a Hookshot 2.x game or one with no version. - **A save is never copied over another.** These all count as a save: - any file in the save folder; - a save that a gather cut short left set aside beside it (`.save.longshot-old`); - a linked save folder. The home then says to import it from *Manage saves*, which backs up first. The same saves copied before say nothing. - **How the copy is made:** - Nothing is copied while Longshot runs. - It holds the gather lock, as a gather does (the start's, Play's, a Delete's), since they share the staging folder, and checks again inside it. - A save a cut-short gather left aside is put back first, so *Manage saves* shows it. - The copy is compared file for file with the source before it goes into place. - It is made beside the save folder and renamed into place. An empty save folder is removed folder by folder, never recursively. - `mouse_sens.txt` and `present.txt` come too if missing. - **When the home offers what:** - The offer names saves only when they could be copied in. *Use them* is off while a version is being deleted, and if another gather holds the saves the offer stays for another try. - *Add a build folder…* is off while a version is being deleted, because its gather shares the save folder. - Picking a folder whose games are all listed already says so. - **The other launcher's `builds.json` is only read** (`BuildRegistry.Peek`). A broken one counts as no list, and nothing is written beside it, unlike `Load`. - **On Linux** every launcher already shares one save folder, so only builds are taken. - **Texts and docs:** new texts in all 12 catalogs, with es-419's own words where they differ. README and docs/saves.md explain switching. ## Screenshots In the comment below: `home` (the empty home's new link), `home-installed-offer`, `home-add-folder` (tools/screenshots). ## Testing Windows 11, .NET SDK 10.0.404, TEMP on its long path. - `python -I tests/test_launcher_core.py`: 1908 checks passed (rebased onto main with #182, #186 and #187). - **What `OtherLauncherChecks` covers:** - The installed launcher found from a portable one, but not by itself. - Builds whose game is there, listed with the default and channel. - Saves copied into an empty folder with the player's files; the originals stay. - Taken twice: no row twice, and no save over a save. - A save folder with any file is left alone. - While Longshot runs: builds listed, saves not copied. - A portable data folder, picked itself or by the folder it sits in, including games its list lost. - The installed home picked. - A folder with no list. - `GamesIn`. - A broken list read and left untouched. - Linux: no saves. - A Hookshot 2.x game or one with no version is never taken. - A save set aside by a cut-short gather counts as a save. - The gather lock held elsewhere: nothing copied. - A copy that fails part way: the save folder as it was, no staging left. - A save folder with only empty folders: the copy takes its place. - A list with null rows reads as none. - **Mutations caught:** - The empty-save rule removed. - The running rule removed. - The lock not taken. - The set-aside save ignored. - The version filter removed. - `python -I tests/test_release.py`: 9 errors on this PC, the same without this change (signing tools); release code untouched. - **Reviewed cold** twice by a second agent (code only). The first found the missing gather lock and the set-aside save; both are fixed here. The second approved; its suggestions are in. **Not tested:** - The offer and the folder picker in a real window. The screenshots are headless. - A real installed launcher beside a portable one on a USB drive. **Known, not changed here:** - A listed build in another launcher's folder can still be updated or deleted by either launcher, and each keeps its own row for it. The other launcher's row details (name, dump paths, upscalers) are not carried over, so an update asks for the dump again. - Delete's checks protect only this launcher's own home and saves, not a portable launcher's data inside a listed game folder. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(home): builds and saves follow a player between the installed and a portable launcher
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 6s
972793cbee
An installed launcher and a portable one each keep their own list of builds (builds.json in their home) and, on Windows,
their own save folder (%APPDATA%\Longshot, or the portable one's LongshotLauncher-data\user). A player who went from one to
the other found no build and no save, and the only way back was Saves > Import > Another folder, for saves only: no way to
list a build folder at all.

- A portable launcher that starts with no build offers, once, the installed launcher's builds and saves on this PC (its
  default home and %APPDATA%\Longshot): Use them lists its builds where they are, nothing moved or copied, and copies its
  save folder in when this one holds no file yet; Not now is remembered (InstalledLauncherAsked).
- Add a build folder... on the home (beside Build another version, and on the empty home as "Built it already? Add its
  folder..."): a game folder, a folder of them (a builds folder), or a launcher's data folder (LongshotLauncher-data, or the
  folder it is in): that launcher's builds whose game is there, the games in its builds folder its list lost, and its saves
  where this launcher has none yet.
- A save is never copied over another: any file in the save folder counts, and so does a save a gather cut short set aside
  beside it (.save.longshot-old), or a linked save folder. The home says Manage saves imports it, after a backup; the same
  saves copied before say nothing. Not while Longshot runs either. The copy holds the gather lock, as a gather does (the
  start's, Play's, a Delete's: they share the staging folder), puts back a save a gather cut short set aside, checks again
  inside it, is made beside, compared file for file, and renamed into place; an empty save folder goes folder by folder, never recursively. The player's own files (mouse_sens.txt,
  present.txt) come too when missing. The offer names the saves only when they could be copied in.
- Add a build folder... is off while a version is deleted (its gather shares the save folder), not while the update check
  runs; picking a folder whose games are all listed says so.
- The other launcher's builds.json is only read (BuildRegistry.Peek): a broken one is no list, and nothing is written
  beside it, as Load would. On Linux every launcher's builds already share one save folder: builds only.
- New texts in all 12 catalogs, es-419's own words where they differ; README and docs/saves.md say how switching works;
  screenshot scenes home-installed-offer and home-add-folder.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Screenshots (tools/screenshots, headless, Windows layout):

home: the empty home's new link
home

home-installed-offer: a portable launcher with no build, on a PC whose installed launcher has some
home-installed-offer

home-add-folder: Add a build folder... beside Build another version
home-add-folder

Screenshots (tools/screenshots, headless, Windows layout): **home**: the empty home's new link ![home](https://git.magicbean.dev/attachments/eae18281-9a2c-4da4-b4d7-29f01fbff69e) **home-installed-offer**: a portable launcher with no build, on a PC whose installed launcher has some ![home-installed-offer](https://git.magicbean.dev/attachments/c5c14790-090a-4a8c-b908-704adb512e0e) **home-add-folder**: Add a build folder... beside Build another version ![home-add-folder](https://git.magicbean.dev/attachments/e491ab79-668a-4405-af3f-7f5aad18e9c3)
Collaborator

Possibly related, for context:

  • PR #185 feat(saves): Open saves folder and Open builds folder buttons — Overlapping saves/builds folder access and home UI
Possibly related, for context: - PR #185 feat(saves): Open saves folder and Open builds folder buttons — Overlapping saves/builds folder access and home UI
madebyjordan force-pushed feat/other-launcher-data from 972793cbee
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 6s
to 6e99e1aa03
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
2026-11-17 22:10:10 +00:00
Compare
Author
Member

Rebased onto main (after #186 and #187; only the catalogs' ends and the check list conflicted, both kept), and one commit from a review of the PR:

  • Add a build folder takes only Longshot's own games: a release's or a nightly's version, as #187's relisting does. Before, it could list a Hookshot 2.x game (a clean break) or one with no version.
  • Use them is refreshed with the other build buttons when the launcher's own update starts or ends.

1890 checks pass on Windows; removing the version filter fails a check.

Overlap: #184 moves instances to builds/<track>/<version>. OtherLauncher.GamesIn and Read (a portable launcher's own builds folder) look one level down, like Leftovers.Relist from #187, so whichever merges second adapts. If #184 lands first, I'll switch this to its InstanceFolders.Folders.

Rebased onto main (after #186 and #187; only the catalogs' ends and the check list conflicted, both kept), and one commit from a review of the PR: - **Add a build folder takes only Longshot's own games:** a release's or a nightly's version, as #187's relisting does. Before, it could list a Hookshot 2.x game (a clean break) or one with no version. - **Use them** is refreshed with the other build buttons when the launcher's own update starts or ends. 1890 checks pass on Windows; removing the version filter fails a check. **Overlap:** #184 moves instances to `builds/<track>/<version>`. `OtherLauncher.GamesIn` and `Read` (a portable launcher's own builds folder) look one level down, like `Leftovers.Relist` from #187, so whichever merges second adapts. If #184 lands first, I'll switch this to its `InstanceFolders.Folders`.
madebyjordan force-pushed feat/other-launcher-data from 6e99e1aa03
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 3s
to 0467a56ab0
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 6s
2026-11-17 22:12:15 +00:00
Compare
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 6s
This pull request doesn't have enough approvals yet. 0 of 1 approvals granted.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u 'feat/other-launcher-data:madebyjordan-feat/other-launcher-data'
git switch 'madebyjordan-feat/other-launcher-data'
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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!189
No description provided.