Repository navigation
Build a game from its copy again when its setup step changes or its build folder is gone - #244
Merged
Merged
Conversation
…nstall-folder build is gone
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
Merged
6 tasks done
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 game set up from one copy of the game (
gamein recomplauncher.json, like Hookshot and Longshot) counted as set up for as long as the launcher remembered the copy. Two things never sent its players back to Easy Setup:prepare.version. The developer guide says changing it makes players who already set up run the step again, but only games with namedinputschecked it. The launcher now keeps the version a copy setup was built with (prepare_versionin the library, carried over through game updates) and, when the manifest's version differs, Play opens Easy Setup with "This game's setup changed since you built it. Pick your copy and it's built again." A build the player chose themselves (Use a Build You Already Have) isn't asked. Setups from before this kept no version, which counts as no version: none of the 16 copy-based games in the catalog sets one today, so nobody rebuilds just for this update.{install}. "The game built from your copy isn't there anymore" only looked atstartpaths under{home},{documents},{local},{config}and{appdata}. It now also covers the folder the setup builds into inside the install folder (folders.game), and only that one, so a release file named instartis never taken for a missing build.Both checks now run before Play writes the game's settings. Writing them first put the settings file (often in the built folder, like
hookshot_options.ini) back, which created the missing folder again and hid it, for{home}builds too.This is what lets Hookshot and Longshot build into the player's library folder instead of
~/Games(#215): their draft PRs move the build to{install}/<Game>and setprepare.versionto"2", and existing players are then asked once to build again, with their saves following through #232.The note is in every language.
docs/DEVELOPERS.mdsays the version works for copy setups too, with an example of building into{install}. No schema change: nothing new to write.Before and after
For a game set up from one copy of the game (
gamein recomplauncher.json, like Hookshot and Longshot):prepare.version(their build step changed, or it builds somewhere else now){install}/Game){home}.{home}and the game keeps its settings file in it (Hookshot'shookshot_options.ini)From now on
This is a permanent change in how the launcher remembers a copy setup, not a one-off fix for Hookshot:
prepare.versionit was built with, and keeps it through game updates.{home},{documents},{local},{config},{appdata}, or its own folder inside{install}).So any recomp can move where it builds, or change how it builds, by changing its manifest, and its players are taken through it once, with their saves following (#232).
Related
~/Gamesinstead of the library folder.Patch notes
Games\HookshotorGames\Longshot) isn't used anymore; once the new one plays, you can delete it. (Once their manifest changes are merged.)For the website (SDK guide)
Not for players. Under
prepare.version: changing it now makes every player who set up run the step again on their next Play, for games set up from a singlegamecopy as well as frominputs. And a builder can build into the install folder: pass it{install}/YourGame(like--out {install}/YourGame), start from the same folder and list it first infolders.game; when it's gone, Play builds it again.How you tested it
cargo teston the Windows 11 VM: 612 passed, 0 failed, 1 ignored. New: a missing build folder inside{install}is noticed, another{install}path instartisn't taken for a build, andprepare.versionchanged / unset / no setup step.node --test tests/*.test.cjson Linux: 260 passed, 15 failed, the same 15 as unchangedmainthere.tools/launcher-i18n.py --check: nothing for the new text in any language..nup):--out {install}/Hookshot,prepare.version"2"): Play opened Easy Setup with the new note;{install}/Hookshotand the library kept version "2"; Play then started the game from there, and again after restarting the launcher;Checklist
recomplauncher.json: the schema and docs are updated too (nothing new to write; the docs say whatprepare.versionand an{install}build folder now do)