Skip to content

Build a game from its copy again when its setup step changes or its build folder is gone - #244

Merged
elripalda merged 2 commits into
elripalda:mainfrom
Xarishark:fix/rebuild-copy-setups
Nov 16, 2026
Merged

elripalda merged 2 commits into
elripalda:mainfrom
Xarishark:fix/rebuild-copy-setups

Conversation

@Xarishark

@Xarishark Xarishark commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

What this changes

A game set up from one copy of the game (game in 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:

  • A changed prepare.version. The developer guide says changing it makes players who already set up run the step again, but only games with named inputs checked it. The launcher now keeps the version a copy setup was built with (prepare_version in 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.
  • A build folder inside {install}. "The game built from your copy isn't there anymore" only looked at start paths 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 in start is 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 set prepare.version to "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.md says 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 (game in recomplauncher.json, like Hookshot and Longshot):

What happens Before After
The developer changes prepare.version (their build step changed, or it builds somewhere else now) Nothing. Play starts the old build, or, when the build moved, the builder on an empty folder: the game doesn't start. The next Play opens Easy Setup: "This game's setup changed since you built it. Pick your copy and it's built again." Once, then it plays.
The build folder is gone, and it was inside the install folder ({install}/Game) Not noticed. Play starts the builder on a missing folder. Play opens Easy Setup to build it again, like it already did for a folder under {home}.
The build folder is gone, and it was under {home} and the game keeps its settings file in it (Hookshot's hookshot_options.ini) Not noticed: Play wrote the settings file first, which made the folder again, so the check found it. Noticed, because the checks now run before any settings are written.
The launcher updates, nothing in the game changed No rebuild. Still no rebuild. Setups from before this kept no version, which counts as no version, and no copy-based game in the catalog sets one today.
The game updates (a new release of the recomp) The setup stays. The setup stays, and so does the version it was built with.
The player uses a build they made themselves (Use a Build You Already Have) Not asked. Still not asked.

From now on

This is a permanent change in how the launcher remembers a copy setup, not a one-off fix for Hookshot:

  • Every copy setup from this version on records the prepare.version it was built with, and keeps it through game updates.
  • A developer who changes their version gets exactly one rebuild for each player who already set up, on that player's next Play. A version that didn't change never asks, so there are no wrong or repeated rebuilds.
  • A launcher-built game whose build folder is missing is always built again instead of starting into nothing, wherever the folder is ({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

  • Issue: #215, Hookshot and Longshot building into ~/Games instead of the library folder.
  • Saves follow a moved save folder: #232 (merged, in Beta 55).
  • Hookshot's side: Hookshot/Hookshot#2980 (draft until a launcher release has this PR).
  • Longshot's side: MagicBeanDev/Longshot#1000 (draft until a launcher release has this PR).

Patch notes

  • Hookshot and Longshot now build into your library folder. Your next Play builds the game once more there, and your saves come along. The old build in your user folder (Games\Hookshot or Games\Longshot) isn't used anymore; once the new one plays, you can delete it. (Once their manifest changes are merged.)
  • A game whose setup changed asks to build again on Play, and so does one whose build folder is gone.

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 single game copy as well as from inputs. 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 in folders.game; when it's gone, Play builds it again.

How you tested it

  • cargo test on the Windows 11 VM: 612 passed, 0 failed, 1 ignored. New: a missing build folder inside {install} is noticed, another {install} path in start isn't taken for a build, and prepare.version changed / unset / no setup step.
  • node --test tests/*.test.cjs on Linux: 260 passed, 15 failed, the same 15 as unchanged main there.
  • tools/launcher-i18n.py --check: nothing for the new text in any language.
  • In the launcher (portable release build on Windows 11, Hookshot with the supported .nup):
    • a setup recorded under Hookshot's current manifest, then its new one (--out {install}/Hookshot, prepare.version "2"): Play opened Easy Setup with the new note;
    • the rebuild went into {install}/Hookshot and the library kept version "2"; Play then started the game from there, and again after restarting the launcher;
    • the build folder moved away: Play said it's built again and didn't create the folder; moved back, Play started the game.

Checklist

  • One change per pull request
  • No version bump or patch notes (those are done at release time)
  • If it changes what developers can write in recomplauncher.json: the schema and docs are updated too (nothing new to write; the docs say what prepare.version and an {install} build folder now do)

@elripalda
elripalda merged commit 2e19502 into elripalda:main Nov 16, 2026
5 checks passed
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
@Xarishark
Xarishark deleted the fix/rebuild-copy-setups branch November 23, 2026 23:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants