Repository navigation
Restore saves into a save folder the developer moved - #232
Merged
elripalda merged 1 commit intoNov 16, 2026
Merged
Conversation
msxdan
pushed a commit
to msxdan/Hookshot
that referenced
this pull request
Nov 16, 2026
…r, not ~/Games (NotRexed#2980) **Please don't merge until RecompLauncher ships [elripalda/RecompLauncher#232](elripalda/RecompLauncher#232 The launcher reads this file from `main`, so merging it changes every player's setup at once. Without NotRexed#232, a player's restored saves go back to `~/Games/Hookshot/user` and the new build starts without them. ## Why Players who install Hookshot through RecompLauncher get the game built into `~/Games/Hookshot` (`C:\Users\<name>\Games\Hookshot` on Windows), whatever drive they picked for their library. `recomplauncher.json` runs `--cli --prepare` without `--out`, so `make_game.py` falls back to its default. The installer is on the drive they chose, but the build (25 GB here) goes to the system drive without asking. Reported in [RecompLauncher issue 215](elripalda/RecompLauncher#215). ## What changed - `prepare.args` passes `--out {install}/Hookshot`, so the game is built in the launcher's install folder, next to HookshotBuilder. That's the same `Hookshot` folder the builder uses as its portable default. - `start`, `config`, `saves`, `folders.saves` and `folders.game` move from `{home}/Games/Hookshot` to `{install}/Hookshot`. The save list keeps the same number of entries in the same order, so RecompLauncher's restore (with NotRexed#232) puts a copy made from the old folder into the new one. - `prepare.version` is `"2"`, so players who already set up are asked to build once more, this time into their library folder. Builds already in `~/Games/Hookshot` stay where they are until the player deletes them. - `tests/test_recomplauncher_json.py`: `test_builds_into_the_launchers_game_folder` checks that the folder `--out` builds into is the one `start` plays and the one the settings, saves and game folder point at, and that no `{home}/Games` path is left. ## How it was tested - The new test fails on `main` (`ERROR: test_builds_into_the_launchers_game_folder`) and passes with the change. - `python -I -B tests/run_all.py` on Linux (Bazzite): 590 passed, 12 failed, 104 skipped. The same 12 fail on unchanged `main` (missing `numpy` and `zstandard` on that machine, and tests behind the source: `test_auto_settings`, `test_dev_packs`, `test_hdr_encode`, `test_missing_nup` and others). `test_link_skip` passes when run on its own. - The manifest validates against `recomplauncher.com/schema/recomplauncher.json` with no errors. - A real build on Windows 11 with an RTX card, through RecompLauncher's Easy Setup (a portable launcher on `F:`, the library on `F:`, the Builder's home set to a folder on `F:` with `HOOKSHOT_SETUP_BASE`), from the supported `.nup` (`0400486024DEC000`, v131072). The launcher filled in `--out F:\rl-test-215\library\hookshot\Hookshot`, the Builder (v2.3.2) built into it, and `hookshot.exe --prepare-shaders` ran from `F:\rl-test-215\library\hookshot\Hookshot\bin`. Play then started `HookshotBuilder.exe --play F:\rl-test-215\library\hookshot/Hookshot`, and the game ran from `...\Hookshot\bin\hookshot.exe` with its log, `hookshot_options.ini` and `user` folder in the same place. Nothing was written to `~/Games`. ## Not tested - Linux and the AppImage with a real build (only the game-free suite ran there). - An existing `~/Games/Hookshot` install moving over through a real launcher update. - DLSS and XeSS ticked during the build.
This was referenced Nov 16, 2026
Merged
github-actions Bot
pushed a commit
to juliotec/L-Upstream
that referenced
this pull request
Nov 16, 2026
…r, not ~/Games (#1000) **Ready for review.** This needs RecompLauncher 0.90 Beta 56, which has [elripalda/RecompLauncher#244](elripalda/RecompLauncher#244): that's what sends players who already built into `~/Games/Longshot` back to Easy Setup on their next Play (the `prepare.version` bump below), so they build into the new folder. Saves follow through [#232](elripalda/RecompLauncher#232) (Beta 55). The launcher reads the `recomplauncher.json` a release ships before the one on `main`, so this reaches players with the first Longshot release after the merge. Hookshot's same change is already merged ([Hookshot/Hookshot#2980](https://git.notrexed.dev/Hookshot/Hookshot/pulls/2980)). ## Related - RecompLauncher issue: [elripalda/RecompLauncher#215](elripalda/RecompLauncher#215) - Launcher, rebuild when the setup step changes or the build folder is gone: [elripalda/RecompLauncher#244](elripalda/RecompLauncher#244) (needed before this merges) - Launcher, saves follow a moved save folder: [elripalda/RecompLauncher#232](elripalda/RecompLauncher#232) (in Beta 55) - The same change for Hookshot: [Hookshot/Hookshot#2980](https://git.notrexed.dev/Hookshot/Hookshot/pulls/2980) ## Why Players who install Longshot through RecompLauncher get the game built into `~/Games/Longshot` (`C:\Users\<name>\Games\Longshot` on Windows), whatever drive they picked for their library. `recomplauncher.json` runs `--cli --prepare` without `--out`, so `make_game.py` falls back to its default. LongshotBuilder is on the drive they chose, but the build goes to the system drive without asking. Reported for Hookshot, which has the same setup, in [RecompLauncher issue 215](elripalda/RecompLauncher#215). ## What changed - `prepare.args` passes `--out {install}/Longshot`, so the game is built in the launcher's install folder, next to LongshotBuilder. - `start`, `config`, `saves`, `folders.saves` and `folders.game` move from `{home}/Games/Longshot` to `{install}/Longshot`. The save list keeps the same number of entries in the same order, so RecompLauncher's restore (with #232) puts a copy made from the old folder into the new one. - `prepare.version` is `"2"`, so players who already set up are asked to build once more, this time into their library folder. Builds already in `~/Games/Longshot` stay where they are until the player deletes them. - `tests/test_recomplauncher_json.py`: `test_builds_into_the_launchers_game_folder` checks that the folder `--out` builds into is the one `start` plays and the one the settings, saves and game folder point at, and that no `{home}/Games` path is left. ## How it was tested - The new test fails on `main` (`ERROR: test_builds_into_the_launchers_game_folder`) and passes with the change. - `python -I -B tests/run_all.py` on Linux (Bazzite): 535 passed, 23 failed, 93 skipped. Unchanged `main` fails the same 23 on that machine (missing Python packages and tools there, and tests behind the source), so none come from this change. - The manifest validates against `recomplauncher.com/schema/recomplauncher.json` with no errors. - A real build on Windows 11 with an RTX card, through RecompLauncher's Easy Setup (a portable launcher on `F:`, the library on `F:`, the Builder's home set to a folder on `F:` with `LONGSHOT_SETUP_BASE`), from the supported `.nup` (build `e0f3ccfa`), with Longshot `nightly-189-aa95d35f`. The release's own `recomplauncher.json` was swapped for this one. The Builder built into `F:\rl-test-215\library\longshot\Longshot`, and Play started `LongshotBuilder.exe --play F:\rl-test-215\library\longshot/Longshot`. The game ran from `...\Longshot\bin\longshot.exe` with its log, `longshot_options.ini` and `user` folder in the same place. Nothing was written to `~/Games`. ## Not tested - Linux and the AppImage with a real build (only the game-free suite ran there). - An existing `~/Games/Longshot` install moving over. The same move was tested end to end with Hookshot, whose manifest is the same apart from the names (see Hookshot/Hookshot#2980): Easy Setup opened on Play, the rebuild went into the install folder, and the save copy restored into the new `user` folder. - DLSS and XeSS ticked during the build. Reviewed-on: https://git.magicbean.dev/MagicBeanDev/Longshot/pulls/1000
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this changes
A copy of a game's saves remembers the folders it came from, and restoring it (by hand, or on Play when the cloud copy is brought back because the save folders are empty) wrote into those folders. When a developer moves their save folder in a later release, a copy from before goes back to the old folder and the game, reading the new one, finds no save. Every start after that sees an empty folder again.
Hookshot is the case that needs it (#215): its
recomplauncher.jsonbuilds into{home}/Games/Hookshot, not the library folder. The fix for that belongs in Hookshot's manifest (--out {install}/Gameand its paths moved there), and this makes the saves follow when it does.Restore now puts the copy's folder N into the game's folder N, only when:
{install}), and a folder isn't mapped onto a*pattern or the other way round.Otherwise it restores exactly as before. Folders the player picked keep their own mapping, unchanged. The launcher's log says when it followed a moved folder.
docs/DEVELOPERS.mdgets a short paragraph undersaves: a developer can move the folder in a later release, keeping the same number of entries in the same order. No new field, so nothing changes in the schema.How you tested it
On the Windows 11 VM, on main at Beta 54:
cargo test: 600 passed, 0 failed, 1 ignored. Four new tests insaves.rs: a moved developer folder is followed; it isn't when the new folder was only noticed, when the count changed, or when the folders were only reordered.node --test tests/*.test.cjs(no UI changes)npm run dev)Checklist
recomplauncher.json: the schema and docs are updated too (nothing new to write; the docs say how a moved save folder is restored)