Skip to content

After an update that needs a new build, Play stays Play and finishes the update in a small window - #340

Merged
elripalda merged 8 commits into
elripalda:mainfrom
Xarishark:feat/update-rebuild
Nov 20, 2026
Merged

elripalda merged 8 commits into
elripalda:mainfrom
Xarishark:feat/update-rebuild

Conversation

@Xarishark

Copy link
Copy Markdown
Collaborator

When a game's update changes its setup step (a new prepare.version: Longshot will put its release version there, as #333's guide line asks of every game whose setup step builds the game), the launcher used to turn the game page's Play into Set up, and Play opened the full Easy Setup from the start ("Pick your copy of the game" in Big Picture), as if the game had never been set up. It now reads as the last part of the update.

What

  1. The setup status says why it's built again (changed): its setup step changed since the build (an update). A build that never finished keeps Easy Setup's Build It Again, as before. Sent to the page only when true.
  2. Play stays Play. On the game page, "Needs a new build after the update" hangs under it (it takes no room, so the buttons don't move). Big Picture's game menu says the same under Play.
  3. Play opens a small "Finish the Update" window (ui/update-build.js) instead of Easy Setup: what happens ("{name} v3.3.0 needs a new build of the game", and that the copy isn't needed when the step kept what it needs, keeps_copy), any option the update added (marked New, on or off as its developer set it, as in Easy Setup; it answers Play's new-option question too, so that isn't asked twice), and Build Now. It runs Easy Setup's own setup (suBegin and the setup events), drawn small: the build's own line ("Compiling…"), the bar, and the copy's read and check when it builds from the copy. A game brought in by hand (not from the catalog) gets it too.
  4. The game starts when the build is done, as Play asked. Hide (or the X, or Escape) lets it go on in the background without Easy Setup's three-way question; the launcher then says "{name} is ready to play!" instead of starting it, and Play meanwhile shows that build, not a second one.
  5. Big Picture: the option questions and Finish the Update as Big Picture dialogs, then the build on its own setup screen, and the game starts when it's done.
  6. Before You Play doesn't ask for the copy while it builds from what the step kept: it says "Your copy isn't needed: it's built again from what it kept last time."
  7. An option an update added is asked about with the copy gone, when the step kept what it needs (new_prepare_options and the page's newPrepOpts counted only a copy that's there).
  8. Docs: prepare.version in the developer guide says what players see now.

New texts in every language (12). tools/launcher-i18n.py --check finds nothing new (it already fails on main; this branch only takes "Hide" off its unused list).

Tests

  • cargo test on Linux (Bazzite VM, distrobox): 894 passed, 1 ignored. New: the status's changed (an update's change says it, an unfinished build doesn't, and it's only sent when true), and a new option is new with the copy gone when the step kept it (it fails without the fix).
  • cargo test on Windows 11 (VM): 829 passed, 1 ignored.
  • node --test tests/*.test.cjs: 554 passed on Linux; 554 run, 543 passed, 0 failed, 11 skipped on Windows (Linux-only). New tests/update-build.test.cjs: which games get Play with the line and which keep Set up, the line only on the game page and on both Play buttons, Play opening the window before the new-option question and after the core's rebuild error, what the window says it builds from, the options starting as their developer set them, a game brought in by hand, Before You Play's copy row, the run being Easy Setup's and the game starting when built, Hide, Play during a hidden build, the kept copy and new options, Big Picture's menu line and build, every text in every language.
  • In the real app on Linux (Bazzite VM, driven with tauri-driver): a made-up game set up at v0.9 with a setup step that keeps what it needs (keeps_copy, the copy then gone), updated to v1.0 with a new prepare.version and a new option (AMD FSR 4, on by default):
    • the game page: Play, "Needs a new build after the update" under it, and Before You Play saying "Your copy isn't needed: it's built again from what it kept last time." (it asked to insert the copy before this branch's last fix);
    • Play: Finish the Update, "v0.9 → v1.0", "Keeper v1.0 needs a new build of the game. Your copy isn't needed: it's built again from what it kept last time. Your other choices stay as they were.", AMD FSR 4 marked New and on, "Ready to build.", Build Now;
    • Build Now: "Building the game · Compiling", then "Setting it up", the bar, "The game starts when it's done." and Hide;
    • when built: the window closed and the game started; the status is built and ready, FSR is saved as on, and the game's builder got --prepare … --fsr.

Patch notes (players)

  • After an update that needs the game built again, Play stays Play. It finishes the update in a small window and starts the game when it's built, instead of starting Easy Setup over.

For the website (SDK guide)

  • Under prepare.version: when it changes, the game's page keeps Play (with "Needs a new build after the update" under it), and the next Play opens a small Finish the Update window that builds it again (from what the step kept with keeps_copy, or from the player's copy), asks about options the update added, and starts the game. A game set up from named inputs opens Easy Setup for it.

A rebuild is needed when the setup step changed since the build (a new prepare.version, which comes with an update) or when the build didn't finish. changed tells the two apart, so Play can say it's finishing the update instead of opening Easy Setup from the start. An unfinished build keeps Build It Again.
… step kept it

new_prepare_options counted a game as set up only while the player's copy was there. With prepare.keeps_copy the step builds again from what it kept, so a player who deleted their copy is set up all the same, and an option an update added (FSR, say) is new to them too.
A test that the status sends changed only when it's true, so a page that doesn't know it sees nothing new.
…the update in a small window

The page's Play stays, with "Needs a new build after the update" hung under it (it takes no room, so the buttons don't move), and Big Picture's menu says the same. Play opens Finish the Update (ui/update-build.js) instead of Easy Setup: what it's built from, any option the update added, and Build Now. It runs Easy Setup's own setup, drawn small, and starts the game when it's built. Hide lets it go on in the background without Easy Setup's question, and Play meanwhile shows that build. Big Picture asks the same in its dialogs and builds on its own setup screen. The page's new options count a kept build as set up too. 12 new texts in every language.
Play stays, with a line under it, and opens Finish the Update, which builds it again and starts the game. A game set up from named inputs opens Easy Setup for it, as before.
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