Repository navigation
A game writes everything to {data}, setup gets a temp folder of its own, and the SDK rules for both - #309
Merged
Conversation
…lder of its own
{data} is userdata inside the game's folder (not data: TotK's release ships one). It fills in like {install} everywhere, and the game and its setup step get it as RECOMPLAUNCHER_DATA (as Windows names it through Proton). The launcher makes it before either starts, for any game whose developer wrote it a recomplauncher.json, set up by hand too. Save places in it are written as {data}/... .
The setup step also gets RECOMPLAUNCHER=1 and its version, as Play gives, and prepare.env for its own variables (with named inputs filled in, like prepare.args). TMPDIR, TEMP and TMP point to <game>/.recomplauncher-tmp, made empty for each run on the game's drive and taken away however the run ends. A folder by that name the launcher didn't make (no mark inside, or a link) is never emptied: setup stops and says so. Play keeps the system's temp folder.
The step starts only with 1 GB free on the game's drive. On Windows, a step that says a path was too long, or an install or move that hits the path limit, says to use a library folder with a shorter path or turn on Windows' long paths setting, which the launcher never changes. Schema, developer guide and every language updated.
…work folders
A save place around them (all of {data}, or the game's whole folder) no longer takes in the setup step's .recomplauncher-tmp, the old release an update sets aside (.recomplauncher-game-update) or tmp folders; cache folders ({data}/cache) were already left out. Tests show it, and that moving a game, by rename or by copy to another drive, carries its {data} caches and saves, into a library folder deeper than Windows' old 260-character limit too.
Deleting a game's folder deleted the saves in it too, {data}/saves included. Now a copy of them is made first, for the game and each of its games with saves of their own, beside the library (<library>/.backups/<game>/saves, which uninstalling leaves) or in the player's chosen folder, and the Saves tab puts it back after a reinstall. If the copy can't be made, the folder stays and the player is told.
On the desktop it's a tick under the folder one, on by default. Big Picture has the same choice as items: delete the folder keeping a copy of the saves, delete the folder and its saves, or keep the folder. Every language updated.
…tside {install} and {data}
Both in yellow, never stopping the game. prepare.done is asked for only when there's a step and it builds from the player's copy (a game copy or named inputs): without it the launcher can't tell the build is there. The other names the saves, settings files, folders, arguments and variables that use {home}, {local}, {config}, {documents} or {appdata}. prepare.env names that can't be set are named too. The warning about a separate {game} argument waits for prepare.keeps_copy, which isn't on main yet.
…e build, source archives say source Under Releases that install cleanly: on Linux, one folder built portably (a GitHub Actions ubuntu:22.04 container, or the Steam Runtime's sniper SDK), packed both as a .tar.gz and an AppImage; a source archive uploaded by hand says source in its name so it's never taken for the game; and nothing goes into Program Files without a proper installer and uninstaller (MSIX) or a package manager.
Brings in Beta 65, the game update rollback (elripalda#303), keeps_copy (elripalda#308) and the developer guide additions (elripalda#311). Every language file gained texts on both sides at its end; both are kept. The setup step keeps its temp folder, room check and data folder, and takes main's prepare_args, so a run without the copy (keeps_copy) gets them too. The "no prepare.done" warning stays quiet for a keeps_copy step, which already gets its own more exact one.
… naming it
keeps_copy leaves out every argument with {game} in it when the copy is gone. An
env value naming {game} would otherwise be set to an empty path, so it is left out
the same way. The guide and schema say so beside the rule for arguments.
…es once
The vendor SDK steps said the setup step gets no environment variables. It now gets
RECOMPLAUNCHER_DATA, prepare.env and a temp folder of its own, so the SDK goes in the
temp folder or {data}/cache, and the prepare.options bullet points there instead of
repeating it. Recomp Standards' release naming and "portable when it can be" bullets
now name the tarball and AppImage pair and the one data folder, and point to the
sections that have the details.
A step that printed a path warning once and stopped later for another reason showed the player only the long-path advice. The message now has the step's last line under it, and the UI translates a launcher text whose first line it knows while leaving the program's own words as they were. MAX_PATH no longer counts as the path limit: it's a constant's name, which a build can print in a warning that stopped nothing.
The copy of the saves is made only when the folder is deleted, so with "Also delete its folder" unticked the tick did nothing. It now greys out until that box is ticked.
11 catalog projects already write or ship a top-level userdata folder: six by the
launcher's own profiles (on Windows UserData is the same folder), and RingOut, GR2port,
DPRecomp, WWE 2K14 Recomp and Crash 2 Recompiled in their release zips. {data} would
have landed in their own folder. No project writes or ships recompdata. {data} and
RECOMPLAUNCHER_DATA keep their names; no release has made a userdata folder yet, so
nothing moves.
… flag turns off From a front end's suggestions (elripalda#313). The setup step runs with no window and never asks anything or waits for input: what it needs comes from its arguments and environment. This replaces the bare "Don't open a window". A game that updates itself skips that under RECOMPLAUNCHER, and if only a flag turns it off, the flag goes in start.args. The "Never update yourself" rule in "Where your game writes" points there instead of repeating it.
…nly for Mac apps The "Never update yourself" rule sent every developer to the Mac apps section for the start.args flag. The flag sentence now sits in the rule itself, and the Mac apps paragraph keeps only its Sparkle sentence.
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.
Step E of the recomp standards plan: one data folder per game, a temp folder of its own for every setup run, and the SDK rules that go with them. Off main (5715143, everything ahead of it in the release merged in), with D (#310) in:
run_preparerefuses an AppImage on Linux first, then makes its room check and temp folder.What
{data}andRECOMPLAUNCHER_DATA.{data}is{install}/recompdata. Notdata(TotK's release ships one), and notuserdata: 11 catalog projects already write or ship a top-leveluserdatafolder (six by our own profiles, and RingOut, GR2port, DPRecomp, WWE 2K14 Recomp and Crash 2 Recompiled in their release zips), and no project writes or shipsrecompdata. It fills in everywhere{install}does, and the game and its setup step get it asRECOMPLAUNCHER_DATA(as Windows names it,Z:\..., through Proton). The launcher makes the folder before either starts, for any game whose developer wrote it arecomplauncher.json, set up by hand too, so where saves go doesn't change with how the game was set up. Save places in it are written as{data}/....prepare.env. Likestart.env: filled-in paths,{input:<id>}too (a value with an input the player didn't give is left out, as inprepare.args). Left out of the serialized profile when empty, so setups fingerprinted before it existed stay set up. The step also getsRECOMPLAUNCHER=1andRECOMPLAUNCHER_VERSION, like Play.TMPDIR,TEMPandTMPpoint to<game>/.recomplauncher-tmp, made empty for each run (on the game's drive, not a small system drive or a memory/tmp) and taken away however the run ends: success, failure, Stop. It carries a mark file; a folder by that name without it (a release that ships one, or a link) is never emptied, and setup stops and says so. Play keeps the system's temp folder.PathTooLongException, "The filename or extension is too long", os error 206), or an install or move hits error 206, the player is told to use a library folder with a shorter path or to turn on Windows'LongPathsEnabled. The launcher never changes that setting. The message keeps what the step printed last on a line under it, so a step that warned about a path early and stopped later for another reason still shows that reason..recomplauncher-game-update, from Game updates go in whole or leave the game as it was #303) andtmpfolders, as they already left outcache, even when a save place is all of{data}or the whole game folder.{data}/saveswith it. Now a copy of the saves inside the folder is made first, for the game and each of its games with saves of their own, into<library>/.backups/<game>/saves(which uninstalling leaves) or the player's chosen folder. The Saves tab puts it back after a reinstall. If the copy fails, the folder stays and the player is told. Desktop: a tick under the delete one, on by default and greyed out while the folder is kept. Big Picture: "Uninstall and delete its folder" (keeps a copy), "Delete its folder and its saves", "Uninstall, keep its folder".prepare.done(only when there's a step and it builds from the player's copy); paths written outside{install}and{data}(saves, settings files, folders, args, env using{home},{local},{config},{documents},{appdata});prepare.envnames that can't be set. The warning about a separate{game}argument withkeeps_copycomes from C (A setup step that keeps the copy builds again without it (prepare.keeps_copy) #308), now merged in; theprepare.doneone stays quiet for akeeps_copystep, which C already warns about. When akeeps_copystep runs again without the copy,prepare.envvalues naming{game}are left out, as its arguments are.{data}in the paths table,RECOMPLAUNCHER_DATA,prepare.env, the temp folder, room and long-path notes inprepare, and the old "keep the SDK in your builder's own folder" line replaced. Since automatic updates became the player's choice (Settings → Updates: Update All Games Automatically, and a game's own switch opts it out #332), "Never update yourself" says the launcher brings players every release, by itself once they turn automatic updates on. After D:APPIMAGEis never set, and since an update replaces the program's own files (an unpacked AppImage'sAppRunandusr/, a.app's contents), the game writes to{data}. Release rules: Linux ships a tarball (.tar.gz,.tar.xzor.tar.zst) and an AppImage of one portable build, both played from a plain folder (GitHub Actionsubuntu:22.04container or the Steam RuntimesniperSDK), source archives saysource, nothing in Program Files without a proper installer/uninstaller (MSIX) or a package manager.macOS gets only
{data}and the setup temp folder. Neither has been tried on a Mac.Tests
cargo teston Linux (Bazzite VM, distrobox): 880 passed, 0 failed (1 ignored, from main), including the schema parity tests, after merging main (5715143). Each commit's tree was tested on its own too.cargo teston Windows 11 (VM): 815 passed, 0 failed (1 ignored). That covers the setup step's real.batseeing its temp folder,RECOMPLAUNCHER_DATAandprepare.env, and the copy and move into a library folder deeper than 260 characters.node --test: 531 passed on Linux. On Windows 520 passed and 11 were skipped (the tests skip themselves there). Newtests/uninstall-keep-saves.test.cjscovers the desktop and Big Picture choices and checks every new text is in every language.tools/launcher-i18n.py: the 9 new texts are in all 21 languages, with matching placeholders.Temper/.recomplauncher-tmpheld the mark and the 1 MB file the step wrote.TMPDIR,TEMPandTMPall pointed there,RECOMPLAUNCHER=1was set,RECOMPLAUNCHER_DATAwasTemper/userdata(the name before it becamerecompdata; the run predates the rename) andprepare.env's{data}/cachewas filled in. After the run the folder was gone. Play then got noTMPDIRand did getRECOMPLAUNCHER_DATA. Uninstall with the folder deleted kept.backups/Temper/saves/<n>.zipholding onlysaves/slot1.sav(no build or cache) and removed the folder.Z:\form ofRECOMPLAUNCHER_DATAis covered only by the existingwine_path), and a real Windows build failing on a long path (the message is matched from the step's output).Patch notes (players)
For the website (SDK guide)
{data}({install}/recompdata, also given asRECOMPLAUNCHER_DATAto the game and its setup step) andprepare.env(likestart.env). Then add the "Where your game writes" rules: write only under{install}/{data}, take one data path for everything, keep caches in{data}/cache, treat temp as temp (setup getsTMPDIR/TEMP/TMPof its own), don't bootstrap or depend on `` (never set: Linux always plays from a plain folder), write nothing into the program's own files (an update replaces them), and never update yourself whenRECOMPLAUNCHER=1..tar.gz,.tar.xzor.tar.zst) and an AppImage of the same portable build (ubuntu:22.04container or Steam Runtimesniper), source archives saysource, and nothing goes into Program Files without a proper installer/uninstaller or a package manager. Underprepare: a step built from the player's copy keeps what it needs in its folder and listsprepare.done; an options-only run reuses earlier work.prepare: the step runs with no window and never asks anything or waits for input, so everything it needs comes from its arguments and environment. Under self-updating games: skip the updater whenRECOMPLAUNCHERis set, and if only a flag turns it off, put the flag instart.args("args": ["--no-update-check"]).