From 96d81f457b0f90ab4d074b18806f8f51d0183f44 Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 01:21:00 +0200 Subject: [PATCH 01/15] A game writes everything to {data}, and its setup step gets a temp folder 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 /.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. --- docs/DEVELOPERS.md | 71 +++++++++++- docs/recomplauncher.schema.json | 14 ++- src-tauri/src/lib.rs | 123 ++++++++++++++++++-- src-tauri/src/profile.rs | 78 ++++++++++++- src-tauri/src/saves.rs | 6 +- src-tauri/src/setup_temp.rs | 191 ++++++++++++++++++++++++++++++++ ui/i18n/ar.json | 6 +- ui/i18n/de.json | 6 +- ui/i18n/es-419.json | 6 +- ui/i18n/es.json | 6 +- ui/i18n/fr-CA.json | 6 +- ui/i18n/fr.json | 6 +- ui/i18n/id.json | 6 +- ui/i18n/it.json | 6 +- ui/i18n/ja.json | 6 +- ui/i18n/ko.json | 6 +- ui/i18n/nl.json | 6 +- ui/i18n/pl.json | 6 +- ui/i18n/pt-BR.json | 6 +- ui/i18n/pt.json | 6 +- ui/i18n/ru.json | 6 +- ui/i18n/th.json | 6 +- ui/i18n/tr.json | 6 +- ui/i18n/uk.json | 6 +- ui/i18n/vi.json | 6 +- ui/i18n/zh-Hans.json | 6 +- ui/i18n/zh-Hant.json | 6 +- 27 files changed, 569 insertions(+), 40 deletions(-) create mode 100644 src-tauri/src/setup_temp.rs diff --git a/docs/DEVELOPERS.md b/docs/DEVELOPERS.md index ff73631d..e73905ac 100644 --- a/docs/DEVELOPERS.md +++ b/docs/DEVELOPERS.md @@ -58,6 +58,41 @@ through us, and every release you publish reaches players the next time the laun your latest full release, and we can open the pre-release as a beta in the launcher, where players join it with one button and go back just as easily. See [Betas](#betas). +## Where your game writes + +The launcher moves, backs up and uninstalls a game as its folder. What your game writes inside it +goes along; what it writes anywhere else is left behind. So: + +- **Write only under `{install}` and `{data}`.** `{data}` is `userdata` inside the game's folder, + the one place for everything your game makes: saves, settings, caches, builds. The launcher + makes it before your game or your setup step starts, and passes it as `RECOMPLAUNCHER_DATA`. + Don't ship a `userdata` folder in your release. +- **Take one data path for everything, like portable emulators do.** A command-line option or + `RECOMPLAUNCHER_DATA` that moves all of it at once, not one option per kind of file. Without one, + keep your system's usual places. An AppImage or a `.app` writes to the system's usual places + (`~/.local/share`, `~/Library/Application Support`) unless it's given a data path; given one, + it's portable and the launcher looks after it. Never write inside the AppImage. +- **Caches go in `{data}`, under `{data}/cache`.** Backups and cloud saves leave `cache` folders + out, so a shader cache never fills a player's save copies. +- **Temp is temp.** Your setup step gets a temp folder of its own (see [`prepare`](#prepare-your-own-setup-step)), + emptied after every run. Nothing you need later goes there. +- **Name both programs.** `start.program` and `prepare.program` say which file runs. Don't copy + yourself somewhere else and run from there (bootstrapping): the launcher updates the copy in the + game's folder, so the other one goes stale. +- **Don't depend on `$APPIMAGE`.** The launcher may run your AppImage unpacked, from its own folder + (the Flatpak does), and then it isn't set. +- **Never update yourself when `RECOMPLAUNCHER=1`.** The launcher installs every release you + publish. Your game and your setup step both get `RECOMPLAUNCHER=1`. + +```json +"start": { "program": ["MyRecomp.exe"], "args": ["--data", "{data}"] }, +"prepare": { "program": ["MyRecomp.exe"], "args": ["--prepare", "--game", "{game}", "--data", "{data}"], "done": ["{data}/build/game.pak"] }, +"saves": ["{data}/saves"] +``` + +Only `{data}` and the setup step's temp folder reach the Mac version of the launcher; neither has +been tried on a Mac yet. + ## Where the file goes The launcher uses the first one it finds: @@ -251,6 +286,10 @@ Every game the launcher starts also gets these, whether it has a `recomplauncher Use them to fit in: skip your own launcher window, open full screen with your controller menus when the mode is `bigpicture`, and show the right button glyphs from the first frame. +A game with a `recomplauncher.json` also gets `RECOMPLAUNCHER_DATA`: its `{data}` folder, made +before it starts (see [Where your game writes](#where-your-game-writes)). Through Proton on Linux +it's given as Windows names it (`Z:\...`). + ### Paths These fill in anywhere a path, an argument or a value is written: @@ -258,6 +297,7 @@ These fill in anywhere a path, an argument or a value is written: | | | | --- | --- | | `{install}` | Your game's folder | +| `{data}` | `{install}/userdata`: everything your game writes (see [Where your game writes](#where-your-game-writes)) | | `{game}` | The player's copy (the .iso or the folder; for a .cue, its .bin unless `label` names .cue) | | `{documents}` | Documents | | `{local}` | AppData\Local, or ~/.local/share | @@ -565,7 +605,31 @@ settings are written. It runs again whenever the player changes their copy. - Print lines like `progress 0.4 Unpacking menu art` as you go. The number is from 0 to 1 and the text after it shows under the step. - Exit with 0 when it worked. Anything else shows as a failed setup, with your exit code. -- Write what you make to the same place your launcher would, so both stay in step. +- Write what you make to `{data}` (pass it in `args`, or read `RECOMPLAUNCHER_DATA`), and have your + own launcher use the same place when it's given that path, so both stay in step. +- It gets `RECOMPLAUNCHER=1`, `RECOMPLAUNCHER_VERSION` and `RECOMPLAUNCHER_DATA`, like the game. + `env` adds your own, like `start.env`: + + ```json + "prepare": { + "program": ["MyRecompBuilder.exe"], + "args": ["--prepare", "--game", "{game}"], + "env": { "MYRECOMP_CACHE": "{data}/cache" } + } + ``` +- `TMPDIR`, `TEMP` and `TMP` point to `{install}/.recomplauncher-tmp`, a folder the launcher makes + empty for each run, on the game's drive, and takes away when the step ends, however it ends. Put + only scratch files there. The game itself, when Play starts it, gets the system's own temp folder. +- The step starts only with at least 1 GB free on the game's drive; otherwise the player is asked + to free some up first. +- On Windows, if what you print says a path was too long (a `PathTooLongException`, "The filename + or extension is too long"), the player is told to use a library folder with a shorter path or to + turn on Windows' long paths setting. The launcher never changes that setting. +- A run for new options only (the player turned one on after setting up) should reuse what the + last run made, not start again from the disc. +- **Built from the player's copy?** Keep everything the game needs in your folder, so it plays + without the copy, and list what the build leaves in `done`. When it keeps reading the copy while + it plays, `keeps_copy` (coming in a later launcher) says so. - `"version"` (optional): change it only when players who already set up must run the step again, like when your output format changes. Nothing else in this file makes them set up again. Their next Play opens Easy Setup with a note that the game is built again, whether it's set up from @@ -650,8 +714,9 @@ when it's on its `args` are added after the step's own: } ] ``` -- Your builder gets only these args. The launcher sets no environment variables for it, so keep - the SDK in your builder's own folder and put runtime files where the game looks. +- Your builder gets these args added to its own, with the step's usual environment (`{data}` in + `RECOMPLAUNCHER_DATA`, its own temp folder). Download the SDK to the temp folder, or to + `{data}/cache` to reuse it on the next run, and put the runtime files where the game looks. - Print `progress` lines for the download too. If it fails, exit with a code other than 0: the player sees "Its setup step stopped with code N", so put the reason in your own log. - An option you add in a later release reaches players who already set the game up: Set Up diff --git a/docs/recomplauncher.schema.json b/docs/recomplauncher.schema.json index 5cc0d9e1..826da6ff 100644 --- a/docs/recomplauncher.schema.json +++ b/docs/recomplauncher.schema.json @@ -334,7 +334,7 @@ }, "env": { "type": "object", - "description": "Environment variables for your game, like SDL hints. Paths such as {install} fill in. RECOMPLAUNCHER_ names and system ones like PATH are left out.", + "description": "Environment variables for your game, like SDL hints. Paths such as {install} and {data} fill in. RECOMPLAUNCHER_ names and system ones like PATH are left out.", "propertyNames": { "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$" }, @@ -371,7 +371,17 @@ "done": { "type": "array", "items": { "type": "string" }, - "description": "Files the step leaves when it has finished ({home}, {local}, {install}...). All there: the game counts as set up and plays without the copy unless start uses {game}. The ones in the build folder are also what a player's own build must have for the launcher to use it." + "description": "Files the step leaves when it has finished ({data}, {install}, {home}...). All there: the game counts as set up and plays without the copy unless start uses {game}. The ones in the build folder are also what a player's own build must have for the launcher to use it." + }, + "env": { + "type": "object", + "description": "Environment variables for the step, like start.env. Paths such as {data} and {input:} fill in. RECOMPLAUNCHER_ names and system ones like PATH, TEMP and TMP are left out: the step gets a temp folder of its own.", + "propertyNames": { + "pattern": "^[A-Za-z_][A-Za-z0-9_]{0,63}$" + }, + "additionalProperties": { + "type": "string" + } }, "version": { "type": "string", diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index ba5fbd76..8abd2bc9 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -53,6 +53,7 @@ pub mod sysenv; mod emus; pub mod roms; pub mod saves; +pub mod setup_temp; pub mod shortcuts; pub mod steam_sync; pub mod trail; @@ -1001,7 +1002,10 @@ async fn install(app: AppHandle, st: State<'_, App>, id: String, dir: Option, id: String, to: String, u .await .map_err(|e| Error::Msg(e.to_string()))?; st.moving.lock().unwrap().remove(&id); - r?; - // Its backups go with it. + r.map_err(|e| match e { + Error::Io(io) if setup_temp::io_too_long(&io) => Error::Msg(setup_temp::TOO_LONG.into()), + e => e, + })?; + // Its backups go with it (its {data}, caches and all, is inside its folder and went too). let old_b = backups_dir(&g); let mut out = g.clone(); out.path = dest; @@ -3057,6 +3064,15 @@ fn start_game_with_monitor_context( .env("RECOMPLAUNCHER_VERSION", env!("CARGO_PKG_VERSION")) .env("RECOMPLAUNCHER_MODE", if BIG_PICTURE.load(Ordering::Relaxed) { "bigpicture" } else { "desktop" }) .env("RECOMPLAUNCHER_PAD", profile::pad_now()); + // The one folder a game writes everything to ({data}), for a game whose developer wrote it a + // recomplauncher.json. Set up by hand too: where its saves go mustn't change with how it was + // set up. + if let Some(data) = profile_of(&st, id, &g).filter(|p| !p.from_boot).map(|_| profile::data_dir(&g.path)) { + let _ = std::fs::create_dir_all(&data); + let shown = data.to_string_lossy().to_string(); + let through_proton = !cfg!(windows) && matches!(ext.as_str(), "exe" | "cmd" | "bat"); + cmd.env("RECOMPLAUNCHER_DATA", if through_proton { profile::wine_path(&shown) } else { shown }); + } // A Python set up elsewhere on the PC (PYTHONHOME, PYTHONPATH) breaks the Python some games // carry inside them ("No module named 'encodings'"). Games with their own Python never want them. if ext != "py" { @@ -3894,10 +3910,27 @@ fn set_prepare_opts(st: State<'_, App>, id: String, opts: BTreeMap fn run_prepare(pr: &profile::Prepare, install: &Path, copy: &Path, extra: &[String], report: &dyn Fn(f32, String), stopped: &dyn Fn() -> bool) -> Result<(), String> { use std::io::BufRead; let exe = pr.program_in(install).ok_or("Its setup program is missing. Reinstall the game.")?; + if !setup_temp::room_for_setup(manage::free_space(install)) { + return Err(setup_temp::NO_ROOM.into()); + } + // A temp folder of its own on the game's drive, taken away however this returns. + let temp = setup_temp::SetupTemp::make(install)?; + let data = profile::data_dir(install); + let _ = std::fs::create_dir_all(&data); // Its own arguments, then those of the options the player ticked. let args: Vec = pr.args.iter().chain(extra.iter()).map(|a| profile::fill(a, install, Some(copy))).collect(); let mut c = std::process::Command::new(&exe); sysenv::clean_std(&mut c); + // As for Play: the step can tell it was started from here (so it never updates itself), and + // where to write. + c.env("RECOMPLAUNCHER", "1").env("RECOMPLAUNCHER_VERSION", env!("CARGO_PKG_VERSION")).env("RECOMPLAUNCHER_DATA", &data); + for (k, v) in pr.env_vars(install, Some(copy)) { + c.env(k, v); + } + // After the step's own: the temp folder is the launcher's to give. + for (k, v) in temp.env() { + c.env(k, v); + } // An unpacked AppImage's AppRun, run for its setup step: what its runtime would have set. if exe.file_name().map(|n| n == "AppRun").unwrap_or(false) { if let Some(dir) = exe.parent() { @@ -3937,7 +3970,10 @@ fn run_prepare(pr: &profile::Prepare, install: &Path, copy: &Path, extra: &[Stri drop(tx); // What it said last (not a progress line): when it stops on an error, that's usually why. let mut said = String::new(); - let read = |said: &mut String| { + // Whether it said Windows' path limit stopped it, on any line: the reason is usually followed + // by a stack trace. + let mut too_long = false; + let read = |said: &mut String, too_long: &mut bool| { while let Ok(l) = rx.try_recv() { let mut w = l.splitn(3, ' '); if w.next() == Some("progress") { @@ -3945,21 +3981,25 @@ fn run_prepare(pr: &profile::Prepare, install: &Path, copy: &Path, extra: &[Stri report(pct, w.next().unwrap_or("").trim().to_string()); } else if !l.trim().is_empty() { *said = l.trim().chars().take(300).collect(); + *too_long |= setup_temp::says_too_long(&l); } } }; let start = Instant::now(); loop { - read(&mut said); + read(&mut said, &mut too_long); if let Ok(Some(s)) = child.try_wait() { if s.success() { return Ok(()); } // The last of what it printed, which can arrive just after it closed. std::thread::sleep(std::time::Duration::from_millis(150)); - read(&mut said); + read(&mut said, &mut too_long); let code = s.code().map(|c| c.to_string()).unwrap_or_else(|| "a signal".into()); trail::note(format!("Setup step stopped with code {code}; it said last: {said}")); + if cfg!(windows) && too_long { + return Err(setup_temp::TOO_LONG.into()); + } return Err(if said.is_empty() { format!("Its setup step stopped with code {code}.") } else { format!("Its setup step stopped with code {code}: {said}") }); } if stopped() || start.elapsed().as_secs() > pr.timeout { @@ -5308,10 +5348,7 @@ fn setup_inputs_run(app: AppHandle, st: State<'_, App>, id: String) -> Res<()> { placed?; emit("verify", 1.0, "Files selected.".into()); if let Some(pr) = &p.prepare { - let mut pr = pr.clone(); - // Omit an argument containing an absent optional/conditional token. Put flags in - // the same argument (e.g. --dlc={input:dlc}) so a flag cannot steal the next value. - pr.args = inputs::arguments(&pr.args, &p.input_paths, false); + let pr = pr.with_inputs(&p.input_paths); let copy = g.game_copy.as_deref().unwrap_or(&g.path); let copy = p.handed(Some(copy)).unwrap_or_else(|| copy.to_path_buf()); let extra = prepare_extra(&dir, &pr, &g.prepare_opts); @@ -10700,6 +10737,7 @@ mod tests { options: vec![], version: String::new(), done: vec![], + env: BTreeMap::new(), }; let generated_file = dir.join("generated.txt"); @@ -10720,6 +10758,7 @@ mod tests { ); assert_eq!(res.unwrap_err(), "Stopped."); + assert!(!dir.join(setup_temp::FOLDER).exists(), "a stopped step's temp folder goes too"); // The process was stopped immediately, but the external file it wrote remains: assert!(generated_file.exists(), "File generated by external tool before cancellation was preserved"); let content = std::fs::read_to_string(&generated_file).unwrap(); @@ -10729,6 +10768,70 @@ mod tests { } } +#[cfg(test)] +mod prepare_env_tests { + use super::*; + + /// A setup step that writes down what it was given: its temp folder (and whether it was + /// there), the launcher's names and one of its own from prepare.env. + fn tattler(dir: &Path) -> profile::Prepare { + #[cfg(windows)] + // The redirection first: `echo 1>rl.txt` would be read as sending handle 1 to the file. + let (name, script) = ("tattle.bat", "@echo off\r\n>temp.txt echo %TEMP%\r\n>tmp.txt echo %TMP%\r\nif exist \"%TEMP%\" >exists.txt echo yes\r\n>rl.txt echo %RECOMPLAUNCHER%\r\n>data.txt echo %RECOMPLAUNCHER_DATA%\r\n>cache.txt echo %BUILD_CACHE%\r\n"); + #[cfg(not(windows))] + let (name, script) = ("tattle.sh", "#!/bin/sh\necho \"$TMPDIR\" > temp.txt\necho \"$TMP\" > tmp.txt\ntest -d \"$TMPDIR\" && echo yes > exists.txt\necho \"$RECOMPLAUNCHER\" > rl.txt\necho \"$RECOMPLAUNCHER_DATA\" > data.txt\necho \"$BUILD_CACHE\" > cache.txt\n"); + std::fs::write(dir.join(name), script).unwrap(); + #[cfg(unix)] + { + use std::os::unix::fs::PermissionsExt; + std::fs::set_permissions(dir.join(name), std::fs::Permissions::from_mode(0o755)).unwrap(); + } + profile::Prepare { + program: vec![name.into()], + timeout: 60, + env: BTreeMap::from([("BUILD_CACHE".to_string(), "{data}/cache".to_string()), ("TEMP".to_string(), "not-this".to_string())]), + ..Default::default() + } + } + + fn said(dir: &Path, file: &str) -> PathBuf { + PathBuf::from(std::fs::read_to_string(dir.join(file)).unwrap().trim()) + } + + #[test] + fn a_setup_step_gets_its_own_temp_folder_and_the_data_folder() { + let dir = std::env::temp_dir().join(format!("rl-prep-env-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(&dir).unwrap(); + let pr = tattler(&dir); + run_prepare(&pr, &dir, &dir, &[], &|_, _| {}, &|| false).unwrap(); + let temp = dir.join(setup_temp::FOLDER); + assert_eq!(said(&dir, "temp.txt"), temp); + assert_eq!(said(&dir, "tmp.txt"), temp); + assert_eq!(said(&dir, "exists.txt"), PathBuf::from("yes")); + assert!(!temp.exists(), "the temp folder is gone after the run"); + assert_eq!(said(&dir, "rl.txt"), PathBuf::from("1")); + assert_eq!(said(&dir, "data.txt"), dir.join("userdata")); + assert!(dir.join("userdata").is_dir()); + assert_eq!(said(&dir, "cache.txt"), dir.join("userdata").join("cache")); + let _ = std::fs::remove_dir_all(&dir); + } + + #[test] + fn a_temp_folder_the_launcher_didnt_make_stops_setup_untouched() { + let dir = std::env::temp_dir().join(format!("rl-prep-theirs-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&dir); + std::fs::create_dir_all(dir.join(setup_temp::FOLDER)).unwrap(); + std::fs::write(dir.join(setup_temp::FOLDER).join("release.txt"), b"theirs").unwrap(); + let pr = tattler(&dir); + let e = run_prepare(&pr, &dir, &dir, &[], &|_, _| {}, &|| false).unwrap_err(); + assert_eq!(e, setup_temp::NOT_OURS); + assert!(!dir.join("temp.txt").exists(), "the step didn't run"); + assert!(dir.join(setup_temp::FOLDER).join("release.txt").is_file()); + let _ = std::fs::remove_dir_all(&dir); + } +} + #[cfg(test)] mod fingerprint_tests { use super::*; diff --git a/src-tauri/src/profile.rs b/src-tauri/src/profile.rs index 9cb3f8c6..59eac78f 100644 --- a/src-tauri/src/profile.rs +++ b/src-tauri/src/profile.rs @@ -103,6 +103,10 @@ pub struct Prepare { /// game is set up, even when another launcher built it. #[serde(default, deserialize_with = "paths_lenient", skip_serializing_if = "Vec::is_empty")] pub done: Vec, + /// Environment variables for the step, as `start.env`. Left out of the profile when there are + /// none, so setups fingerprinted before it existed stay as they were. + #[serde(default, skip_serializing_if = "BTreeMap::is_empty")] + pub env: BTreeMap, } /// A path or a list of them; anything else is nothing. @@ -195,6 +199,31 @@ impl Prepare { } impl Prepare { + /// `prepare.env`, filled in; names that aren't allowed are left out, and so is a value with a + /// named input still in it (`with_inputs` fills those in first: an optional DLC the player + /// didn't give is left out, as in `prepare.args`). + pub fn env_vars(&self, install: &Path, copy: Option<&Path>) -> Vec<(String, String)> { + let mut out = vec![]; + for (k, v) in self.env.iter().filter(|(k, _)| env_name_ok(k)) { + let value = fill(v, install, copy); + if value.contains("{input:") { + continue; + } + out.push((k.clone(), value)); + } + out + } + + /// The step with the player's named inputs in its arguments and environment. + pub fn with_inputs(&self, inputs: &BTreeMap) -> Prepare { + let mut pr = self.clone(); + // Omit an argument containing an absent optional/conditional token. Put flags in the same + // argument (e.g. --dlc={input:dlc}) so a flag cannot steal the next value. + pr.args = crate::inputs::arguments(&self.args, inputs, false); + pr.env = self.env.iter().map(|(k, v)| (k.clone(), crate::inputs::expand(v, inputs, false))).collect(); + pr + } + /// Its program in the game's folder: a name it gives, or on Linux and Mac the native build by /// the same name (a release's Game-nightly-4-x86_64.AppImage for "Game.AppImage"), as Play /// finds the game's own program. @@ -939,7 +968,7 @@ fn boot_settings(b: &Value) -> (Vec, Vec) { /// out of them. fn safe_place(p: &str) -> bool { let p = p.trim().replace('\\', "/"); - ["{install}/", "{documents}/", "{local}/", "{config}/", "{home}/"].iter().any(|r| p.starts_with(r)) && !p.split('/').any(|c| c == "..") + ["{install}/", "{data}/", "{documents}/", "{local}/", "{config}/", "{home}/"].iter().any(|r| p.starts_with(r)) && !p.split('/').any(|c| c == "..") } /// The player's copy, when the boot profile says it goes on the command line or into a folder: @@ -1168,12 +1197,23 @@ pub fn app_data() -> Option { } } +/// The one folder a game keeps everything it writes in (saves, settings, caches), inside its own +/// folder: `{data}` in its recomplauncher.json, and RECOMPLAUNCHER_DATA when it starts. Not `data`: +/// releases ship a `data` folder of their own (TotK's does). +pub const DATA_DIR: &str = "userdata"; + +/// `{data}` for a game in `install`. +pub fn data_dir(install: &Path) -> PathBuf { + install.join(DATA_DIR) +} + pub fn fill(t: &str, install: &Path, game: Option<&Path>) -> String { if !t.contains('{') { return t.to_string(); } let s = |p: Option| p.map(|p| p.to_string_lossy().to_string()).unwrap_or_default(); t.replace("{pad}", &PAD.read().unwrap()) + .replace("{data}", &data_dir(install).to_string_lossy()) .replace("{install}", &install.to_string_lossy()) .replace("{documents}", &s(dirs::document_dir().or_else(|| dirs::home_dir().map(|h| h.join("Documents"))))) .replace("{appdata}", &s(app_data())) @@ -1442,7 +1482,7 @@ impl Profile { // A path put into a TOML or JSON string: forward slashes, so the backslashes aren't escapes. let fill = |v: &str, install: &Path, game: Option<&Path>| { let f = fill(v, install, game); - if c.format != "ini" && ["{install}", "{game}", "{documents}", "{local}", "{config}", "{home}"].iter().any(|k| v.contains(k)) { f.replace('\\', "/") } else { f } + if c.format != "ini" && ["{install}", "{data}", "{game}", "{documents}", "{local}", "{config}", "{home}"].iter().any(|k| v.contains(k)) { f.replace('\\', "/") } else { f } }; let Some(path) = place(&c.file, install) else { continue }; let mut f = File::open(path, &c.format); @@ -3948,6 +3988,40 @@ mod tests { assert_eq!(e.len(), 2, "PATH, the launcher's own and bad names stay out: {e:?}"); assert!(env_name_ok("_X1") && !env_name_ok("A-B") && !env_name_ok("path")); } + + #[test] + fn data_fills_in_as_the_userdata_folder_in_the_game() { + let install = Path::new("/games/x"); + assert_eq!(PathBuf::from(fill("{data}", install, None)), install.join("userdata")); + assert_eq!(PathBuf::from(fill("{data}/cache", install, None)), install.join("userdata").join("cache")); + } + + #[test] + fn prepare_env_fills_in_and_keeps_out_what_it_must() { + let p: Profile = serde_json::from_str(r#"{"format":1,"prepare":{"program":["b.exe"],"env":{"BUILD_CACHE":"{data}/cache","DISC":"{game}","TEMP":"x","RECOMPLAUNCHER_DATA":"y"}}}"#).unwrap(); + let pr = p.prepare.unwrap(); + let e = pr.env_vars(Path::new("/games/x"), Some(Path::new("/isos/x.iso"))); + let get = |k: &str| e.iter().find(|(n, _)| n == k).map(|(_, v)| PathBuf::from(v)); + assert_eq!(get("BUILD_CACHE"), Some(Path::new("/games/x").join("userdata").join("cache"))); + assert_eq!(get("DISC"), Some(PathBuf::from("/isos/x.iso"))); + assert_eq!(e.len(), 2, "TEMP and the launcher's own names stay out: {e:?}"); + } + + #[test] + fn prepare_env_takes_named_inputs_and_drops_a_missing_one() { + let p: Profile = serde_json::from_str(r#"{"format":1,"prepare":{"program":["b.exe"],"env":{"PATCH":"{input:patch}","DLC":"{input:dlc}"}}}"#).unwrap(); + let given = BTreeMap::from([("patch".to_string(), PathBuf::from("/files/patch.zip"))]); + let pr = p.prepare.unwrap().with_inputs(&given); + let e = pr.env_vars(Path::new("/games/x"), None); + assert_eq!(e, vec![("PATCH".to_string(), "/files/patch.zip".to_string())]); + } + + #[test] + fn a_prepare_without_env_writes_none() { + // Setups fingerprinted from the profile before prepare.env existed stay set up. + let p: Profile = serde_json::from_str(r#"{"format":1,"prepare":{"program":["b.exe"]}}"#).unwrap(); + assert!(!serde_json::to_string(&p.prepare.unwrap()).unwrap().contains("env")); + } } #[cfg(test)] diff --git a/src-tauri/src/saves.rs b/src-tauri/src/saves.rs index 5eb2fc8f..39230d8b 100644 --- a/src-tauri/src/saves.rs +++ b/src-tauri/src/saves.rs @@ -153,7 +153,9 @@ pub fn templatize_for(p: &Path, g: &Installed) -> String { /// This PC's path as a template that works on any PC: `C:\Users\Ruben\AppData\Local\X` -> `{local}/X`. pub fn templatize(p: &Path, install: &Path) -> String { + // `{data}` before `{install}`: it's inside it, and the narrower name is the one the game uses. let bases: Vec<(&str, Option)> = vec![ + ("{data}", Some(crate::profile::data_dir(install))), ("{install}", Some(install.to_path_buf())), ("{local}", dirs::data_local_dir()), ("{config}", dirs::config_dir()), @@ -957,7 +959,7 @@ pub fn restore(app_dir: &Path, id: &str, zip_file: &Path, spots_now: &[Spot], g: .map(|(i, s)| { let t = &s.template; let whole = t.trim_end_matches(['/', '\\']) == "{install}"; - let in_game = t.starts_with("{install}"); + let in_game = t.starts_with("{install}") || t.starts_with("{data}"); !whole && (!in_game || named(t)) && !roots.get(i).map(|r| holds_programs(r)).unwrap_or(true) }) .collect(); @@ -969,7 +971,7 @@ pub fn restore(app_dir: &Path, id: &str, zip_file: &Path, spots_now: &[Spot], g: } } let today: HashSet<&str> = spots_now.iter().map(|s| s.template.as_str()).collect(); - let skip: HashSet = same.iter().enumerate().filter(|(i, s)| s.template.starts_with("{install}/") && !today.contains(s.template.as_str()) && roots.get(*i).map(|r| holds_programs(r)).unwrap_or(false)).map(|(i, _)| i).collect(); + let skip: HashSet = same.iter().enumerate().filter(|(i, s)| (s.template.starts_with("{install}/") || s.template.starts_with("{data}/")) && !today.contains(s.template.as_str()) && roots.get(*i).map(|r| holds_programs(r)).unwrap_or(false)).map(|(i, _)| i).collect(); let mut n = 0; for i in 0..z.len() { let mut e = z.by_index(i).map_err(|e| Error::Msg(e.to_string()))?; diff --git a/src-tauri/src/setup_temp.rs b/src-tauri/src/setup_temp.rs new file mode 100644 index 00000000..639b9f98 --- /dev/null +++ b/src-tauri/src/setup_temp.rs @@ -0,0 +1,191 @@ +//! What a setup step (a game's `prepare`) runs with: a temp folder of its own on the game's drive, +//! room on that drive, and plain words when Windows' path limit stops it. Only setup runs get the +//! temp folder: Play keeps the system's. + +use std::path::{Path, PathBuf}; + +/// `/.recomplauncher-tmp`: TMPDIR, TEMP and TMP for one setup run. On the game's drive, so a +/// builder unpacking gigabytes doesn't fill a small system drive (or the memory /tmp is on some +/// Linux systems), and taken away when the run ends. +pub const FOLDER: &str = ".recomplauncher-tmp"; +/// The file inside that says the launcher made the folder, so the launcher may empty it. A folder +/// by that name without it (a release that ships one) is never touched. +const MARK: &str = ".made-by-recomplauncher"; + +/// Room a setup step needs on the game's drive before it starts. +pub const ROOM: u64 = 1 << 30; + +pub const NO_ROOM: &str = "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again."; +pub const NOT_OURS: &str = "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again."; +pub const CANT_MAKE: &str = "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again."; +pub const TOO_LONG: &str = "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you."; + +/// One setup run's temp folder. Dropping it takes the folder away, whether the run worked, failed +/// or was stopped. +pub struct SetupTemp { + dir: PathBuf, +} + +impl SetupTemp { + /// An empty `/.recomplauncher-tmp` for this run. One left by a run that couldn't clean up + /// (the launcher closed mid-setup) is emptied first, but only when the launcher made it. + pub fn make(install: &Path) -> Result { + let dir = install.join(FOLDER); + if std::fs::symlink_metadata(&dir).is_ok() { + if !made_here(&dir) { + return Err(NOT_OURS); + } + std::fs::remove_dir_all(&dir).map_err(|_| CANT_MAKE)?; + } + std::fs::create_dir_all(&dir).map_err(|_| CANT_MAKE)?; + std::fs::write(dir.join(MARK), b"").map_err(|_| CANT_MAKE)?; + Ok(SetupTemp { dir }) + } + + pub fn path(&self) -> &Path { + &self.dir + } + + /// The names programs read their temp folder from, on Linux, Mac and Windows. + pub fn env(&self) -> [(&'static str, &Path); 3] { + [("TMPDIR", self.dir.as_path()), ("TEMP", self.dir.as_path()), ("TMP", self.dir.as_path())] + } +} + +impl Drop for SetupTemp { + fn drop(&mut self) { + if made_here(&self.dir) { + let _ = std::fs::remove_dir_all(&self.dir); + } + } +} + +/// A real folder (never a link to somewhere else) with the launcher's mark in it. +fn made_here(dir: &Path) -> bool { + let link = std::fs::symlink_metadata(dir).map(|m| m.file_type().is_symlink()).unwrap_or(true); + !link && dir.is_dir() && dir.join(MARK).is_file() +} + +/// Whether a drive with `free` bytes left has room for a setup step. A drive that can't say how +/// much is free (some network folders) gets the benefit of the doubt. +pub fn room_for_setup(free: Option) -> bool { + free.is_none_or(|f| f >= ROOM) +} + +/// Words Windows programs (and their runtimes) print when its 260-character path limit stopped +/// them: .NET's PathTooLongException, Win32's ERROR_FILENAME_EXCED_RANGE (206), and plain ones. +pub fn says_too_long(said: &str) -> bool { + const WORDS: [&str; 7] = ["path too long", "path is too long", "filename or extension is too long", "pathtoolongexception", "filename_exced_range", "os error 206", "max_path"]; + let s = said.to_ascii_lowercase(); + WORDS.iter().any(|w| s.contains(w)) +} + +/// An error from Windows' path limit (ERROR_FILENAME_EXCED_RANGE). +pub fn io_too_long(e: &std::io::Error) -> bool { + cfg!(windows) && e.raw_os_error() == Some(206) +} + +#[cfg(test)] +mod tests { + use super::*; + + fn scratch(name: &str) -> PathBuf { + let d = std::env::temp_dir().join(format!("rl-setup-temp-{name}-{}", std::process::id())); + let _ = std::fs::remove_dir_all(&d); + std::fs::create_dir_all(&d).unwrap(); + d + } + + #[test] + fn the_temp_folder_is_made_for_a_run_and_gone_after() { + let d = scratch("run"); + let t = SetupTemp::make(&d).unwrap(); + assert_eq!(t.path(), d.join(FOLDER)); + std::fs::write(t.path().join("unpacked.bin"), b"x").unwrap(); + drop(t); + assert!(!d.join(FOLDER).exists()); + let _ = std::fs::remove_dir_all(&d); + } + + #[test] + fn one_left_by_an_earlier_run_starts_empty() { + let d = scratch("left"); + std::mem::forget(SetupTemp::make(&d).unwrap()); + std::fs::write(d.join(FOLDER).join("old.bin"), b"x").unwrap(); + let t = SetupTemp::make(&d).unwrap(); + assert!(!t.path().join("old.bin").exists()); + drop(t); + let _ = std::fs::remove_dir_all(&d); + } + + #[test] + fn a_folder_the_launcher_didnt_make_is_never_emptied() { + let d = scratch("theirs"); + std::fs::create_dir_all(d.join(FOLDER)).unwrap(); + std::fs::write(d.join(FOLDER).join("release.txt"), b"theirs").unwrap(); + assert_eq!(SetupTemp::make(&d).err(), Some(NOT_OURS)); + assert_eq!(std::fs::read(d.join(FOLDER).join("release.txt")).unwrap(), b"theirs"); + let _ = std::fs::remove_dir_all(&d); + } + + #[test] + fn a_file_by_that_name_is_never_removed() { + let d = scratch("file"); + std::fs::write(d.join(FOLDER), b"a release file").unwrap(); + assert_eq!(SetupTemp::make(&d).err(), Some(NOT_OURS)); + assert_eq!(std::fs::read(d.join(FOLDER)).unwrap(), b"a release file"); + let _ = std::fs::remove_dir_all(&d); + } + + #[test] + fn its_mark_taken_out_mid_run_keeps_the_folder() { + // Something else replaced what the launcher made: it's not the launcher's to delete. + let d = scratch("unmarked"); + let t = SetupTemp::make(&d).unwrap(); + std::fs::remove_file(t.path().join(MARK)).unwrap(); + drop(t); + assert!(d.join(FOLDER).is_dir()); + let _ = std::fs::remove_dir_all(&d); + } + + #[test] + fn it_points_all_three_temp_names_at_it() { + let d = scratch("env"); + let t = SetupTemp::make(&d).unwrap(); + let names: Vec<&str> = t.env().iter().map(|(k, _)| *k).collect(); + assert_eq!(names, ["TMPDIR", "TEMP", "TMP"]); + assert!(t.env().iter().all(|(_, v)| *v == t.path())); + drop(t); + let _ = std::fs::remove_dir_all(&d); + } + + #[test] + fn setup_waits_for_a_gigabyte() { + assert!(room_for_setup(None)); + assert!(room_for_setup(Some(ROOM))); + assert!(!room_for_setup(Some(ROOM - 1))); + } + + #[test] + fn windows_path_limit_messages_are_recognised() { + assert!(says_too_long("Unhandled exception. System.IO.PathTooLongException: The path is too long")); + assert!(says_too_long("error: The filename or extension is too long. (os error 206)")); + assert!(!says_too_long("error: file not found")); + } + + #[test] + fn a_deep_library_folder_takes_the_temp_folder() { + // Past Windows' old 260-character limit: the launcher's own file work still goes through. + let d = scratch("deep"); + let mut deep = d.clone(); + while deep.as_os_str().len() < 300 { + deep = deep.join("a-library-folder-with-a-long-name"); + } + std::fs::create_dir_all(&deep).unwrap(); + let t = SetupTemp::make(&deep).unwrap(); + std::fs::write(t.path().join("unpacked.bin"), b"x").unwrap(); + drop(t); + assert!(!deep.join(FOLDER).exists()); + let _ = std::fs::remove_dir_all(&d); + } +} diff --git a/ui/i18n/ar.json b/ui/i18n/ar.json index 2947b926..bbb7dfc8 100644 --- a/ui/i18n/ar.json +++ b/ui/i18n/ar.json @@ -3357,5 +3357,9 @@ "Game A to Z": "اللعبة من أ إلى ي", "Checked by the RecompStore team": "تم الفحص بواسطة فريق RecompStore", "Open the VirusTotal report": "فتح تقرير VirusTotal", - "Verified Update": "تحديث موثّق" + "Verified Update": "تحديث موثّق", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "يحتاج الإعداد إلى 1 غيغابايت فارغة على الأقل على محرك أقراص اللعبة. حرّر بعض المساحة أو انقل اللعبة إلى محرك أقراص آخر، ثم حاول مرة أخرى.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "في مجلد اللعبة مجلد .recomplauncher-tmp لم ينشئه المشغل، لذلك لن يستخدمه الإعداد. انقله خارج مجلد اللعبة، ثم حاول مرة أخرى.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "تعذّر إنشاء مجلد مؤقت للإعداد في مجلد اللعبة. تأكد من أن محرك الأقراص ليس ممتلئًا ولا للقراءة فقط، ثم حاول مرة أخرى.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "أحد المسارات في مجلد اللعبة أطول مما يحتمله Windows. أضف مجلد مكتبة بمسار أقصر من الإعدادات → الألعاب والمجلدات وانقل اللعبة إليه، أو شغّل إعداد المسارات الطويلة في Windows (LongPathsEnabled)، ثم حاول مرة أخرى. لا يغيّر المشغل هذا الإعداد نيابة عنك." } diff --git a/ui/i18n/de.json b/ui/i18n/de.json index ed95d5ac..90c4499a 100644 --- a/ui/i18n/de.json +++ b/ui/i18n/de.json @@ -3357,5 +3357,9 @@ "Game A to Z": "Spiel A bis Z", "Checked by the RecompStore team": "Vom RecompStore-Team geprüft", "Open the VirusTotal report": "VirusTotal-Bericht öffnen", - "Verified Update": "Verifiziertes Update" + "Verified Update": "Verifiziertes Update", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Für die Einrichtung braucht das Laufwerk des Spiels mindestens 1 GB freien Platz. Mach etwas Platz frei oder verschieb das Spiel auf ein anderes Laufwerk und versuch es dann noch einmal.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "Im Ordner des Spiels liegt ein Ordner .recomplauncher-tmp, den nicht der Launcher angelegt hat, deshalb nutzt die Einrichtung ihn nicht. Verschieb ihn aus dem Ordner des Spiels und versuch es dann noch einmal.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Im Ordner des Spiels konnte kein temporärer Ordner für die Einrichtung angelegt werden. Prüf, ob das Laufwerk voll oder schreibgeschützt ist, und versuch es dann noch einmal.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Ein Pfad im Ordner des Spiels ist für Windows zu lang. Füg unter Einstellungen → Spiele und Ordner einen Bibliotheksordner mit kürzerem Pfad hinzu und verschieb das Spiel dorthin, oder schalte die Windows-Einstellung für lange Pfade (LongPathsEnabled) ein und versuch es dann noch einmal. Der Launcher ändert diese Einstellung nicht für dich." } diff --git a/ui/i18n/es-419.json b/ui/i18n/es-419.json index a765ff73..69c4e0a5 100644 --- a/ui/i18n/es-419.json +++ b/ui/i18n/es-419.json @@ -3357,5 +3357,9 @@ "Game A to Z": "Juego de la A a la Z", "Checked by the RecompStore team": "Revisado por el equipo de RecompStore", "Open the VirusTotal report": "Abrir el informe de VirusTotal", - "Verified Update": "Actualización verificada" + "Verified Update": "Actualización verificada", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "La configuración necesita al menos 1 GB libre en la unidad del juego. Libera un poco o mueve el juego a otra unidad y vuelve a intentarlo.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "La carpeta del juego tiene una carpeta .recomplauncher-tmp que no creó el lanzador, así que la configuración no la va a usar. Sácala de la carpeta del juego y vuelve a intentarlo.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "No se pudo crear una carpeta temporal para la configuración en la carpeta del juego. Revisa que la unidad no esté llena ni sea de solo lectura y vuelve a intentarlo.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Una ruta de la carpeta del juego es demasiado larga para Windows. Agrega una carpeta de biblioteca con una ruta más corta en Configuración → Juegos y carpetas y mueve el juego ahí, o activa la configuración de rutas largas de Windows (LongPathsEnabled) y vuelve a intentarlo. El lanzador no cambia esa configuración por ti." } diff --git a/ui/i18n/es.json b/ui/i18n/es.json index 6de3c039..528173fd 100644 --- a/ui/i18n/es.json +++ b/ui/i18n/es.json @@ -3357,5 +3357,9 @@ "Game A to Z": "Juego de la A a la Z", "Checked by the RecompStore team": "Revisado por el equipo de RecompStore", "Open the VirusTotal report": "Abrir el informe de VirusTotal", - "Verified Update": "Actualización verificada" + "Verified Update": "Actualización verificada", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "La configuración necesita al menos 1 GB libre en la unidad del juego. Libera un poco o mueve el juego a otra unidad y vuelve a intentarlo.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "La carpeta del juego tiene una carpeta .recomplauncher-tmp que no creó el lanzador, así que la configuración no la usará. Sácala de la carpeta del juego y vuelve a intentarlo.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "No se pudo crear una carpeta temporal para la configuración en la carpeta del juego. Comprueba que la unidad no esté llena ni sea de solo lectura y vuelve a intentarlo.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Una ruta de la carpeta del juego es demasiado larga para Windows. Añade una carpeta de biblioteca con una ruta más corta en Configuración → Juegos y carpetas y mueve el juego allí, o activa el ajuste de rutas largas de Windows (LongPathsEnabled) y vuelve a intentarlo. El lanzador no cambia ese ajuste por ti." } diff --git a/ui/i18n/fr-CA.json b/ui/i18n/fr-CA.json index b721b202..78589603 100644 --- a/ui/i18n/fr-CA.json +++ b/ui/i18n/fr-CA.json @@ -1481,5 +1481,9 @@ "Game A to Z": "Jeu de A à Z", "Checked by the RecompStore team": "Vérifié par l’équipe RecompStore", "Open the VirusTotal report": "Ouvrir le rapport VirusTotal", - "Verified Update": "Mise à jour vérifiée" + "Verified Update": "Mise à jour vérifiée", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "La configuration a besoin d'au moins 1 Go libre sur le lecteur du jeu. Libère de l'espace ou déplace le jeu sur un autre lecteur, puis réessaie.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "Le dossier du jeu contient un dossier .recomplauncher-tmp que le lanceur n'a pas créé, donc la configuration ne l'utilise pas. Sors-le du dossier du jeu, puis réessaie.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Impossible de créer un dossier temporaire pour la configuration dans le dossier du jeu. Vérifie que le lecteur n'est pas plein ni en lecture seule, puis réessaie.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Un chemin dans le dossier du jeu est trop long pour Windows. Ajoute un dossier de bibliothèque avec un chemin plus court dans Paramètres → Jeux et dossiers et déplaces-y le jeu, ou active le réglage des chemins longs de Windows (LongPathsEnabled), puis réessaie. Le lanceur ne modifie pas ce réglage à ta place." } diff --git a/ui/i18n/fr.json b/ui/i18n/fr.json index 3ad17300..0f93621d 100644 --- a/ui/i18n/fr.json +++ b/ui/i18n/fr.json @@ -3357,5 +3357,9 @@ "Game A to Z": "Jeu de A à Z", "Checked by the RecompStore team": "Vérifié par l’équipe RecompStore", "Open the VirusTotal report": "Ouvrir le rapport VirusTotal", - "Verified Update": "Mise à jour vérifiée" + "Verified Update": "Mise à jour vérifiée", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "La configuration a besoin d'au moins 1 Go libre sur le lecteur du jeu. Libérez de l'espace ou déplacez le jeu sur un autre lecteur, puis réessayez.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "Le dossier du jeu contient un dossier .recomplauncher-tmp que le lanceur n'a pas créé, donc la configuration ne l'utilise pas. Sortez-le du dossier du jeu, puis réessayez.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Impossible de créer un dossier temporaire pour la configuration dans le dossier du jeu. Vérifiez que le lecteur n'est pas plein ni en lecture seule, puis réessayez.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Un chemin dans le dossier du jeu est trop long pour Windows. Ajoutez un dossier de bibliothèque avec un chemin plus court dans Paramètres → Jeux et dossiers et déplacez-y le jeu, ou activez le réglage des chemins longs de Windows (LongPathsEnabled), puis réessayez. Le lanceur ne modifie pas ce réglage à votre place." } diff --git a/ui/i18n/id.json b/ui/i18n/id.json index 3e84bea1..8588d20f 100644 --- a/ui/i18n/id.json +++ b/ui/i18n/id.json @@ -3357,5 +3357,9 @@ "Game A to Z": "Game A sampai Z", "Checked by the RecompStore team": "Diperiksa oleh tim RecompStore", "Open the VirusTotal report": "Buka laporan VirusTotal", - "Verified Update": "Pembaruan terverifikasi" + "Verified Update": "Pembaruan terverifikasi", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Penyiapan butuh ruang kosong minimal 1 GB di drive game. Kosongkan sedikit ruang, atau pindahkan game ke drive lain, lalu coba lagi.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "Folder game punya folder .recomplauncher-tmp yang tidak dibuat oleh launcher, jadi penyiapan tidak memakainya. Pindahkan folder itu keluar dari folder game, lalu coba lagi.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Tidak bisa membuat folder sementara untuk penyiapan di folder game. Pastikan drive tidak penuh atau hanya-baca, lalu coba lagi.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Ada path di folder game yang terlalu panjang untuk Windows. Tambahkan folder pustaka dengan path lebih pendek di Pengaturan → Game dan folder lalu pindahkan game ke sana, atau nyalakan pengaturan path panjang Windows (LongPathsEnabled), lalu coba lagi. Launcher tidak mengubah pengaturan itu untukmu." } diff --git a/ui/i18n/it.json b/ui/i18n/it.json index 70ead01d..c06b62e0 100644 --- a/ui/i18n/it.json +++ b/ui/i18n/it.json @@ -3357,5 +3357,9 @@ "Game A to Z": "Gioco dalla A alla Z", "Checked by the RecompStore team": "Controllato dal team di RecompStore", "Open the VirusTotal report": "Apri il report di VirusTotal", - "Verified Update": "Aggiornamento verificato" + "Verified Update": "Aggiornamento verificato", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "La configurazione richiede almeno 1 GB libero sull'unità del gioco. Libera un po' di spazio o sposta il gioco su un'altra unità, poi riprova.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "La cartella del gioco ha una cartella .recomplauncher-tmp che non ha creato il launcher, quindi la configurazione non la usa. Spostala fuori dalla cartella del gioco, poi riprova.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Impossibile creare una cartella temporanea per la configurazione nella cartella del gioco. Controlla che l'unità non sia piena o di sola lettura, poi riprova.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Un percorso nella cartella del gioco è troppo lungo per Windows. Aggiungi una cartella della libreria con un percorso più corto in Impostazioni → Giochi e cartelle e sposta lì il gioco, oppure attiva l'impostazione dei percorsi lunghi di Windows (LongPathsEnabled), poi riprova. Il launcher non cambia questa impostazione al posto tuo." } diff --git a/ui/i18n/ja.json b/ui/i18n/ja.json index af8329d2..fdbfec9f 100644 --- a/ui/i18n/ja.json +++ b/ui/i18n/ja.json @@ -3357,5 +3357,9 @@ "Game A to Z": "ゲーム名順", "Checked by the RecompStore team": "RecompStore チームが確認済み", "Open the VirusTotal report": "VirusTotal のレポートを開く", - "Verified Update": "確認済みのアップデート" + "Verified Update": "確認済みのアップデート", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "セットアップには、ゲームのドライブに 1 GB 以上の空き容量が必要です。空き容量を増やすか、ゲームを別のドライブに移してから、もう一度お試しください。", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "ゲームのフォルダーに、ランチャーが作ったものではない .recomplauncher-tmp フォルダーがあるため、セットアップでは使いません。ゲームのフォルダーの外に移してから、もう一度お試しください。", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "ゲームのフォルダーにセットアップ用の一時フォルダーを作れませんでした。ドライブがいっぱいでないか、読み取り専用でないかを確認してから、もう一度お試しください。", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "ゲームのフォルダー内のパスが Windows には長すぎます。「設定」→「ゲームとフォルダー」でパスの短いライブラリのフォルダーを追加してゲームをそこへ移すか、Windows の長いパスの設定 (LongPathsEnabled) をオンにしてから、もう一度お試しください。ランチャーがこの設定を変更することはありません。" } diff --git a/ui/i18n/ko.json b/ui/i18n/ko.json index bdfa082f..0a7dcf3a 100644 --- a/ui/i18n/ko.json +++ b/ui/i18n/ko.json @@ -3357,5 +3357,9 @@ "Game A to Z": "게임 이름순", "Checked by the RecompStore team": "RecompStore 팀이 확인함", "Open the VirusTotal report": "VirusTotal 보고서 열기", - "Verified Update": "확인된 업데이트" + "Verified Update": "확인된 업데이트", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "셋업하려면 게임 드라이브에 여유 공간이 1GB 이상 있어야 합니다. 공간을 확보하거나 게임을 다른 드라이브로 옮긴 뒤 다시 시도하세요.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "게임 폴더에 런처가 만들지 않은 .recomplauncher-tmp 폴더가 있어 셋업에서 사용하지 않습니다. 게임 폴더 밖으로 옮긴 뒤 다시 시도하세요.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "게임 폴더에 셋업용 임시 폴더를 만들지 못했습니다. 드라이브가 가득 찼거나 읽기 전용이 아닌지 확인한 뒤 다시 시도하세요.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "게임 폴더 안의 경로가 Windows에서 쓰기에 너무 깁니다. 설정 → 게임 및 폴더에서 경로가 더 짧은 라이브러리 폴더를 추가하고 게임을 그곳으로 옮기거나, Windows의 긴 경로 설정(LongPathsEnabled)을 켠 뒤 다시 시도하세요. 런처는 이 설정을 대신 바꾸지 않습니다." } diff --git a/ui/i18n/nl.json b/ui/i18n/nl.json index f41fc6c5..b3293353 100644 --- a/ui/i18n/nl.json +++ b/ui/i18n/nl.json @@ -3357,5 +3357,9 @@ "Game A to Z": "Spel A tot Z", "Checked by the RecompStore team": "Gecontroleerd door het RecompStore-team", "Open the VirusTotal report": "VirusTotal-rapport openen", - "Verified Update": "Geverifieerde update" + "Verified Update": "Geverifieerde update", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Instellen heeft minstens 1 GB vrije ruimte nodig op de schijf van de game. Maak wat ruimte vrij of verplaats de game naar een andere schijf en probeer het dan opnieuw.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "De map van de game bevat een map .recomplauncher-tmp die de launcher niet heeft gemaakt, dus instellen gebruikt die niet. Haal hem uit de map van de game en probeer het dan opnieuw.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Kon in de map van de game geen tijdelijke map voor het instellen maken. Controleer of de schijf niet vol of alleen-lezen is en probeer het dan opnieuw.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Een pad in de map van de game is te lang voor Windows. Voeg in Instellingen → Games en mappen een bibliotheekmap met een korter pad toe en verplaats de game daarheen, of zet de Windows-instelling voor lange paden (LongPathsEnabled) aan en probeer het dan opnieuw. De launcher verandert die instelling niet voor je." } diff --git a/ui/i18n/pl.json b/ui/i18n/pl.json index c8e4c395..22986dc0 100644 --- a/ui/i18n/pl.json +++ b/ui/i18n/pl.json @@ -3357,5 +3357,9 @@ "Game A to Z": "Gra od A do Z", "Checked by the RecompStore team": "Sprawdzone przez zespół RecompStore", "Open the VirusTotal report": "Otwórz raport VirusTotal", - "Verified Update": "Zweryfikowana aktualizacja" + "Verified Update": "Zweryfikowana aktualizacja", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Konfiguracja wymaga co najmniej 1 GB wolnego miejsca na dysku gry. Zwolnij trochę miejsca albo przenieś grę na inny dysk i spróbuj ponownie.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "W folderze gry jest folder .recomplauncher-tmp, którego nie utworzył launcher, więc konfiguracja go nie użyje. Przenieś go poza folder gry i spróbuj ponownie.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Nie udało się utworzyć folderu tymczasowego dla konfiguracji w folderze gry. Sprawdź, czy dysk nie jest pełny ani tylko do odczytu, i spróbuj ponownie.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Ścieżka w folderze gry jest za długa dla Windows. Dodaj folder biblioteki z krótszą ścieżką w Ustawienia → Gry i foldery i przenieś tam grę albo włącz ustawienie długich ścieżek w Windows (LongPathsEnabled) i spróbuj ponownie. Launcher nie zmienia tego ustawienia za ciebie." } diff --git a/ui/i18n/pt-BR.json b/ui/i18n/pt-BR.json index 5eb43b8b..f79bda6b 100644 --- a/ui/i18n/pt-BR.json +++ b/ui/i18n/pt-BR.json @@ -3357,5 +3357,9 @@ "Game A to Z": "Jogo de A a Z", "Checked by the RecompStore team": "Verificado pela equipe da RecompStore", "Open the VirusTotal report": "Abrir o relatório do VirusTotal", - "Verified Update": "Atualização verificada" + "Verified Update": "Atualização verificada", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "A configuração precisa de pelo menos 1 GB livre na unidade do jogo. Libere um pouco de espaço ou mova o jogo para outra unidade e tente de novo.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "A pasta do jogo tem uma pasta .recomplauncher-tmp que não foi criada pelo launcher, então a configuração não vai usá-la. Tire-a da pasta do jogo e tente de novo.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Não foi possível criar uma pasta temporária para a configuração na pasta do jogo. Verifique se a unidade não está cheia nem somente leitura e tente de novo.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Um caminho na pasta do jogo é longo demais para o Windows. Adicione uma pasta da biblioteca com um caminho mais curto em Configurações → Jogos e pastas e mova o jogo para lá, ou ative a configuração de caminhos longos do Windows (LongPathsEnabled) e tente de novo. O launcher não muda essa configuração por você." } diff --git a/ui/i18n/pt.json b/ui/i18n/pt.json index 33b50644..5346a0ae 100644 --- a/ui/i18n/pt.json +++ b/ui/i18n/pt.json @@ -3357,5 +3357,9 @@ "Game A to Z": "Jogo de A a Z", "Checked by the RecompStore team": "Verificado pela equipa da RecompStore", "Open the VirusTotal report": "Abrir o relatório do VirusTotal", - "Verified Update": "Atualização verificada" + "Verified Update": "Atualização verificada", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "A configuração precisa de pelo menos 1 GB livre na unidade do jogo. Liberta algum espaço ou move o jogo para outra unidade e tenta de novo.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "A pasta do jogo tem uma pasta .recomplauncher-tmp que não foi criada pelo launcher, por isso a configuração não a usa. Tira-a da pasta do jogo e tenta de novo.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Não foi possível criar uma pasta temporária para a configuração na pasta do jogo. Verifica se a unidade não está cheia nem só de leitura e tenta de novo.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Um caminho na pasta do jogo é demasiado longo para o Windows. Adiciona uma pasta da biblioteca com um caminho mais curto em Definições → Jogos e pastas e move o jogo para lá, ou ativa a definição de caminhos longos do Windows (LongPathsEnabled) e tenta de novo. O launcher não muda essa definição por ti." } diff --git a/ui/i18n/ru.json b/ui/i18n/ru.json index e06500eb..35eeb974 100644 --- a/ui/i18n/ru.json +++ b/ui/i18n/ru.json @@ -3357,5 +3357,9 @@ "Game A to Z": "Игра от А до Я", "Checked by the RecompStore team": "Проверено командой RecompStore", "Open the VirusTotal report": "Открыть отчёт VirusTotal", - "Verified Update": "Проверенное обновление" + "Verified Update": "Проверенное обновление", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Для настройки на диске игры должно быть свободно не меньше 1 ГБ. Освободите немного места или перенесите игру на другой диск и попробуйте снова.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "В папке игры есть папка .recomplauncher-tmp, которую создал не лаунчер, поэтому настройка её не использует. Уберите её из папки игры и попробуйте снова.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Не удалось создать временную папку для настройки в папке игры. Проверьте, что диск не заполнен и не доступен только для чтения, и попробуйте снова.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Путь в папке игры слишком длинный для Windows. Добавьте папку библиотеки с более коротким путём в разделе Настройки → Игры и папки и перенесите туда игру или включите в Windows параметр длинных путей (LongPathsEnabled) и попробуйте снова. Лаунчер сам этот параметр не меняет." } diff --git a/ui/i18n/th.json b/ui/i18n/th.json index 03a5a272..c8e4a2d0 100644 --- a/ui/i18n/th.json +++ b/ui/i18n/th.json @@ -3357,5 +3357,9 @@ "Game A to Z": "เกม ก ถึง ฮ", "Checked by the RecompStore team": "ตรวจสอบโดยทีม RecompStore", "Open the VirusTotal report": "เปิดรายงาน VirusTotal", - "Verified Update": "อัปเดตที่ยืนยันแล้ว" + "Verified Update": "อัปเดตที่ยืนยันแล้ว", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "การตั้งค่าต้องมีพื้นที่ว่างอย่างน้อย 1 GB ในไดรฟ์ของเกม เคลียร์พื้นที่บางส่วนหรือย้ายเกมไปไดรฟ์อื่น แล้วลองอีกครั้ง", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "โฟลเดอร์ของเกมมีโฟลเดอร์ .recomplauncher-tmp ที่ตัวเปิดเกมไม่ได้สร้าง การตั้งค่าจึงจะไม่ใช้มัน ย้ายมันออกจากโฟลเดอร์ของเกม แล้วลองอีกครั้ง", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "สร้างโฟลเดอร์ชั่วคราวสำหรับการตั้งค่าในโฟลเดอร์ของเกมไม่ได้ ตรวจสอบว่าไดรฟ์ไม่เต็มหรือไม่ได้เป็นแบบอ่านอย่างเดียว แล้วลองอีกครั้ง", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "พาธในโฟลเดอร์ของเกมยาวเกินไปสำหรับ Windows เพิ่มโฟลเดอร์คลังที่มีพาธสั้นกว่าใน การตั้งค่า → เกมและโฟลเดอร์ แล้วย้ายเกมไปที่นั่น หรือเปิดการตั้งค่าพาธยาวของ Windows (LongPathsEnabled) แล้วลองอีกครั้ง ตัวเปิดเกมจะไม่เปลี่ยนการตั้งค่านั้นให้คุณ" } diff --git a/ui/i18n/tr.json b/ui/i18n/tr.json index d3799c26..bff421c9 100644 --- a/ui/i18n/tr.json +++ b/ui/i18n/tr.json @@ -3357,5 +3357,9 @@ "Game A to Z": "Oyun A'dan Z'ye", "Checked by the RecompStore team": "RecompStore ekibi tarafından kontrol edildi", "Open the VirusTotal report": "VirusTotal raporunu aç", - "Verified Update": "Doğrulanmış güncelleme" + "Verified Update": "Doğrulanmış güncelleme", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Kurulum için oyunun sürücüsünde en az 1 GB boş alan gerekiyor. Biraz yer açın ya da oyunu başka bir sürücüye taşıyın, sonra yeniden deneyin.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "Oyunun klasöründe başlatıcının oluşturmadığı bir .recomplauncher-tmp klasörü var, bu yüzden kurulum onu kullanmıyor. Onu oyunun klasöründen çıkarın, sonra yeniden deneyin.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Oyunun klasöründe kurulum için geçici bir klasör oluşturulamadı. Sürücünün dolu ya da salt okunur olmadığını kontrol edin, sonra yeniden deneyin.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Oyunun klasöründeki bir yol Windows için fazla uzun. Ayarlar → Oyunlar ve klasörler bölümünden daha kısa yollu bir kitaplık klasörü ekleyip oyunu oraya taşıyın ya da Windows'un uzun yollar ayarını (LongPathsEnabled) açın, sonra yeniden deneyin. Başlatıcı bu ayarı sizin yerinize değiştirmez." } diff --git a/ui/i18n/uk.json b/ui/i18n/uk.json index 0709e382..32c7e815 100644 --- a/ui/i18n/uk.json +++ b/ui/i18n/uk.json @@ -3357,5 +3357,9 @@ "Game A to Z": "Гра від А до Я", "Checked by the RecompStore team": "Перевірено командою RecompStore", "Open the VirusTotal report": "Відкрити звіт VirusTotal", - "Verified Update": "Перевірене оновлення" + "Verified Update": "Перевірене оновлення", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Для налаштування на диску гри має бути вільно щонайменше 1 ГБ. Звільни трохи місця або перенеси гру на інший диск і спробуй ще раз.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "У папці гри є папка .recomplauncher-tmp, яку створив не лаунчер, тому налаштування її не використовує. Прибери її з папки гри і спробуй ще раз.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Не вдалося створити тимчасову папку для налаштування в папці гри. Перевір, що диск не заповнений і не лише для читання, і спробуй ще раз.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Шлях у папці гри задовгий для Windows. Додай папку бібліотеки з коротшим шляхом у Налаштування → Ігри та папки й перенеси туди гру або ввімкни в Windows параметр довгих шляхів (LongPathsEnabled) і спробуй ще раз. Лаунчер сам цей параметр не змінює." } diff --git a/ui/i18n/vi.json b/ui/i18n/vi.json index db5b318a..a0407dab 100644 --- a/ui/i18n/vi.json +++ b/ui/i18n/vi.json @@ -3357,5 +3357,9 @@ "Game A to Z": "Trò chơi A đến Z", "Checked by the RecompStore team": "Đã được đội ngũ RecompStore kiểm tra", "Open the VirusTotal report": "Mở báo cáo VirusTotal", - "Verified Update": "Bản cập nhật đã xác minh" + "Verified Update": "Bản cập nhật đã xác minh", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Thiết lập cần ít nhất 1 GB trống trên ổ của trò chơi. Hãy giải phóng bớt dung lượng hoặc chuyển trò chơi sang ổ khác, rồi thử lại.", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "Thư mục trò chơi có một thư mục .recomplauncher-tmp không do trình khởi chạy tạo, nên thiết lập sẽ không dùng nó. Hãy chuyển nó ra khỏi thư mục trò chơi, rồi thử lại.", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Không tạo được thư mục tạm cho thiết lập trong thư mục trò chơi. Hãy kiểm tra ổ đĩa không bị đầy hoặc chỉ đọc, rồi thử lại.", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Một đường dẫn trong thư mục trò chơi quá dài đối với Windows. Hãy thêm một thư mục thư viện có đường dẫn ngắn hơn trong Cài đặt → Trò chơi và thư mục rồi chuyển trò chơi sang đó, hoặc bật cài đặt đường dẫn dài của Windows (LongPathsEnabled), rồi thử lại. Trình khởi chạy không tự thay đổi cài đặt đó cho bạn." } diff --git a/ui/i18n/zh-Hans.json b/ui/i18n/zh-Hans.json index c6a40515..407c5d54 100644 --- a/ui/i18n/zh-Hans.json +++ b/ui/i18n/zh-Hans.json @@ -3357,5 +3357,9 @@ "Game A to Z": "按游戏名称排序", "Checked by the RecompStore team": "已由 RecompStore 团队检查", "Open the VirusTotal report": "打开 VirusTotal 报告", - "Verified Update": "已验证的更新" + "Verified Update": "已验证的更新", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "配置需要游戏所在驱动器至少有 1 GB 可用空间。请腾出一些空间,或把游戏移到其他驱动器,然后重试。", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "游戏文件夹里有一个不是启动器创建的 .recomplauncher-tmp 文件夹,所以配置不会使用它。请把它移出游戏文件夹,然后重试。", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "无法在游戏文件夹中为配置创建临时文件夹。请检查驱动器是否已满或为只读,然后重试。", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "游戏文件夹中的某个路径对 Windows 来说太长。请在“设置”→“游戏和文件夹”中添加一个路径更短的游戏库文件夹并把游戏移过去,或打开 Windows 的长路径设置(LongPathsEnabled),然后重试。启动器不会替你更改这个设置。" } diff --git a/ui/i18n/zh-Hant.json b/ui/i18n/zh-Hant.json index d5ef7fb6..e67c25a0 100644 --- a/ui/i18n/zh-Hant.json +++ b/ui/i18n/zh-Hant.json @@ -3357,5 +3357,9 @@ "Game A to Z": "依遊戲名稱排序", "Checked by the RecompStore team": "已由 RecompStore 團隊檢查", "Open the VirusTotal report": "開啟 VirusTotal 報告", - "Verified Update": "已驗證的更新" + "Verified Update": "已驗證的更新", + "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "設定需要遊戲所在的磁碟機至少有 1 GB 可用空間。請騰出一些空間,或把遊戲移到其他磁碟機,然後再試一次。", + "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "遊戲資料夾裡有一個不是啟動器建立的 .recomplauncher-tmp 資料夾,所以設定不會使用它。請把它移出遊戲資料夾,然後再試一次。", + "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "無法在遊戲資料夾中為設定建立暫存資料夾。請檢查磁碟機是否已滿或為唯讀,然後再試一次。", + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "遊戲資料夾中的某個路徑對 Windows 來說太長。請在「設定」→「遊戲和資料夾」中新增一個路徑較短的遊戲庫資料夾並把遊戲移過去,或開啟 Windows 的長路徑設定(LongPathsEnabled),然後再試一次。啟動器不會替你變更這個設定。" } From 5d456965d157a18bb6b6fdad28f96837d76af09f Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 01:29:00 +0200 Subject: [PATCH 02/15] Backups and cloud saves leave out a game's caches and the launcher's 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. --- src-tauri/src/manage.rs | 59 ++++++++++++++++++++++++++++++++++ src-tauri/src/saves.rs | 70 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 126 insertions(+), 3 deletions(-) diff --git a/src-tauri/src/manage.rs b/src-tauri/src/manage.rs index b167d869..344534d4 100644 --- a/src-tauri/src/manage.rs +++ b/src-tauri/src/manage.rs @@ -252,6 +252,65 @@ mod tests { assert_eq!(fs::read(game.join("saves/slot1.sav")).unwrap(), b"save"); } + /// A game with its {data} caches and saves, as a builder leaves it. + fn game_with_caches(d: &Path) -> PathBuf { + let game = d.join("Game"); + fs::create_dir_all(game.join("userdata/cache/shaders")).unwrap(); + fs::create_dir_all(game.join("userdata/saves")).unwrap(); + fs::write(game.join("Game.exe"), b"exe").unwrap(); + fs::write(game.join("userdata/cache/shaders/pipeline.bin"), b"cache").unwrap(); + fs::write(game.join("userdata/saves/slot1.sav"), b"save").unwrap(); + game + } + + fn has_caches(game: &Path) -> bool { + fs::read(game.join("userdata/cache/shaders/pipeline.bin")).ok().as_deref() == Some(b"cache".as_slice()) + && fs::read(game.join("userdata/saves/slot1.sav")).ok().as_deref() == Some(b"save".as_slice()) + } + + #[test] + fn moving_a_game_carries_its_caches() { + let d = tmp("move-caches"); + let game = game_with_caches(&d); + let to = d.join("other-library").join("Game"); + move_dir(&game, &to, &|_, _| {}).unwrap(); + assert!(has_caches(&to)); + assert!(!game.exists()); + let _ = fs::remove_dir_all(&d); + } + + #[test] + fn copying_a_game_to_another_drive_carries_its_caches() { + // What a move to another drive does: every file, the caches in {data} too. + let d = tmp("copy-caches"); + let game = game_with_caches(&d); + let to = d.join("other-drive").join("Game"); + let total = dir_size(&game); + let mut done = 0; + copy_tree(&game, &to, &mut done, total, &|_, _| {}).unwrap(); + assert!(has_caches(&to)); + assert_eq!(done, total); + let _ = fs::remove_dir_all(&d); + } + + #[test] + fn a_game_moves_into_a_deep_library_folder() { + // Past Windows' old 260-character limit, the launcher's own copying still goes through. + let d = tmp("deep"); + let game = game_with_caches(&d); + let mut lib = d.join("libraries"); + while lib.as_os_str().len() < 300 { + lib = lib.join("a-library-folder-with-a-long-name"); + } + let to = lib.join("Game"); + let mut done = 0; + copy_tree(&game, &to, &mut done, dir_size(&game), &|_, _| {}).unwrap(); + assert!(has_caches(&to)); + move_dir(&game, &lib.join("Game2"), &|_, _| {}).unwrap(); + assert!(has_caches(&lib.join("Game2"))); + let _ = fs::remove_dir_all(&d); + } + #[test] fn nothing_to_back_up_makes_no_backup() { let d = tmp("bk-none"); diff --git a/src-tauri/src/saves.rs b/src-tauri/src/saves.rs index 39230d8b..b19c8504 100644 --- a/src-tauri/src/saves.rs +++ b/src-tauri/src/saves.rs @@ -33,10 +33,12 @@ const NOT_SAVES: [&str; 37] = [ ".sfc", ".smc", ".gba", ".nds", ".3ds", ".elf", ".rpx", ".exe", ".dll", ".so", ".pdb", ".msi", ".zip", ".7z", ".rar", ".appimage", ".log", ".tmp", ".dmp", ".mp4", ".mkv", ]; -/// Folders that are never saves. -const NOT_SAVE_DIRS: [&str; 16] = [ +/// Folders that are never saves: a game's caches (`{data}/cache`) and temp folders, and the +/// launcher's own work folders in a game's folder (its setup temp folder, the old release an update +/// sets aside), which a save place around them would otherwise take in. +const NOT_SAVE_DIRS: [&str; 19] = [ "mods", "shadercache", "shader_cache", "shaders", "cache", "caches", "logs", "log", "crashdumps", "dumps", "screenshots", ".backups", - "texture_packs", "textures", "packs", "temp", + "texture_packs", "textures", "packs", "temp", "tmp", crate::setup_temp::FOLDER, ".recomplauncher-game-update", ]; /// A place a game keeps its saves. @@ -1309,6 +1311,68 @@ mod tests { Installed { id: "g".into(), name: "Test Game".into(), path: dir.to_path_buf(), files: vec![PathBuf::from("game.exe"), PathBuf::from("data/a.bin")], played_secs: 60, ..Default::default() } } + #[test] + fn a_folder_in_data_is_named_by_data() { + let d = tmp("data-name"); + assert_eq!(templatize(&d.join("userdata").join("saves"), &d), "{data}/saves"); + assert_eq!(templatize(&d.join("userdata"), &d), "{data}"); + assert_eq!(templatize(&d.join("save"), &d), "{install}/save"); + let _ = fs::remove_dir_all(&d); + } + + #[test] + fn data_as_a_save_place_leaves_out_caches_and_the_launchers_work_folders() { + let d = tmp("data-skip"); + let data = d.join("userdata"); + for sub in ["saves", "cache/shaders", ".recomplauncher-tmp", ".recomplauncher-game-update/old", "tmp"] { + fs::create_dir_all(data.join(sub)).unwrap(); + } + fs::write(data.join("saves/slot1.sav"), b"save").unwrap(); + fs::write(data.join("settings.toml"), b"x = 1").unwrap(); + fs::write(data.join("cache/shaders/a.bin"), b"cache").unwrap(); + fs::write(data.join(".recomplauncher-tmp/part.bin"), b"temp").unwrap(); + fs::write(data.join(".recomplauncher-game-update/old/old.sav"), b"old").unwrap(); + fs::write(data.join("tmp/x.sav"), b"temp").unwrap(); + let g = game(&d); + let s = vec![Spot { template: "{data}".into(), from: "developer" }]; + let mut got: Vec = collect(&s, &g).into_iter().map(|e| e.rel).collect(); + got.sort(); + assert_eq!(got, vec!["saves/slot1.sav", "settings.toml"]); + let _ = fs::remove_dir_all(&d); + } + + #[test] + fn the_whole_game_folder_as_a_save_place_leaves_out_the_setup_temp_folder() { + let d = tmp("install-skip"); + fs::create_dir_all(d.join(".recomplauncher-tmp")).unwrap(); + fs::write(d.join(".recomplauncher-tmp/half.sav"), b"temp").unwrap(); + fs::write(d.join("slot1.sav"), b"save").unwrap(); + let g = game(&d); + let s = vec![Spot { template: "{install}".into(), from: "player" }]; + let got: Vec = collect(&s, &g).into_iter().map(|e| e.rel).collect(); + assert_eq!(got, vec!["slot1.sav"]); + let _ = fs::remove_dir_all(&d); + } + + #[test] + fn saves_in_data_are_kept_beside_the_library() { + // What uninstalling with "keep a copy of its saves" relies on: the copy is outside the game. + let d = tmp("data-keep"); + let app = d.join("app"); + let inst = d.join("lib").join("Game"); + fs::create_dir_all(inst.join("userdata/saves")).unwrap(); + fs::write(inst.join("userdata/saves/slot1.sav"), b"save").unwrap(); + let g = game(&inst); + let s = vec![Spot { template: "{data}/saves".into(), from: "developer" }]; + assert_eq!(files_inside(&s, &g), vec![PathBuf::from("userdata").join("saves").join("slot1.sav")]); + let copy = backup(&app, "g", &s, &g).unwrap().unwrap(); + let kept = dir_of(&app, "g", &g).join(©.name); + assert!(kept.is_file() && !kept.starts_with(&inst), "{}", kept.display()); + fs::remove_dir_all(&inst).unwrap(); + assert!(kept.is_file(), "the copy outlives the game's folder"); + let _ = fs::remove_dir_all(&d); + } + #[test] fn nothing_known_means_no_save_places() { let g = game(Path::new("/games/test")); From d523d22e0a347fcda9d701b55aa1b80197db719e Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 01:38:00 +0200 Subject: [PATCH 03/15] Uninstalling keeps a copy of the saves inside the game's folder first 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 (/.backups//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. --- docs/DEVELOPERS.md | 5 +++ src-tauri/src/lib.rs | 48 ++++++++++++++++++++++--- tests/uninstall-keep-saves.test.cjs | 56 +++++++++++++++++++++++++++++ ui/app.js | 8 +++-- ui/i18n/ar.json | 7 +++- ui/i18n/de.json | 7 +++- ui/i18n/es-419.json | 7 +++- ui/i18n/es.json | 7 +++- ui/i18n/fr-CA.json | 7 +++- ui/i18n/fr.json | 7 +++- ui/i18n/id.json | 7 +++- ui/i18n/it.json | 7 +++- ui/i18n/ja.json | 7 +++- ui/i18n/ko.json | 7 +++- ui/i18n/nl.json | 7 +++- ui/i18n/pl.json | 7 +++- ui/i18n/pt-BR.json | 7 +++- ui/i18n/pt.json | 7 +++- ui/i18n/ru.json | 7 +++- ui/i18n/th.json | 7 +++- ui/i18n/tr.json | 7 +++- ui/i18n/uk.json | 7 +++- ui/i18n/vi.json | 7 +++- ui/i18n/zh-Hans.json | 7 +++- ui/i18n/zh-Hant.json | 7 +++- ui/tv.js | 11 ++++-- 26 files changed, 244 insertions(+), 31 deletions(-) create mode 100644 tests/uninstall-keep-saves.test.cjs diff --git a/docs/DEVELOPERS.md b/docs/DEVELOPERS.md index e73905ac..ca5cb93f 100644 --- a/docs/DEVELOPERS.md +++ b/docs/DEVELOPERS.md @@ -325,6 +325,11 @@ PC. List folders, single files, or files matching a `*` pattern: "saves": ["{local}/My Game/saves", "{install}/settings.toml"] ``` +A game that keeps everything in `{data}` lists `{data}/saves`. Its `{data}/cache`, and the +launcher's own work folders, are never copied, even when you list the whole of `{data}`. When a +player uninstalls the game, a copy of its saves inside its folder is made first, unless they ask +for the saves to go too, and its Saves tab puts it back after a reinstall. + Without it (and without a catalog entry that says), the launcher doesn't guess: the game's Saves tab says it doesn't know where the game saves, and nothing is backed up or synced until the player picks the folder. So say where. Only list saves and small settings: game files, programs and archives are diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 8abd2bc9..15870eeb 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -1109,7 +1109,7 @@ fn download_limits(mb: f64, slow_playing: bool) { } #[tauri::command(async)] -fn uninstall(st: State<'_, App>, id: String, delete_files: bool, run_uninstaller: Option) -> Res { +fn uninstall(st: State<'_, App>, id: String, delete_files: bool, run_uninstaller: Option, keep_saves: Option) -> Res { if st.running.lock().unwrap().contains_key(&id) { return Err(Error::Msg("Close the game first.".into())); } @@ -1141,6 +1141,8 @@ fn uninstall(st: State<'_, App>, id: String, delete_files: bool, run_uninstaller let mut uninstaller = false; let mut kept_copy: Option = None; let mut copy_stuck = false; + let mut saves_kept = false; + let mut saves_stuck = false; if delete_files { // A Flatpak the launcher installed from the game's bundle goes with it. if !cfg!(windows) && flatpak::available() { @@ -1159,7 +1161,20 @@ fn uninstall(st: State<'_, App>, id: String, delete_files: bool, run_uninstaller // folder are theirs: moved out to "Game Copies" beside it first, and if one can't be, the // folder stays. Only files: a folder there is the launcher's unpack of their disc. let mut keep_failed = false; - if ok { + // Its saves inside the folder ({data}/saves, say): a copy beside the library first, which + // uninstalling leaves and the Saves tab puts back after a reinstall. Asked for unless the + // player said not to; if it can't be made, the folder stays. + if ok && keep_saves != Some(false) { + match keep_saves_inside(&st, &g) { + Ok(n) => saves_kept = n > 0, + Err(e) => { + trail::note(format!("Uninstall {id}: its saves couldn't be copied first ({e}), the folder stays")); + keep_failed = true; + saves_stuck = true; + } + } + } + if ok && !keep_failed { for c in [g.game_copy.as_ref(), g.update_copy.as_ref()].into_iter().flatten() { if !(library::inside(c, &g.path) && c.is_file() && !c.is_symlink()) { continue; @@ -1176,7 +1191,7 @@ fn uninstall(st: State<'_, App>, id: String, delete_files: bool, run_uninstaller if ok && !keep_failed { left = remove_game_folder(&g.path); } else if g.path.is_dir() { - copy_stuck = keep_failed; + copy_stuck = keep_failed && !saves_stuck; kept = true; } // A game its own installer put somewhere else (Program Files): its own uninstaller, the @@ -1189,7 +1204,32 @@ fn uninstall(st: State<'_, App>, id: String, delete_files: bool, run_uninstaller } st.lib.lock().unwrap().forget(&id); st.save(); - Ok(json!({"left": left.len(), "path": g.path, "kept": kept, "uninstaller": uninstaller, "kept_copy": kept_copy, "copy_stuck": copy_stuck})) + Ok(json!({"left": left.len(), "path": g.path, "kept": kept, "uninstaller": uninstaller, "kept_copy": kept_copy, "copy_stuck": copy_stuck, "saves_kept": saves_kept, "saves_stuck": saves_stuck})) +} + +/// A copy of the saves a game keeps inside its own folder, for it and each of its games with saves +/// of their own, made before the folder is deleted. Copies go beside the library (or to the +/// player's chosen folder), never inside the game's folder. How many games had saves to keep. +fn keep_saves_inside(st: &App, g: &Installed) -> Result { + let mut ids = vec![g.id.clone()]; + for game in games_of(st, &g.id, g).iter().filter(|x| !x.saves.is_empty()) { + ids.push(games::full(&g.id, &game.id)); + } + let mut kept = 0; + for id in ids { + let spots = cloud::spots_of(st, &id, g); + if saves::files_inside(&spots, g).is_empty() { + continue; + } + let copies = saves::dir_of(&st.dir, &id, g); + if library::inside(&copies, &g.path) { + return Err(Error::Msg("its copies would be inside the folder being deleted".into())); + } + // None: nothing changed since the newest copy, which already holds them. + saves::backup(&st.dir, &id, &spots, g)?; + kept += 1; + } + Ok(kept) } /// Move the player's copy out of a game folder that's about to go, to "Game Copies/" beside diff --git a/tests/uninstall-keep-saves.test.cjs b/tests/uninstall-keep-saves.test.cjs new file mode 100644 index 00000000..c0c2a247 --- /dev/null +++ b/tests/uninstall-keep-saves.test.cjs @@ -0,0 +1,56 @@ +const { test } = require('node:test'); +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); +const read = (f) => fs.readFileSync(path.join(__dirname, '../ui', f), 'utf8'); +const app = read('app.js'), tv = read('tv.js'); + +// A function declaration out of a file, by name. +function fn(src, name) { + const start = src.indexOf(`function ${name}(`); + assert.ok(start >= 0, name); + let i = src.indexOf('{', start), depth = 0; + for (; i < src.length; i++) { + if (src[i] === '{') depth++; + if (src[i] === '}' && --depth === 0) break; + } + return src.slice(start, i + 1); +} + +test('the desktop uninstall keeps a copy of the saves unless the tick is taken off', () => { + const u = fn(app, 'confirmUninstall'); + assert.match(u, //); + assert.match(u, /keep = !!\(\$\('#u-keep', s\) \|\| \{\}\)\.checked/); + assert.match(u, /invoke\('uninstall', \{ id, deleteFiles: del, runUninstaller: unins, keepSaves: keep \}\)/); +}); + +test('the desktop says where the saves went, or why the folder stayed', () => { + const u = fn(app, 'confirmUninstall'); + assert.match(u, /if \(r\.saves_kept\) toast\(t\('A copy of its saves is kept\./); + assert.match(u, /else if \(del && r\.kept && r\.saves_stuck\) toast\(/); +}); + +test('Big Picture offers the same: delete keeping a copy, or delete the saves too', () => { + const u = fn(tv, 'tvUninstall'); + assert.match(u, /const run = \(del, keep = true\) =>/); + assert.match(u, /invoke\('uninstall', \{ id, deleteFiles: del, keepSaves: keep \}\)/); + assert.match(u, /label: t\('Uninstall and delete its folder'\), sub: tf\('\{path\}\. A copy of its saves is kept first\.'/); + assert.match(u, /label: t\('Delete its folder and its saves'\)[^\n]*run: run\(true, false\)/); + assert.match(u, /if \(r\.saves_kept\) toast\(/); + assert.match(u, /r\.saves_stuck/); +}); + +test('every new uninstall text is in every language', () => { + const texts = [ + 'Keep a copy of its saves first, to put back if you install it again', + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.", + 'A copy of its saves is kept. Install it again and put them back from its Saves tab.', + '{path}. A copy of its saves is kept first.', + 'Delete its folder and its saves', + ]; + const dir = path.join(__dirname, '../ui/i18n'); + for (const f of fs.readdirSync(dir).filter((x) => x.endsWith('.json') && x !== 'en-GB.json')) { + const d = JSON.parse(fs.readFileSync(path.join(dir, f), 'utf8')); + for (const s of texts) assert.ok(d[s], `${f}: ${s}`); + } +}); diff --git a/ui/app.js b/ui/app.js index 38ae764f..424544de 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5884,7 +5884,7 @@ function confirmUninstall(id) {

${esc(t('It comes out of your Library. You can install it again from Discover any time.'))}

${many ? `

${esc(tf('Its {n} games are uninstalled with it: {games}.', { n: many.length, games: many.map((x) => x.name).join(', ') }))}

` : ''} ${g.exe && /^([a-z]:[\\/]|\\\\|\/)/i.test(g.exe) && !String(g.exe).toLowerCase().startsWith(String(g.path).toLowerCase()) ? `

${esc(t('Its own installer put the game somewhere else. With the box ticked, its own uninstaller opens too.'))}

` : ''} - ${g.installer ? `

${esc(tf('Without it, only the Library forgets it. Its folder stays where it is: {path}', { path: g.path }))}

` : g.installer_setup ? '' : ownFolder(g) ? `` : `

${esc(tf('Its folder stays where it is: {path}', { path: g.path }))}

`} + ${g.installer ? `

${esc(tf('Without it, only the Library forgets it. Its folder stays where it is: {path}', { path: g.path }))}

` : g.installer_setup ? '' : ownFolder(g) ? `` : `

${esc(tf('Its folder stays where it is: {path}', { path: g.path }))}

`}
`; document.body.append(s); $('[data-x="no"]', s).focus(); @@ -5892,22 +5892,24 @@ function confirmUninstall(id) { const x = e.target.closest('[data-x]'); if (e.target === s || (x && x.dataset.x === 'no')) return s.remove(); if (!x) return; - const del = !!($('#u-del', s) || {}).checked, unins = !!($('#u-unins', s) || {}).checked; + const del = !!($('#u-del', s) || {}).checked, unins = !!($('#u-unins', s) || {}).checked, keep = !!($('#u-keep', s) || {}).checked; s.remove(); if (unins) toast(tf('{name}\'s uninstaller is opening. Finish it there.', { name: g.name })); let r = {}; - try { r = (await invoke('uninstall', { id, deleteFiles: del, runUninstaller: unins })) || {}; } catch (err) { await refreshState(); render(true); return fail(err); } + try { r = (await invoke('uninstall', { id, deleteFiles: del, runUninstaller: unins, keepSaves: keep })) || {}; } catch (err) { await refreshState(); render(true); return fail(err); } if (window.usageUninstall) window.usageUninstall(id); await keepOut(id); delete S.updates[id]; await refreshState(); render(true); // Some files couldn't go (still in use by something): say where they are. if (r.left) toast(tf('{name} is uninstalled, but a few of its files are still in use and stayed in {path}. Close whatever is using them (or restart), then delete that folder.', { name: g.name, path: r.path }), true); + else if (del && r.kept && r.saves_stuck) toast(tf('{name} is uninstalled, but its folder stayed: a copy of its saves couldn\'t be made first. It\'s in {path}.', { name: g.name, path: r.path }), true); else if (del && r.kept && r.copy_stuck) toast(tf('{name} is uninstalled, but its folder stayed: your copy of the game is inside it and couldn\'t be moved out. It\'s in {path}.', { name: g.name, path: r.path }), true); else if (r.installer) toast(r.uninstaller ? tf('{name} is uninstalled.', { name: g.name }) : tf('{name} is out of your Library. Its folder stays in {path}.', { name: g.name, path: r.path })); else if (r.uninstaller) toast(tf('{name} is uninstalled. Its own uninstaller is open to remove the game from where it installed it.', { name: g.name })); else toast(tf('{name} is uninstalled.', { name: g.name })); // The player's own files that were inside its folder: said apart, whatever else happened. if (r.kept_copy) toast(tf('Your copy of the game was inside its folder, so it\'s kept in {path}.', { path: r.kept_copy })); + if (r.saves_kept) toast(t('A copy of its saves is kept. Install it again and put them back from its Saves tab.')); }); s.addEventListener('keydown', (e) => { if (e.key === 'Escape') s.remove(); }); } diff --git a/ui/i18n/ar.json b/ui/i18n/ar.json index bbb7dfc8..4d4c9a8f 100644 --- a/ui/i18n/ar.json +++ b/ui/i18n/ar.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "يحتاج الإعداد إلى 1 غيغابايت فارغة على الأقل على محرك أقراص اللعبة. حرّر بعض المساحة أو انقل اللعبة إلى محرك أقراص آخر، ثم حاول مرة أخرى.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "في مجلد اللعبة مجلد .recomplauncher-tmp لم ينشئه المشغل، لذلك لن يستخدمه الإعداد. انقله خارج مجلد اللعبة، ثم حاول مرة أخرى.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "تعذّر إنشاء مجلد مؤقت للإعداد في مجلد اللعبة. تأكد من أن محرك الأقراص ليس ممتلئًا ولا للقراءة فقط، ثم حاول مرة أخرى.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "أحد المسارات في مجلد اللعبة أطول مما يحتمله Windows. أضف مجلد مكتبة بمسار أقصر من الإعدادات → الألعاب والمجلدات وانقل اللعبة إليه، أو شغّل إعداد المسارات الطويلة في Windows (LongPathsEnabled)، ثم حاول مرة أخرى. لا يغيّر المشغل هذا الإعداد نيابة عنك." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "أحد المسارات في مجلد اللعبة أطول مما يحتمله Windows. أضف مجلد مكتبة بمسار أقصر من الإعدادات → الألعاب والمجلدات وانقل اللعبة إليه، أو شغّل إعداد المسارات الطويلة في Windows (LongPathsEnabled)، ثم حاول مرة أخرى. لا يغيّر المشغل هذا الإعداد نيابة عنك.", + "Keep a copy of its saves first, to put back if you install it again": "الاحتفاظ بنسخة من ملفات الحفظ أولًا، لإعادتها إذا ثبّتها مرة أخرى", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "تمت إزالة {name}، لكن مجلده بقي: تعذّر عمل نسخة من ملفات الحفظ أولًا. المجلد في {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "تم الاحتفاظ بنسخة من ملفات الحفظ. ثبّت اللعبة مرة أخرى وأعدها من علامة التبويب «ملفات الحفظ».", + "{path}. A copy of its saves is kept first.": "{path}. يُحتفظ بنسخة من ملفات الحفظ أولًا.", + "Delete its folder and its saves": "حذف مجلدها وملفات الحفظ" } diff --git a/ui/i18n/de.json b/ui/i18n/de.json index 90c4499a..910b9848 100644 --- a/ui/i18n/de.json +++ b/ui/i18n/de.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Für die Einrichtung braucht das Laufwerk des Spiels mindestens 1 GB freien Platz. Mach etwas Platz frei oder verschieb das Spiel auf ein anderes Laufwerk und versuch es dann noch einmal.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "Im Ordner des Spiels liegt ein Ordner .recomplauncher-tmp, den nicht der Launcher angelegt hat, deshalb nutzt die Einrichtung ihn nicht. Verschieb ihn aus dem Ordner des Spiels und versuch es dann noch einmal.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Im Ordner des Spiels konnte kein temporärer Ordner für die Einrichtung angelegt werden. Prüf, ob das Laufwerk voll oder schreibgeschützt ist, und versuch es dann noch einmal.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Ein Pfad im Ordner des Spiels ist für Windows zu lang. Füg unter Einstellungen → Spiele und Ordner einen Bibliotheksordner mit kürzerem Pfad hinzu und verschieb das Spiel dorthin, oder schalte die Windows-Einstellung für lange Pfade (LongPathsEnabled) ein und versuch es dann noch einmal. Der Launcher ändert diese Einstellung nicht für dich." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Ein Pfad im Ordner des Spiels ist für Windows zu lang. Füg unter Einstellungen → Spiele und Ordner einen Bibliotheksordner mit kürzerem Pfad hinzu und verschieb das Spiel dorthin, oder schalte die Windows-Einstellung für lange Pfade (LongPathsEnabled) ein und versuch es dann noch einmal. Der Launcher ändert diese Einstellung nicht für dich.", + "Keep a copy of its saves first, to put back if you install it again": "Vorher eine Kopie der Spielstände behalten, um sie nach einer Neuinstallation zurückzuspielen", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} ist deinstalliert, aber der Ordner ist geblieben: Vorher konnte keine Kopie der Spielstände erstellt werden. Er liegt in {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "Eine Kopie der Spielstände bleibt erhalten. Installier das Spiel erneut und spiel sie im Tab „Spielstände“ zurück.", + "{path}. A copy of its saves is kept first.": "{path}. Vorher wird eine Kopie der Spielstände behalten.", + "Delete its folder and its saves": "Ordner und Spielstände löschen" } diff --git a/ui/i18n/es-419.json b/ui/i18n/es-419.json index 69c4e0a5..d11fe953 100644 --- a/ui/i18n/es-419.json +++ b/ui/i18n/es-419.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "La configuración necesita al menos 1 GB libre en la unidad del juego. Libera un poco o mueve el juego a otra unidad y vuelve a intentarlo.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "La carpeta del juego tiene una carpeta .recomplauncher-tmp que no creó el lanzador, así que la configuración no la va a usar. Sácala de la carpeta del juego y vuelve a intentarlo.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "No se pudo crear una carpeta temporal para la configuración en la carpeta del juego. Revisa que la unidad no esté llena ni sea de solo lectura y vuelve a intentarlo.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Una ruta de la carpeta del juego es demasiado larga para Windows. Agrega una carpeta de biblioteca con una ruta más corta en Configuración → Juegos y carpetas y mueve el juego ahí, o activa la configuración de rutas largas de Windows (LongPathsEnabled) y vuelve a intentarlo. El lanzador no cambia esa configuración por ti." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Una ruta de la carpeta del juego es demasiado larga para Windows. Agrega una carpeta de biblioteca con una ruta más corta en Configuración → Juegos y carpetas y mueve el juego ahí, o activa la configuración de rutas largas de Windows (LongPathsEnabled) y vuelve a intentarlo. El lanzador no cambia esa configuración por ti.", + "Keep a copy of its saves first, to put back if you install it again": "Guardar antes una copia de sus partidas, para recuperarlas si lo vuelves a instalar", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} se desinstaló, pero su carpeta se quedó: no se pudo hacer antes una copia de sus partidas. Está en {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "Se guarda una copia de sus partidas. Vuelve a instalarlo y recupéralas desde su pestaña Partidas.", + "{path}. A copy of its saves is kept first.": "{path}. Antes se guarda una copia de sus partidas.", + "Delete its folder and its saves": "Borrar su carpeta y sus partidas" } diff --git a/ui/i18n/es.json b/ui/i18n/es.json index 528173fd..664d65a9 100644 --- a/ui/i18n/es.json +++ b/ui/i18n/es.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "La configuración necesita al menos 1 GB libre en la unidad del juego. Libera un poco o mueve el juego a otra unidad y vuelve a intentarlo.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "La carpeta del juego tiene una carpeta .recomplauncher-tmp que no creó el lanzador, así que la configuración no la usará. Sácala de la carpeta del juego y vuelve a intentarlo.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "No se pudo crear una carpeta temporal para la configuración en la carpeta del juego. Comprueba que la unidad no esté llena ni sea de solo lectura y vuelve a intentarlo.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Una ruta de la carpeta del juego es demasiado larga para Windows. Añade una carpeta de biblioteca con una ruta más corta en Configuración → Juegos y carpetas y mueve el juego allí, o activa el ajuste de rutas largas de Windows (LongPathsEnabled) y vuelve a intentarlo. El lanzador no cambia ese ajuste por ti." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Una ruta de la carpeta del juego es demasiado larga para Windows. Añade una carpeta de biblioteca con una ruta más corta en Configuración → Juegos y carpetas y mueve el juego allí, o activa el ajuste de rutas largas de Windows (LongPathsEnabled) y vuelve a intentarlo. El lanzador no cambia ese ajuste por ti.", + "Keep a copy of its saves first, to put back if you install it again": "Guardar antes una copia de sus partidas, para recuperarlas si lo vuelves a instalar", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} se ha desinstalado, pero su carpeta se ha quedado: no se pudo hacer antes una copia de sus partidas. Está en {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "Se guarda una copia de sus partidas. Vuelve a instalarlo y recupéralas desde su pestaña Partidas.", + "{path}. A copy of its saves is kept first.": "{path}. Antes se guarda una copia de sus partidas.", + "Delete its folder and its saves": "Borrar su carpeta y sus partidas" } diff --git a/ui/i18n/fr-CA.json b/ui/i18n/fr-CA.json index 78589603..60dc52cb 100644 --- a/ui/i18n/fr-CA.json +++ b/ui/i18n/fr-CA.json @@ -1485,5 +1485,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "La configuration a besoin d'au moins 1 Go libre sur le lecteur du jeu. Libère de l'espace ou déplace le jeu sur un autre lecteur, puis réessaie.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "Le dossier du jeu contient un dossier .recomplauncher-tmp que le lanceur n'a pas créé, donc la configuration ne l'utilise pas. Sors-le du dossier du jeu, puis réessaie.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Impossible de créer un dossier temporaire pour la configuration dans le dossier du jeu. Vérifie que le lecteur n'est pas plein ni en lecture seule, puis réessaie.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Un chemin dans le dossier du jeu est trop long pour Windows. Ajoute un dossier de bibliothèque avec un chemin plus court dans Paramètres → Jeux et dossiers et déplaces-y le jeu, ou active le réglage des chemins longs de Windows (LongPathsEnabled), puis réessaie. Le lanceur ne modifie pas ce réglage à ta place." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Un chemin dans le dossier du jeu est trop long pour Windows. Ajoute un dossier de bibliothèque avec un chemin plus court dans Paramètres → Jeux et dossiers et déplaces-y le jeu, ou active le réglage des chemins longs de Windows (LongPathsEnabled), puis réessaie. Le lanceur ne modifie pas ce réglage à ta place.", + "Keep a copy of its saves first, to put back if you install it again": "Garder d'abord une copie de ses sauvegardes, à remettre si tu le réinstalles", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} est désinstallé, mais son dossier est resté : une copie de ses sauvegardes n'a pas pu être faite avant. Il est dans {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "Une copie de ses sauvegardes est gardée. Réinstalle-le et remets-les depuis son onglet Sauvegardes.", + "{path}. A copy of its saves is kept first.": "{path}. Une copie de ses sauvegardes est gardée avant.", + "Delete its folder and its saves": "Supprimer son dossier et ses sauvegardes" } diff --git a/ui/i18n/fr.json b/ui/i18n/fr.json index 0f93621d..eac58b22 100644 --- a/ui/i18n/fr.json +++ b/ui/i18n/fr.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "La configuration a besoin d'au moins 1 Go libre sur le lecteur du jeu. Libérez de l'espace ou déplacez le jeu sur un autre lecteur, puis réessayez.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "Le dossier du jeu contient un dossier .recomplauncher-tmp que le lanceur n'a pas créé, donc la configuration ne l'utilise pas. Sortez-le du dossier du jeu, puis réessayez.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Impossible de créer un dossier temporaire pour la configuration dans le dossier du jeu. Vérifiez que le lecteur n'est pas plein ni en lecture seule, puis réessayez.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Un chemin dans le dossier du jeu est trop long pour Windows. Ajoutez un dossier de bibliothèque avec un chemin plus court dans Paramètres → Jeux et dossiers et déplacez-y le jeu, ou activez le réglage des chemins longs de Windows (LongPathsEnabled), puis réessayez. Le lanceur ne modifie pas ce réglage à votre place." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Un chemin dans le dossier du jeu est trop long pour Windows. Ajoutez un dossier de bibliothèque avec un chemin plus court dans Paramètres → Jeux et dossiers et déplacez-y le jeu, ou activez le réglage des chemins longs de Windows (LongPathsEnabled), puis réessayez. Le lanceur ne modifie pas ce réglage à votre place.", + "Keep a copy of its saves first, to put back if you install it again": "Garder d'abord une copie de ses sauvegardes, à remettre si vous le réinstallez", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} est désinstallé, mais son dossier est resté : une copie de ses sauvegardes n'a pas pu être faite avant. Il est dans {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "Une copie de ses sauvegardes est gardée. Réinstallez-le et remettez-les depuis son onglet Sauvegardes.", + "{path}. A copy of its saves is kept first.": "{path}. Une copie de ses sauvegardes est gardée avant.", + "Delete its folder and its saves": "Supprimer son dossier et ses sauvegardes" } diff --git a/ui/i18n/id.json b/ui/i18n/id.json index 8588d20f..fcf3a055 100644 --- a/ui/i18n/id.json +++ b/ui/i18n/id.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Penyiapan butuh ruang kosong minimal 1 GB di drive game. Kosongkan sedikit ruang, atau pindahkan game ke drive lain, lalu coba lagi.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "Folder game punya folder .recomplauncher-tmp yang tidak dibuat oleh launcher, jadi penyiapan tidak memakainya. Pindahkan folder itu keluar dari folder game, lalu coba lagi.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Tidak bisa membuat folder sementara untuk penyiapan di folder game. Pastikan drive tidak penuh atau hanya-baca, lalu coba lagi.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Ada path di folder game yang terlalu panjang untuk Windows. Tambahkan folder pustaka dengan path lebih pendek di Pengaturan → Game dan folder lalu pindahkan game ke sana, atau nyalakan pengaturan path panjang Windows (LongPathsEnabled), lalu coba lagi. Launcher tidak mengubah pengaturan itu untukmu." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Ada path di folder game yang terlalu panjang untuk Windows. Tambahkan folder pustaka dengan path lebih pendek di Pengaturan → Game dan folder lalu pindahkan game ke sana, atau nyalakan pengaturan path panjang Windows (LongPathsEnabled), lalu coba lagi. Launcher tidak mengubah pengaturan itu untukmu.", + "Keep a copy of its saves first, to put back if you install it again": "Simpan salinan save-nya dulu, untuk dikembalikan kalau kamu memasangnya lagi", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} sudah di-uninstall, tapi foldernya tetap ada: salinan save-nya tidak bisa dibuat dulu. Foldernya di {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "Salinan save-nya disimpan. Pasang lagi game-nya dan kembalikan save dari tab Save.", + "{path}. A copy of its saves is kept first.": "{path}. Salinan save-nya disimpan dulu.", + "Delete its folder and its saves": "Hapus folder dan save-nya" } diff --git a/ui/i18n/it.json b/ui/i18n/it.json index c06b62e0..a051d505 100644 --- a/ui/i18n/it.json +++ b/ui/i18n/it.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "La configurazione richiede almeno 1 GB libero sull'unità del gioco. Libera un po' di spazio o sposta il gioco su un'altra unità, poi riprova.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "La cartella del gioco ha una cartella .recomplauncher-tmp che non ha creato il launcher, quindi la configurazione non la usa. Spostala fuori dalla cartella del gioco, poi riprova.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Impossibile creare una cartella temporanea per la configurazione nella cartella del gioco. Controlla che l'unità non sia piena o di sola lettura, poi riprova.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Un percorso nella cartella del gioco è troppo lungo per Windows. Aggiungi una cartella della libreria con un percorso più corto in Impostazioni → Giochi e cartelle e sposta lì il gioco, oppure attiva l'impostazione dei percorsi lunghi di Windows (LongPathsEnabled), poi riprova. Il launcher non cambia questa impostazione al posto tuo." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Un percorso nella cartella del gioco è troppo lungo per Windows. Aggiungi una cartella della libreria con un percorso più corto in Impostazioni → Giochi e cartelle e sposta lì il gioco, oppure attiva l'impostazione dei percorsi lunghi di Windows (LongPathsEnabled), poi riprova. Il launcher non cambia questa impostazione al posto tuo.", + "Keep a copy of its saves first, to put back if you install it again": "Tieni prima una copia dei suoi salvataggi, da rimettere se lo reinstalli", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} è disinstallato, ma la sua cartella è rimasta: non è stato possibile fare prima una copia dei suoi salvataggi. Si trova in {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "Una copia dei suoi salvataggi viene tenuta. Reinstallalo e rimettili dalla sua scheda Salvataggi.", + "{path}. A copy of its saves is kept first.": "{path}. Prima viene tenuta una copia dei suoi salvataggi.", + "Delete its folder and its saves": "Elimina la cartella e i salvataggi" } diff --git a/ui/i18n/ja.json b/ui/i18n/ja.json index fdbfec9f..b99a9fd2 100644 --- a/ui/i18n/ja.json +++ b/ui/i18n/ja.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "セットアップには、ゲームのドライブに 1 GB 以上の空き容量が必要です。空き容量を増やすか、ゲームを別のドライブに移してから、もう一度お試しください。", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "ゲームのフォルダーに、ランチャーが作ったものではない .recomplauncher-tmp フォルダーがあるため、セットアップでは使いません。ゲームのフォルダーの外に移してから、もう一度お試しください。", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "ゲームのフォルダーにセットアップ用の一時フォルダーを作れませんでした。ドライブがいっぱいでないか、読み取り専用でないかを確認してから、もう一度お試しください。", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "ゲームのフォルダー内のパスが Windows には長すぎます。「設定」→「ゲームとフォルダー」でパスの短いライブラリのフォルダーを追加してゲームをそこへ移すか、Windows の長いパスの設定 (LongPathsEnabled) をオンにしてから、もう一度お試しください。ランチャーがこの設定を変更することはありません。" + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "ゲームのフォルダー内のパスが Windows には長すぎます。「設定」→「ゲームとフォルダー」でパスの短いライブラリのフォルダーを追加してゲームをそこへ移すか、Windows の長いパスの設定 (LongPathsEnabled) をオンにしてから、もう一度お試しください。ランチャーがこの設定を変更することはありません。", + "Keep a copy of its saves first, to put back if you install it again": "先にセーブデータのコピーを残し、再インストールしたときに戻せるようにする", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} をアンインストールしましたが、フォルダーは残っています。先にセーブデータのコピーを作れませんでした。場所は {path} です。", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "セーブデータのコピーを残しました。もう一度インストールして、「セーブデータ」タブから戻してください。", + "{path}. A copy of its saves is kept first.": "{path}。先にセーブデータのコピーを残します。", + "Delete its folder and its saves": "フォルダーとセーブデータを削除" } diff --git a/ui/i18n/ko.json b/ui/i18n/ko.json index 0a7dcf3a..cc861408 100644 --- a/ui/i18n/ko.json +++ b/ui/i18n/ko.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "셋업하려면 게임 드라이브에 여유 공간이 1GB 이상 있어야 합니다. 공간을 확보하거나 게임을 다른 드라이브로 옮긴 뒤 다시 시도하세요.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "게임 폴더에 런처가 만들지 않은 .recomplauncher-tmp 폴더가 있어 셋업에서 사용하지 않습니다. 게임 폴더 밖으로 옮긴 뒤 다시 시도하세요.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "게임 폴더에 셋업용 임시 폴더를 만들지 못했습니다. 드라이브가 가득 찼거나 읽기 전용이 아닌지 확인한 뒤 다시 시도하세요.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "게임 폴더 안의 경로가 Windows에서 쓰기에 너무 깁니다. 설정 → 게임 및 폴더에서 경로가 더 짧은 라이브러리 폴더를 추가하고 게임을 그곳으로 옮기거나, Windows의 긴 경로 설정(LongPathsEnabled)을 켠 뒤 다시 시도하세요. 런처는 이 설정을 대신 바꾸지 않습니다." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "게임 폴더 안의 경로가 Windows에서 쓰기에 너무 깁니다. 설정 → 게임 및 폴더에서 경로가 더 짧은 라이브러리 폴더를 추가하고 게임을 그곳으로 옮기거나, Windows의 긴 경로 설정(LongPathsEnabled)을 켠 뒤 다시 시도하세요. 런처는 이 설정을 대신 바꾸지 않습니다.", + "Keep a copy of its saves first, to put back if you install it again": "먼저 저장 데이터 사본을 남겨 다시 설치하면 되돌릴 수 있게 하기", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name}을(를) 제거했지만 폴더는 남아 있습니다. 먼저 저장 데이터 사본을 만들지 못했습니다. 위치: {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "저장 데이터 사본을 남겼습니다. 다시 설치한 뒤 저장 데이터 탭에서 되돌리세요.", + "{path}. A copy of its saves is kept first.": "{path}. 먼저 저장 데이터 사본을 남깁니다.", + "Delete its folder and its saves": "폴더와 저장 데이터 삭제" } diff --git a/ui/i18n/nl.json b/ui/i18n/nl.json index b3293353..67068fdb 100644 --- a/ui/i18n/nl.json +++ b/ui/i18n/nl.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Instellen heeft minstens 1 GB vrije ruimte nodig op de schijf van de game. Maak wat ruimte vrij of verplaats de game naar een andere schijf en probeer het dan opnieuw.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "De map van de game bevat een map .recomplauncher-tmp die de launcher niet heeft gemaakt, dus instellen gebruikt die niet. Haal hem uit de map van de game en probeer het dan opnieuw.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Kon in de map van de game geen tijdelijke map voor het instellen maken. Controleer of de schijf niet vol of alleen-lezen is en probeer het dan opnieuw.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Een pad in de map van de game is te lang voor Windows. Voeg in Instellingen → Games en mappen een bibliotheekmap met een korter pad toe en verplaats de game daarheen, of zet de Windows-instelling voor lange paden (LongPathsEnabled) aan en probeer het dan opnieuw. De launcher verandert die instelling niet voor je." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Een pad in de map van de game is te lang voor Windows. Voeg in Instellingen → Games en mappen een bibliotheekmap met een korter pad toe en verplaats de game daarheen, of zet de Windows-instelling voor lange paden (LongPathsEnabled) aan en probeer het dan opnieuw. De launcher verandert die instelling niet voor je.", + "Keep a copy of its saves first, to put back if you install it again": "Eerst een kopie van de opgeslagen games bewaren, om terug te zetten als je hem opnieuw installeert", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} is verwijderd, maar de map is gebleven: er kon eerst geen kopie van de opgeslagen games worden gemaakt. Hij staat in {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "Er is een kopie van de opgeslagen games bewaard. Installeer hem opnieuw en zet ze terug via het tabblad Opgeslagen games.", + "{path}. A copy of its saves is kept first.": "{path}. Er wordt eerst een kopie van de opgeslagen games bewaard.", + "Delete its folder and its saves": "De map en de opgeslagen games wissen" } diff --git a/ui/i18n/pl.json b/ui/i18n/pl.json index 22986dc0..8dc92ffd 100644 --- a/ui/i18n/pl.json +++ b/ui/i18n/pl.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Konfiguracja wymaga co najmniej 1 GB wolnego miejsca na dysku gry. Zwolnij trochę miejsca albo przenieś grę na inny dysk i spróbuj ponownie.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "W folderze gry jest folder .recomplauncher-tmp, którego nie utworzył launcher, więc konfiguracja go nie użyje. Przenieś go poza folder gry i spróbuj ponownie.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Nie udało się utworzyć folderu tymczasowego dla konfiguracji w folderze gry. Sprawdź, czy dysk nie jest pełny ani tylko do odczytu, i spróbuj ponownie.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Ścieżka w folderze gry jest za długa dla Windows. Dodaj folder biblioteki z krótszą ścieżką w Ustawienia → Gry i foldery i przenieś tam grę albo włącz ustawienie długich ścieżek w Windows (LongPathsEnabled) i spróbuj ponownie. Launcher nie zmienia tego ustawienia za ciebie." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Ścieżka w folderze gry jest za długa dla Windows. Dodaj folder biblioteki z krótszą ścieżką w Ustawienia → Gry i foldery i przenieś tam grę albo włącz ustawienie długich ścieżek w Windows (LongPathsEnabled) i spróbuj ponownie. Launcher nie zmienia tego ustawienia za ciebie.", + "Keep a copy of its saves first, to put back if you install it again": "Najpierw zachowaj kopię zapisów, by przywrócić je po ponownej instalacji", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} odinstalowano, ale jej folder został: nie udało się najpierw zrobić kopii zapisów. Jest w {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "Kopia zapisów została zachowana. Zainstaluj grę ponownie i przywróć je na karcie Zapisy.", + "{path}. A copy of its saves is kept first.": "{path}. Najpierw zostanie zachowana kopia zapisów.", + "Delete its folder and its saves": "Usuń folder i zapisy" } diff --git a/ui/i18n/pt-BR.json b/ui/i18n/pt-BR.json index f79bda6b..a0d5d7ae 100644 --- a/ui/i18n/pt-BR.json +++ b/ui/i18n/pt-BR.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "A configuração precisa de pelo menos 1 GB livre na unidade do jogo. Libere um pouco de espaço ou mova o jogo para outra unidade e tente de novo.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "A pasta do jogo tem uma pasta .recomplauncher-tmp que não foi criada pelo launcher, então a configuração não vai usá-la. Tire-a da pasta do jogo e tente de novo.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Não foi possível criar uma pasta temporária para a configuração na pasta do jogo. Verifique se a unidade não está cheia nem somente leitura e tente de novo.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Um caminho na pasta do jogo é longo demais para o Windows. Adicione uma pasta da biblioteca com um caminho mais curto em Configurações → Jogos e pastas e mova o jogo para lá, ou ative a configuração de caminhos longos do Windows (LongPathsEnabled) e tente de novo. O launcher não muda essa configuração por você." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Um caminho na pasta do jogo é longo demais para o Windows. Adicione uma pasta da biblioteca com um caminho mais curto em Configurações → Jogos e pastas e mova o jogo para lá, ou ative a configuração de caminhos longos do Windows (LongPathsEnabled) e tente de novo. O launcher não muda essa configuração por você.", + "Keep a copy of its saves first, to put back if you install it again": "Guardar antes uma cópia dos dados salvos, para restaurar se você instalar de novo", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} foi desinstalado, mas a pasta dele ficou: não foi possível fazer antes uma cópia dos dados salvos. Ela está em {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "Uma cópia dos dados salvos fica guardada. Instale de novo e restaure pela aba Dados salvos.", + "{path}. A copy of its saves is kept first.": "{path}. Antes, uma cópia dos dados salvos fica guardada.", + "Delete its folder and its saves": "Apagar a pasta e os dados salvos" } diff --git a/ui/i18n/pt.json b/ui/i18n/pt.json index 5346a0ae..07a18451 100644 --- a/ui/i18n/pt.json +++ b/ui/i18n/pt.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "A configuração precisa de pelo menos 1 GB livre na unidade do jogo. Liberta algum espaço ou move o jogo para outra unidade e tenta de novo.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "A pasta do jogo tem uma pasta .recomplauncher-tmp que não foi criada pelo launcher, por isso a configuração não a usa. Tira-a da pasta do jogo e tenta de novo.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Não foi possível criar uma pasta temporária para a configuração na pasta do jogo. Verifica se a unidade não está cheia nem só de leitura e tenta de novo.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Um caminho na pasta do jogo é demasiado longo para o Windows. Adiciona uma pasta da biblioteca com um caminho mais curto em Definições → Jogos e pastas e move o jogo para lá, ou ativa a definição de caminhos longos do Windows (LongPathsEnabled) e tenta de novo. O launcher não muda essa definição por ti." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Um caminho na pasta do jogo é demasiado longo para o Windows. Adiciona uma pasta da biblioteca com um caminho mais curto em Definições → Jogos e pastas e move o jogo para lá, ou ativa a definição de caminhos longos do Windows (LongPathsEnabled) e tenta de novo. O launcher não muda essa definição por ti.", + "Keep a copy of its saves first, to put back if you install it again": "Guardar primeiro uma cópia dos dados guardados, para repor se o voltares a instalar", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} foi desinstalado, mas a pasta ficou: não foi possível fazer antes uma cópia dos dados guardados. Está em {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "Fica guardada uma cópia dos dados guardados. Volta a instalá-lo e repõe-nos no separador Dados guardados.", + "{path}. A copy of its saves is kept first.": "{path}. Antes fica guardada uma cópia dos dados guardados.", + "Delete its folder and its saves": "Apagar a pasta e os dados guardados" } diff --git a/ui/i18n/ru.json b/ui/i18n/ru.json index 35eeb974..e04b97dc 100644 --- a/ui/i18n/ru.json +++ b/ui/i18n/ru.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Для настройки на диске игры должно быть свободно не меньше 1 ГБ. Освободите немного места или перенесите игру на другой диск и попробуйте снова.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "В папке игры есть папка .recomplauncher-tmp, которую создал не лаунчер, поэтому настройка её не использует. Уберите её из папки игры и попробуйте снова.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Не удалось создать временную папку для настройки в папке игры. Проверьте, что диск не заполнен и не доступен только для чтения, и попробуйте снова.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Путь в папке игры слишком длинный для Windows. Добавьте папку библиотеки с более коротким путём в разделе Настройки → Игры и папки и перенесите туда игру или включите в Windows параметр длинных путей (LongPathsEnabled) и попробуйте снова. Лаунчер сам этот параметр не меняет." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Путь в папке игры слишком длинный для Windows. Добавьте папку библиотеки с более коротким путём в разделе Настройки → Игры и папки и перенесите туда игру или включите в Windows параметр длинных путей (LongPathsEnabled) и попробуйте снова. Лаунчер сам этот параметр не меняет.", + "Keep a copy of its saves first, to put back if you install it again": "Сначала сохранить копию сохранений, чтобы вернуть их после повторной установки", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} удалена, но её папка осталась: сначала не удалось сделать копию сохранений. Она в {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "Копия сохранений сохранена. Установите игру снова и верните их на вкладке «Сохранения».", + "{path}. A copy of its saves is kept first.": "{path}. Сначала будет сделана копия сохранений.", + "Delete its folder and its saves": "Удалить папку вместе с сохранениями" } diff --git a/ui/i18n/th.json b/ui/i18n/th.json index c8e4a2d0..2efd1f76 100644 --- a/ui/i18n/th.json +++ b/ui/i18n/th.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "การตั้งค่าต้องมีพื้นที่ว่างอย่างน้อย 1 GB ในไดรฟ์ของเกม เคลียร์พื้นที่บางส่วนหรือย้ายเกมไปไดรฟ์อื่น แล้วลองอีกครั้ง", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "โฟลเดอร์ของเกมมีโฟลเดอร์ .recomplauncher-tmp ที่ตัวเปิดเกมไม่ได้สร้าง การตั้งค่าจึงจะไม่ใช้มัน ย้ายมันออกจากโฟลเดอร์ของเกม แล้วลองอีกครั้ง", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "สร้างโฟลเดอร์ชั่วคราวสำหรับการตั้งค่าในโฟลเดอร์ของเกมไม่ได้ ตรวจสอบว่าไดรฟ์ไม่เต็มหรือไม่ได้เป็นแบบอ่านอย่างเดียว แล้วลองอีกครั้ง", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "พาธในโฟลเดอร์ของเกมยาวเกินไปสำหรับ Windows เพิ่มโฟลเดอร์คลังที่มีพาธสั้นกว่าใน การตั้งค่า → เกมและโฟลเดอร์ แล้วย้ายเกมไปที่นั่น หรือเปิดการตั้งค่าพาธยาวของ Windows (LongPathsEnabled) แล้วลองอีกครั้ง ตัวเปิดเกมจะไม่เปลี่ยนการตั้งค่านั้นให้คุณ" + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "พาธในโฟลเดอร์ของเกมยาวเกินไปสำหรับ Windows เพิ่มโฟลเดอร์คลังที่มีพาธสั้นกว่าใน การตั้งค่า → เกมและโฟลเดอร์ แล้วย้ายเกมไปที่นั่น หรือเปิดการตั้งค่าพาธยาวของ Windows (LongPathsEnabled) แล้วลองอีกครั้ง ตัวเปิดเกมจะไม่เปลี่ยนการตั้งค่านั้นให้คุณ", + "Keep a copy of its saves first, to put back if you install it again": "เก็บสำเนาเซฟไว้ก่อน เพื่อใส่กลับถ้าคุณติดตั้งใหม่", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "ถอนการติดตั้ง {name} แล้ว แต่โฟลเดอร์ยังอยู่: ทำสำเนาเซฟไว้ก่อนไม่ได้ โฟลเดอร์อยู่ที่ {path}", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "เก็บสำเนาเซฟไว้แล้ว ติดตั้งเกมใหม่แล้วใส่เซฟกลับจากแท็บเซฟ", + "{path}. A copy of its saves is kept first.": "{path} จะเก็บสำเนาเซฟไว้ก่อน", + "Delete its folder and its saves": "ลบโฟลเดอร์และเซฟ" } diff --git a/ui/i18n/tr.json b/ui/i18n/tr.json index bff421c9..9a9c68df 100644 --- a/ui/i18n/tr.json +++ b/ui/i18n/tr.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Kurulum için oyunun sürücüsünde en az 1 GB boş alan gerekiyor. Biraz yer açın ya da oyunu başka bir sürücüye taşıyın, sonra yeniden deneyin.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "Oyunun klasöründe başlatıcının oluşturmadığı bir .recomplauncher-tmp klasörü var, bu yüzden kurulum onu kullanmıyor. Onu oyunun klasöründen çıkarın, sonra yeniden deneyin.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Oyunun klasöründe kurulum için geçici bir klasör oluşturulamadı. Sürücünün dolu ya da salt okunur olmadığını kontrol edin, sonra yeniden deneyin.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Oyunun klasöründeki bir yol Windows için fazla uzun. Ayarlar → Oyunlar ve klasörler bölümünden daha kısa yollu bir kitaplık klasörü ekleyip oyunu oraya taşıyın ya da Windows'un uzun yollar ayarını (LongPathsEnabled) açın, sonra yeniden deneyin. Başlatıcı bu ayarı sizin yerinize değiştirmez." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Oyunun klasöründeki bir yol Windows için fazla uzun. Ayarlar → Oyunlar ve klasörler bölümünden daha kısa yollu bir kitaplık klasörü ekleyip oyunu oraya taşıyın ya da Windows'un uzun yollar ayarını (LongPathsEnabled) açın, sonra yeniden deneyin. Başlatıcı bu ayarı sizin yerinize değiştirmez.", + "Keep a copy of its saves first, to put back if you install it again": "Önce kayıtlarının bir kopyası saklansın, oyunu yeniden yüklerseniz geri koymak için", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} kaldırıldı ama klasörü duruyor: önce kayıtlarının bir kopyası alınamadı. Klasör {path} içinde.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "Kayıtlarının bir kopyası saklandı. Oyunu yeniden yükleyin ve Kayıtlar sekmesinden geri koyun.", + "{path}. A copy of its saves is kept first.": "{path}. Önce kayıtlarının bir kopyası saklanır.", + "Delete its folder and its saves": "Klasörünü ve kayıtlarını sil" } diff --git a/ui/i18n/uk.json b/ui/i18n/uk.json index 32c7e815..6a3da0b3 100644 --- a/ui/i18n/uk.json +++ b/ui/i18n/uk.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Для налаштування на диску гри має бути вільно щонайменше 1 ГБ. Звільни трохи місця або перенеси гру на інший диск і спробуй ще раз.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "У папці гри є папка .recomplauncher-tmp, яку створив не лаунчер, тому налаштування її не використовує. Прибери її з папки гри і спробуй ще раз.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Не вдалося створити тимчасову папку для налаштування в папці гри. Перевір, що диск не заповнений і не лише для читання, і спробуй ще раз.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Шлях у папці гри задовгий для Windows. Додай папку бібліотеки з коротшим шляхом у Налаштування → Ігри та папки й перенеси туди гру або ввімкни в Windows параметр довгих шляхів (LongPathsEnabled) і спробуй ще раз. Лаунчер сам цей параметр не змінює." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Шлях у папці гри задовгий для Windows. Додай папку бібліотеки з коротшим шляхом у Налаштування → Ігри та папки й перенеси туди гру або ввімкни в Windows параметр довгих шляхів (LongPathsEnabled) і спробуй ще раз. Лаунчер сам цей параметр не змінює.", + "Keep a copy of its saves first, to put back if you install it again": "Спершу зберегти копію збережень, щоб повернути їх після повторного встановлення", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} видалено, але її папка лишилася: спершу не вдалося зробити копію збережень. Вона в {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "Копію збережень збережено. Встанови гру знову й поверни їх на вкладці «Збереження».", + "{path}. A copy of its saves is kept first.": "{path}. Спершу буде зроблено копію збережень.", + "Delete its folder and its saves": "Видалити папку разом зі збереженнями" } diff --git a/ui/i18n/vi.json b/ui/i18n/vi.json index a0407dab..28e68dbd 100644 --- a/ui/i18n/vi.json +++ b/ui/i18n/vi.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "Thiết lập cần ít nhất 1 GB trống trên ổ của trò chơi. Hãy giải phóng bớt dung lượng hoặc chuyển trò chơi sang ổ khác, rồi thử lại.", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "Thư mục trò chơi có một thư mục .recomplauncher-tmp không do trình khởi chạy tạo, nên thiết lập sẽ không dùng nó. Hãy chuyển nó ra khỏi thư mục trò chơi, rồi thử lại.", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "Không tạo được thư mục tạm cho thiết lập trong thư mục trò chơi. Hãy kiểm tra ổ đĩa không bị đầy hoặc chỉ đọc, rồi thử lại.", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Một đường dẫn trong thư mục trò chơi quá dài đối với Windows. Hãy thêm một thư mục thư viện có đường dẫn ngắn hơn trong Cài đặt → Trò chơi và thư mục rồi chuyển trò chơi sang đó, hoặc bật cài đặt đường dẫn dài của Windows (LongPathsEnabled), rồi thử lại. Trình khởi chạy không tự thay đổi cài đặt đó cho bạn." + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "Một đường dẫn trong thư mục trò chơi quá dài đối với Windows. Hãy thêm một thư mục thư viện có đường dẫn ngắn hơn trong Cài đặt → Trò chơi và thư mục rồi chuyển trò chơi sang đó, hoặc bật cài đặt đường dẫn dài của Windows (LongPathsEnabled), rồi thử lại. Trình khởi chạy không tự thay đổi cài đặt đó cho bạn.", + "Keep a copy of its saves first, to put back if you install it again": "Giữ trước một bản sao dữ liệu lưu, để khôi phục nếu bạn cài lại", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "Đã gỡ {name}, nhưng thư mục của nó vẫn còn: không tạo được bản sao dữ liệu lưu trước. Nó nằm ở {path}.", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "Đã giữ một bản sao dữ liệu lưu. Hãy cài lại trò chơi và khôi phục từ thẻ Dữ liệu lưu.", + "{path}. A copy of its saves is kept first.": "{path}. Một bản sao dữ liệu lưu sẽ được giữ trước.", + "Delete its folder and its saves": "Xóa thư mục và dữ liệu lưu" } diff --git a/ui/i18n/zh-Hans.json b/ui/i18n/zh-Hans.json index 407c5d54..9a664248 100644 --- a/ui/i18n/zh-Hans.json +++ b/ui/i18n/zh-Hans.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "配置需要游戏所在驱动器至少有 1 GB 可用空间。请腾出一些空间,或把游戏移到其他驱动器,然后重试。", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "游戏文件夹里有一个不是启动器创建的 .recomplauncher-tmp 文件夹,所以配置不会使用它。请把它移出游戏文件夹,然后重试。", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "无法在游戏文件夹中为配置创建临时文件夹。请检查驱动器是否已满或为只读,然后重试。", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "游戏文件夹中的某个路径对 Windows 来说太长。请在“设置”→“游戏和文件夹”中添加一个路径更短的游戏库文件夹并把游戏移过去,或打开 Windows 的长路径设置(LongPathsEnabled),然后重试。启动器不会替你更改这个设置。" + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "游戏文件夹中的某个路径对 Windows 来说太长。请在“设置”→“游戏和文件夹”中添加一个路径更短的游戏库文件夹并把游戏移过去,或打开 Windows 的长路径设置(LongPathsEnabled),然后重试。启动器不会替你更改这个设置。", + "Keep a copy of its saves first, to put back if you install it again": "先保留一份存档副本,重新安装后可以放回", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} 已卸载,但它的文件夹还在:无法先做一份存档副本。它位于 {path}。", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "已保留一份存档副本。重新安装后,可在“存档”选项卡中放回。", + "{path}. A copy of its saves is kept first.": "{path}。会先保留一份存档副本。", + "Delete its folder and its saves": "删除其文件夹和存档" } diff --git a/ui/i18n/zh-Hant.json b/ui/i18n/zh-Hant.json index e67c25a0..265d742f 100644 --- a/ui/i18n/zh-Hant.json +++ b/ui/i18n/zh-Hant.json @@ -3361,5 +3361,10 @@ "Setup needs at least 1 GB free on the game's drive. Free some up, or move the game to another drive, then try again.": "設定需要遊戲所在的磁碟機至少有 1 GB 可用空間。請騰出一些空間,或把遊戲移到其他磁碟機,然後再試一次。", "The game's folder has a .recomplauncher-tmp folder the launcher didn't make, so setup won't use it. Move it out of the game's folder, then try again.": "遊戲資料夾裡有一個不是啟動器建立的 .recomplauncher-tmp 資料夾,所以設定不會使用它。請把它移出遊戲資料夾,然後再試一次。", "Couldn't make a temp folder for setup in the game's folder. Check the drive isn't full or read-only, then try again.": "無法在遊戲資料夾中為設定建立暫存資料夾。請檢查磁碟機是否已滿或為唯讀,然後再試一次。", - "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "遊戲資料夾中的某個路徑對 Windows 來說太長。請在「設定」→「遊戲和資料夾」中新增一個路徑較短的遊戲庫資料夾並把遊戲移過去,或開啟 Windows 的長路徑設定(LongPathsEnabled),然後再試一次。啟動器不會替你變更這個設定。" + "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you.": "遊戲資料夾中的某個路徑對 Windows 來說太長。請在「設定」→「遊戲和資料夾」中新增一個路徑較短的遊戲庫資料夾並把遊戲移過去,或開啟 Windows 的長路徑設定(LongPathsEnabled),然後再試一次。啟動器不會替你變更這個設定。", + "Keep a copy of its saves first, to put back if you install it again": "先保留一份存檔副本,重新安裝後可以放回", + "{name} is uninstalled, but its folder stayed: a copy of its saves couldn't be made first. It's in {path}.": "{name} 已解除安裝,但它的資料夾還在:無法先做一份存檔副本。它位於 {path}。", + "A copy of its saves is kept. Install it again and put them back from its Saves tab.": "已保留一份存檔副本。重新安裝後,可在「存檔」分頁中放回。", + "{path}. A copy of its saves is kept first.": "{path}。會先保留一份存檔副本。", + "Delete its folder and its saves": "刪除其資料夾和存檔" } diff --git a/ui/tv.js b/ui/tv.js index 0282faa4..87fba5bd 100644 --- a/ui/tv.js +++ b/ui/tv.js @@ -1824,9 +1824,11 @@ const g = S.library[id]; if (!g) return; if (S.running.has(id)) return toast(t('Close the game first.'), true); - const run = (del) => async () => { + // keep: a copy of its saves first, as the desktop's tick does (on unless the player picks the + // item that deletes them too). + const run = (del, keep = true) => async () => { let r = {}; - try { r = (await invoke('uninstall', { id, deleteFiles: del })) || {}; } catch (e) { await refreshState(); draw(true); return fail(e); } + try { r = (await invoke('uninstall', { id, deleteFiles: del, keepSaves: keep })) || {}; } catch (e) { await refreshState(); draw(true); return fail(e); } if (window.usageUninstall) window.usageUninstall(id); if (window.keepOut) await window.keepOut(id); delete S.updates[id]; @@ -1834,15 +1836,18 @@ await refreshState(); render(true); if (r.left) toast(tf('{name} is uninstalled, but a few of its files are still in use and stayed in {path}. Close whatever is using them (or restart), then delete that folder.', { name: g.name, path: r.path }), true); + else if (del && r.kept && r.saves_stuck) toast(tf('{name} is uninstalled, but its folder stayed: a copy of its saves couldn\'t be made first. It\'s in {path}.', { name: g.name, path: r.path }), true); else if (r.uninstaller) toast(tf('{name} is uninstalled. Its own uninstaller is open to remove the game from where it installed it.', { name: g.name })); else toast(tf('{name} is uninstalled.', { name: g.name })); + if (r.saves_kept) toast(t('A copy of its saves is kept. Install it again and put them back from its Saves tab.')); draw(true); }; const own = ownFolder(g); sheet(tf('Uninstall {name}?', { name: g.name }), [ { label: t('Keep it'), sub: t('Nothing changes'), icon: 'chevL', run: () => {} }, ...(own - ? [{ label: t('Uninstall and delete its folder'), sub: tf('{path}, with the saves and settings inside it', { path: g.path }), icon: 'bin', cls: 'danger', run: run(true) }, + ? [{ label: t('Uninstall and delete its folder'), sub: tf('{path}. A copy of its saves is kept first.', { path: g.path }), icon: 'bin', cls: 'danger', run: run(true) }, + { label: t('Delete its folder and its saves'), sub: tf('{path}, with the saves and settings inside it', { path: g.path }), icon: 'bin', cls: 'danger', run: run(true, false) }, { label: t('Uninstall, keep its folder'), sub: t('It comes out of your Library and its files stay'), icon: 'folder', run: run(false) }] : [{ label: t('Uninstall'), sub: tf('Its folder stays where it is: {path}', { path: g.path }), icon: 'bin', cls: 'danger', run: run(false) }]), ]); From 7ce7d64f956a412bb308103913451d223873cd72 Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 01:45:00 +0200 Subject: [PATCH 04/15] Developer tools flag a build step without prepare.done, and writes outside {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. --- docs/DEVELOPERS.md | 2 + src-tauri/src/devtools.rs | 86 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) diff --git a/docs/DEVELOPERS.md b/docs/DEVELOPERS.md index ca5cb93f..3cba19a3 100644 --- a/docs/DEVELOPERS.md +++ b/docs/DEVELOPERS.md @@ -857,6 +857,8 @@ The launcher has tools for this. In Settings, open Developers and turn on Develo and the choice each setting shows right now. Problems are marked in red, things worth a look in yellow. JSON mistakes show the line and column. It also sums up how the game is set up (launches with the player's copy, or needs a one-time step) and what it can do. + It also flags, in yellow, a step that builds from the player's copy without `prepare.done`, and + paths your game writes to outside `{install}` and `{data}`. Those never stop your game. No file yet? "Make a starter file" writes one next to your program to begin from. 3. **Try it like a player.** Set it up with your own disc, change a setting, then open your settings file: only the keys you listed should have changed. Press Play: your game should start diff --git a/src-tauri/src/devtools.rs b/src-tauri/src/devtools.rs index 95c667d6..d4c68354 100644 --- a/src-tauri/src/devtools.rs +++ b/src-tauri/src/devtools.rs @@ -468,10 +468,58 @@ fn check_profile(p: &profile::Profile, dir: &Path, g: &Installed, items: &mut Ve } items.extend(option_items(&pr.options)); items.extend(version_item(&pr.version)); + items.extend(done_item(p)); + let bad: Vec<&str> = pr.env.keys().filter(|k| !profile::env_name_ok(k)).map(String::as_str).collect(); + if !bad.is_empty() { + items.push(warn(format!("Left out of \"prepare.env\": {}", bad.join(", ")), + "Names are letters, digits and _. The launcher's own RECOMPLAUNCHER_ ones and system ones like PATH and TEMP can't be set: the step gets a temp folder of its own.")); + } } + items.extend(outside_item(p)); level } +/// A step that builds the game from the player's copy, without `prepare.done`: the launcher can't +/// tell the build is there, so it can't keep the game set up after an update, or use a build the +/// player already has. Only then: a step that only fetches extras needs no list. +fn done_item(p: &profile::Profile) -> Option { + let pr = p.prepare.as_ref()?; + let from_copy = p.game.is_some() || !p.inputs.is_empty(); + if !from_copy || !pr.done.is_empty() { + return None; + } + Some(warn( + "No \"prepare.done\"", + "List a file your step always leaves, like \"{data}/build/game.pak\": the launcher then knows the game is built, keeps it set up after an update, and can use a build the player already has.", + )) +} + +/// The places outside the game's folder a profile has the game write to (saves, settings, builds, +/// the folders it passes). Not wrong, but everything in `{install}` or `{data}` moves, backs up and +/// uninstalls with the game, and nothing is left behind. +fn outside_item(p: &profile::Profile) -> Option { + const OUTSIDE: [&str; 5] = ["{home}", "{local}", "{config}", "{documents}", "{appdata}"]; + let mut written: Vec<&str> = p.saves.iter().map(String::as_str).collect(); + written.extend(p.config.iter().flat_map(|c| c.file.iter().map(|f| f.path.as_str()))); + written.extend(p.folders.values().flatten().map(|f| f.path.as_str())); + if let Some(s) = p.start.as_ref() { + written.extend(s.args.iter().chain(s.env.values()).map(String::as_str)); + } + if let Some(pr) = p.prepare.as_ref() { + written.extend(pr.args.iter().chain(pr.env.values()).chain(pr.done.iter()).map(String::as_str)); + } + let mut outside: Vec<&str> = written.into_iter().filter(|w| OUTSIDE.iter().any(|o| w.contains(o))).collect(); + outside.sort(); + outside.dedup(); + if outside.is_empty() { + return None; + } + Some(warn( + format!("Writes outside {{install}} and {{data}}: {}", outside.join(", ")), + "Keep saves, settings, caches and builds in {data} (or {install}): they then move, back up and uninstall with the game. Players' saves already elsewhere are fine to keep reading.", + )) +} + /// prepare.version: changing it is how a json asks players who set up already to run it again. fn version_item(v: &str) -> Option { if v.is_empty() { @@ -588,6 +636,44 @@ mod tests { assert!(items[0].text.contains("starts off") && items[0].text.contains("required"), "{}", items[0].text); } + fn profile(json: &str) -> crate::profile::Profile { + serde_json::from_str(json).unwrap() + } + + #[test] + fn a_step_building_from_the_copy_without_done_is_warned() { + let p = profile(r#"{"format":1,"game":{"kind":"iso"},"prepare":{"program":["Builder.exe"],"args":["{game}"]}}"#); + let item = super::done_item(&p).unwrap(); + assert_eq!(item.level, "warn"); + assert!(item.text.contains("prepare.done"), "{}", item.text); + } + + #[test] + fn a_step_with_done_or_without_a_copy_is_left_alone() { + let with_done = profile(r#"{"format":1,"game":{"kind":"iso"},"prepare":{"program":["Builder.exe"],"done":["{data}/build/game.pak"]}}"#); + assert!(super::done_item(&with_done).is_none()); + let extras_only = profile(r#"{"format":1,"prepare":{"program":["Fetcher.exe"]}}"#); + assert!(super::done_item(&extras_only).is_none()); + let no_step = profile(r#"{"format":1,"game":{"kind":"iso"}}"#); + assert!(super::done_item(&no_step).is_none()); + } + + #[test] + fn writing_outside_the_game_folder_is_named() { + let p = profile(r#"{"format":1,"saves":["{local}/Game/saves","{data}/saves"], + "prepare":{"program":["Builder.exe"],"args":["--out","{home}/Games/Game"],"env":{"CACHE":"{data}/cache"}}}"#); + let item = super::outside_item(&p).unwrap(); + assert_eq!(item.level, "warn"); + assert!(item.text.contains("{local}/Game/saves") && item.text.contains("{home}/Games/Game"), "{}", item.text); + assert!(!item.text.contains("{data}/"), "{}", item.text); + } + + #[test] + fn writing_only_in_install_and_data_is_fine() { + let p = profile(r#"{"format":1,"saves":["{data}/saves","{install}/settings.toml"],"start":{"program":["g.exe"],"args":["--data","{data}"]}}"#); + assert!(super::outside_item(&p).is_none()); + } + #[test] fn the_setup_steps_version_is_named_in_the_check() { assert!(super::version_item("").is_none()); From 2b00f394a86229df7cf653366dc33e3779ce96c9 Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 01:50:00 +0200 Subject: [PATCH 05/15] Developer guide: Linux ships a tarball and an AppImage of one portable 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. --- docs/DEVELOPERS.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/DEVELOPERS.md b/docs/DEVELOPERS.md index 3cba19a3..97dd75be 100644 --- a/docs/DEVELOPERS.md +++ b/docs/DEVELOPERS.md @@ -42,11 +42,18 @@ through us, and every release you publish reaches players the next time the laun `MyRecomp-v1.2.0-Windows-x64.zip`, `MyRecomp-v1.2.0-Linux-x64.AppImage`. The launcher picks the file for the player's PC from those words. Builds for ARM say `arm64`. - **Zips on Windows.** A `.zip` (or `.7z`) of your folder is best. An installer `.exe` works, but - it's the last choice, because it wants to be run as setup. On Linux, an AppImage or a `.tar.gz`. + it's the last choice, because it wants to be run as setup. Never install into Program Files + without a proper installer and uninstaller (MSIX) or a package manager: the launcher can't + update or remove what lands there. +- **On Linux, a `.tar.gz` and an AppImage of the same folder.** Build it once, portably, so it runs + on older systems too: in a GitHub Actions `ubuntu:22.04` container, or the Steam Runtime's + `sniper` SDK. Then pack that one folder both ways. The launcher can run every game from a plain + folder, and players who want a single file get the AppImage. - **One folder on top is fine.** A zip with everything inside `MyRecomp-v1.2.0/` is unwrapped, so your program lands in the game's folder either way. - **Keep extras out of the way.** Files with `debug`, `symbols`, `pdb` or `source` in the name, and - `.sha256`, `.sig` and `.asc` files, are never taken for the game. + `.sha256`, `.sig` and `.asc` files, are never taken for the game. So a source archive you upload + yourself says `source` in its name: `MyRecomp-v1.2.0-source.tar.gz`. - **Checked on the way in.** GitHub keeps a SHA-256 of every file you upload, and the launcher checks the download against it before installing. You don't have to do anything. - **Updates keep what the game made.** An update unpacks over the game's folder, so saves, From 9d0caa7d2bf6606cfeaa8f5627ba49b1c0fbc1cd Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 15:38:39 +0200 Subject: [PATCH 06/15] A setup step run again without the copy leaves out prepare.env values 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. --- docs/DEVELOPERS.md | 2 +- docs/recomplauncher.schema.json | 2 +- src-tauri/src/profile.rs | 12 ++++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/docs/DEVELOPERS.md b/docs/DEVELOPERS.md index 7dfd06dc..12d9d3c6 100644 --- a/docs/DEVELOPERS.md +++ b/docs/DEVELOPERS.md @@ -672,7 +672,7 @@ settings are written. It runs again whenever the player changes their copy. from what the first build unpacked. Then a player who deleted their copy to save space isn't asked for it again: when `version` changes, or a file of `done` is missing, Play builds the game again from what you kept, and Easy Setup runs the step the same way when no copy is picked. The - launcher leaves out every argument with `{game}` in it, so write the copy as one argument + launcher leaves out every argument (and `prepare.env` value) with `{game}` in it, so write the copy as one argument (`--game={game}`, not `"--game", "{game}"`); option args (`--fetch-ngx-sdk`) are still added. List `done` too, so the launcher can tell when the build is finished. When your build folder is gone, or the run fails, the player is asked for their copy and the game is built from that. diff --git a/docs/recomplauncher.schema.json b/docs/recomplauncher.schema.json index 26f30a6e..df261be2 100644 --- a/docs/recomplauncher.schema.json +++ b/docs/recomplauncher.schema.json @@ -386,7 +386,7 @@ "keeps_copy": { "type": "boolean", "default": false, - "description": "Your step keeps what it needs from the copy in your build folder (the first folders.game) and can run again from there without it. With the copy gone, the launcher runs it again leaving out every argument with {game} in it, so write the copy as one argument (--game={game}). List done too." + "description": "Your step keeps what it needs from the copy in your build folder (the first folders.game) and can run again from there without it. With the copy gone, the launcher runs it again leaving out every argument (and prepare.env value) with {game} in it, so write the copy as one argument (--game={game}). List done too." }, "version": { "type": "string", diff --git a/src-tauri/src/profile.rs b/src-tauri/src/profile.rs index 23847040..56fa3493 100644 --- a/src-tauri/src/profile.rs +++ b/src-tauri/src/profile.rs @@ -209,6 +209,10 @@ impl Prepare { pub fn env_vars(&self, install: &Path, copy: Option<&Path>) -> Vec<(String, String)> { let mut out = vec![]; for (k, v) in self.env.iter().filter(|(k, _)| env_name_ok(k)) { + // Run again without the copy (keeps_copy): a value naming it is left out, as in args. + if copy.is_none() && v.contains("{game}") { + continue; + } let value = fill(v, install, copy); if value.contains("{input:") { continue; @@ -4022,6 +4026,14 @@ mod tests { assert_eq!(e.len(), 2, "TEMP and the launcher's own names stay out: {e:?}"); } + #[test] + fn prepare_env_run_again_without_the_copy_leaves_out_what_names_it() { + let p: Profile = serde_json::from_str(r#"{"format":1,"prepare":{"program":["b.exe"],"keeps_copy":true,"env":{"BUILD_CACHE":"{data}/cache","DISC":"{game}"}}}"#).unwrap(); + let e = p.prepare.unwrap().env_vars(Path::new("/games/x"), None); + let names: Vec<&str> = e.iter().map(|(n, _)| n.as_str()).collect(); + assert_eq!(names, ["BUILD_CACHE"]); + } + #[test] fn prepare_env_takes_named_inputs_and_drops_a_missing_one() { let p: Profile = serde_json::from_str(r#"{"format":1,"prepare":{"program":["b.exe"],"env":{"PATCH":"{input:patch}","DLC":"{input:dlc}"}}}"#).unwrap(); From 9be31f74784401b3a49ec79cd4dfac27fe7d9982 Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 15:43:39 +0200 Subject: [PATCH 07/15] Developer guide: say the setup step's environment and data folder rules 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. --- docs/DEVELOPERS.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/docs/DEVELOPERS.md b/docs/DEVELOPERS.md index 12d9d3c6..7dd77956 100644 --- a/docs/DEVELOPERS.md +++ b/docs/DEVELOPERS.md @@ -648,8 +648,8 @@ settings are written. It runs again whenever the player changes their copy. - A run for new options only (the player turned one on after setting up) should reuse what the last run made, not start again from the disc. - **Built from the player's copy?** Keep everything the game needs in your folder, so it plays - without the copy, and list what the build leaves in `done`. When it keeps reading the copy while - it plays, `keeps_copy` (coming in a later launcher) says so. + without the copy, and list what the build leaves in `done`. To build again later without the + copy, see `keeps_copy` below. - `"version"` (optional): change it only when players who already set up must run the step again, like when your output format changes. Nothing else in this file makes them set up again. Their next Play opens Easy Setup with a note that the game is built again, whether it's set up from @@ -753,9 +753,8 @@ when it's on its `args` are added after the step's own: } ] ``` -- Your builder gets these args added to its own, with the step's usual environment (`{data}` in - `RECOMPLAUNCHER_DATA`, its own temp folder). Download the SDK to the temp folder, or to - `{data}/cache` to reuse it on the next run, and put the runtime files where the game looks. +- Your builder gets these args added to its own, with the step's usual environment. Where to put + the SDK and its runtime files: [Vendor SDKs the build needs](#vendor-sdks-the-build-needs). - Print `progress` lines for the download too. If it fails, exit with a code other than 0: the player sees "Its setup step stopped with code N", so put the reason in your own log. - An option you add in a later release reaches players who already set the game up: Set Up @@ -773,10 +772,11 @@ the player agrees to the vendor's license: the license was accepted. Without the second, it downloads nothing and stops. 2. Add a `prepare.options` tick, as above, with both flags in `args`, a `license`, and `gpu` (`nvidia` for DLSS). Ticking it is the player accepting the license. -3. Keep the SDK in a folder of your builder's own. The launcher sets no environment variables for - `prepare`, so the flags must work without any: a variable you read today can still override the - folder, but it can't be required. Check it by running the builder exactly as the launcher does: - the arguments above, nothing else set. +3. Download the SDK to the step's temp folder (`TEMP`, `TMP`, `TMPDIR`), which is emptied after + every run, or to `{data}/cache` to reuse it on the next one. The step gets + `RECOMPLAUNCHER_DATA` and whatever you set in `prepare.env`, and nothing else of yours: a + variable from your own setup can't be required. Check it by running the builder exactly as the + launcher does, with the arguments above and that environment. 4. Put the vendor's runtime files where the game looks for them, never in your release. For DLSS, that is `nvngx_dlss.dll`, and `nvngx_dlssg.dll` for frame generation, in an `ngx` folder in the game's folder. @@ -935,13 +935,13 @@ CHD is the format most disc-based backups come in, and the one players ask for m ### Releases - **Tag every release with a version** (`v1.2.0`) and attach the builds to the GitHub release, not just to the README or Actions. -- **One file per platform, with a name that says what it is**, the same way every time: `yourgame-1.2.0-windows-x64.zip`, `-linux-x86_64.AppImage`, `-macos-arm64.zip`. +- **Name every file for what it is**, the same way every time: `yourgame-1.2.0-windows-x64.zip`, `-linux-x86_64.tar.gz` and `-linux-x86_64.AppImage`, `-macos-arm64.zip`. [Releases that install cleanly](#releases-that-install-cleanly) has the rest: the words a launcher picks a file by, one portable Linux build packed both ways, `source` in a source archive's name, and staying out of Program Files. - **Build for Linux and Mac too** when you can. A lot of players are on Steam Deck. - **Say what changed** in the release notes, even in one line. ### On the player's PC -- **Portable when it can be.** If the folder next to the exe is writable, keep saves, settings and logs there. Otherwise use the usual per-user folder, and say where in the README. +- **One data folder, and a way to move it.** Take one option for where everything goes (saves, settings, caches, logs), like portable emulators do. Without it, use the system's usual per-user folder, and say where in the README. A launcher can then keep all of it with the game: RecompLauncher passes `{data}` (`RECOMPLAUNCHER_DATA`), see [Where your game writes](#where-your-game-writes). - **Settings in a file a person can read**: TOML, INI or JSON, with every option written out and commented. Don't hide settings in the registry. - **Logs in a known place**, kept for the last few runs, so players can send them when something breaks. - **Controllers through SDL**, with buttons that can be remapped and a sensible default for Xbox, PlayStation and Switch pads. From 5843d6e4c5415bdceb611f29b6ba8e233835a639 Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 16:12:47 +0200 Subject: [PATCH 08/15] The long-path message keeps what the setup step said last 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. --- src-tauri/src/lib.rs | 2 +- src-tauri/src/setup_temp.rs | 24 +++++++++++++++++++++++- tests/i18n-first-line.test.cjs | 33 +++++++++++++++++++++++++++++++++ ui/app.css | 2 +- ui/i18n.js | 5 ++++- 5 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 tests/i18n-first-line.test.cjs diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index ad90bbdb..cdc0445a 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -4221,7 +4221,7 @@ fn run_prepare(pr: &profile::Prepare, install: &Path, copy: Option<&Path>, extra let code = s.code().map(|c| c.to_string()).unwrap_or_else(|| "a signal".into()); trail::note(format!("Setup step stopped with code {code}; it said last: {said}")); if cfg!(windows) && too_long { - return Err(setup_temp::TOO_LONG.into()); + return Err(setup_temp::too_long_with(&said)); } return Err(if said.is_empty() { format!("Its setup step stopped with code {code}.") } else { format!("Its setup step stopped with code {code}: {said}") }); } diff --git a/src-tauri/src/setup_temp.rs b/src-tauri/src/setup_temp.rs index 639b9f98..7998079a 100644 --- a/src-tauri/src/setup_temp.rs +++ b/src-tauri/src/setup_temp.rs @@ -75,11 +75,22 @@ pub fn room_for_setup(free: Option) -> bool { /// Words Windows programs (and their runtimes) print when its 260-character path limit stopped /// them: .NET's PathTooLongException, Win32's ERROR_FILENAME_EXCED_RANGE (206), and plain ones. pub fn says_too_long(said: &str) -> bool { - const WORDS: [&str; 7] = ["path too long", "path is too long", "filename or extension is too long", "pathtoolongexception", "filename_exced_range", "os error 206", "max_path"]; + // Not MAX_PATH: it's a constant's name, which a build can print in a warning that stopped nothing. + const WORDS: [&str; 6] = ["path too long", "path is too long", "filename or extension is too long", "pathtoolongexception", "filename_exced_range", "os error 206"]; let s = said.to_ascii_lowercase(); WORDS.iter().any(|w| s.contains(w)) } +/// TOO_LONG, then what the step said last on a line of its own. A step can print a path warning +/// early and stop later for another reason: its last line keeps that reason in front of the +/// player. The UI translates the first line and leaves the step's own words as they are. +pub fn too_long_with(said: &str) -> String { + if said.is_empty() { + return TOO_LONG.to_string(); + } + format!("{TOO_LONG}\n{said}") +} + /// An error from Windows' path limit (ERROR_FILENAME_EXCED_RANGE). pub fn io_too_long(e: &std::io::Error) -> bool { cfg!(windows) && e.raw_os_error() == Some(206) @@ -173,6 +184,17 @@ mod tests { assert!(!says_too_long("error: file not found")); } + #[test] + fn a_mention_of_max_path_alone_isnt_the_path_limit() { + assert!(!says_too_long("warning: MAX_PATH is 260 on this PC, long paths may not work")); + } + + #[test] + fn the_long_path_message_keeps_what_the_step_said_last() { + assert_eq!(too_long_with("error: out of disk space"), format!("{TOO_LONG}\nerror: out of disk space")); + assert_eq!(too_long_with(""), TOO_LONG); + } + #[test] fn a_deep_library_folder_takes_the_temp_folder() { // Past Windows' old 260-character limit: the launcher's own file work still goes through. diff --git a/tests/i18n-first-line.test.cjs b/tests/i18n-first-line.test.cjs new file mode 100644 index 00000000..6382b093 --- /dev/null +++ b/tests/i18n-first-line.test.cjs @@ -0,0 +1,33 @@ +const { test } = require('node:test'); +const assert = require('node:assert/strict'); +const fs = require('node:fs'); +const path = require('node:path'); +const vm = require('node:vm'); +const read = (f) => fs.readFileSync(path.join(__dirname, '../ui', f), 'utf8'); + +// i18n.js in German, its text read from the real de.json. +async function german() { + const window = {}; + const de = JSON.parse(read('i18n/de.json')); + const fetch = async () => ({ ok: true, json: async () => de }); + const document = { documentElement: {} }; + vm.runInNewContext(read('i18n.js'), { window, navigator: { languages: ['de-DE'] }, document, fetch }); + await window.loadLang('de'); + return { t: window.t, de }; +} + +const TOO_LONG = "A path in the game's folder is too long for Windows. Add a library folder with a shorter path in Settings → Games and Folders and move the game there, or turn on Windows' long paths setting (LongPathsEnabled), then try again. The launcher doesn't change that setting for you."; + +test('a launcher text with a program line under it is translated, and the program line kept', async () => { + const { t, de } = await german(); + assert.equal(t(`${TOO_LONG}\nerror: out of disk space`), `${de[TOO_LONG]}\nerror: out of disk space`); +}); + +test('a text whose first line the launcher does not know stays as it is', async () => { + const { t } = await german(); + assert.equal(t('something a program said\nand more'), 'something a program said\nand more'); +}); + +test('the desktop setup error keeps its lines apart', () => { + assert.match(read('app.css'), /\.su-err\{[^}]*white-space:pre-line/); +}); diff --git a/ui/app.css b/ui/app.css index dcb97948..3f5f30ca 100644 --- a/ui/app.css +++ b/ui/app.css @@ -700,7 +700,7 @@ body.light .pick .fmt,body.light .ready .set-row .k .fmt{background:rgba(20,120, .su-r .picks .btn{width:100%} .ni-content,.ni-tv{display:flex;flex-direction:column;min-height:0;gap:18px} .ni-notice p{margin:0 0 10px;color:var(--muted)} -.su-err{color:#ffc2c2} +.su-err{color:#ffc2c2;white-space:pre-line} /* ---------- Easy Setup in steps (setup-steps.js) ---------- One height for every step, the list scrolling inside it, so Back, the line by the button and Next/Set Up never move. The copy's box keeps its size and buttons whether it's empty or filled. */ diff --git a/ui/i18n.js b/ui/i18n.js index 2cd62791..63094457 100644 --- a/ui/i18n.js +++ b/ui/i18n.js @@ -13,7 +13,10 @@ let lang = 'en'; let dict = {}; const has = (s) => Object.prototype.hasOwnProperty.call(dict, s) && dict[s]; - const t = (s) => (s == null ? '' : has(s) ? dict[s] : s); + // A launcher text with what a program printed under it, on lines of its own: the text is + // translated, and the program's words stay as it printed them. + const firstLine = (s) => { const nl = s.indexOf('\n'); return nl > 0 && has(s.slice(0, nl)) ? dict[s.slice(0, nl)] + s.slice(nl) : s; }; + const t = (s) => (s == null ? '' : has(s) ? dict[s] : typeof s === 'string' ? firstLine(s) : s); // English in a table that t() is given later. const N_ = (s) => s; const locale = () => (lang === 'ar' ? 'ar-u-nu-latn' : lang); From 5327f7d4e489d031410f7d46af86e7a3975bf3af Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 16:16:47 +0200 Subject: [PATCH 09/15] Uninstall's keep-saves tick is off while the game's folder stays 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. --- tests/uninstall-keep-saves.test.cjs | 5 +++++ ui/app.css | 1 + ui/app.js | 3 +++ 3 files changed, 9 insertions(+) diff --git a/tests/uninstall-keep-saves.test.cjs b/tests/uninstall-keep-saves.test.cjs index c0c2a247..e8c3289d 100644 --- a/tests/uninstall-keep-saves.test.cjs +++ b/tests/uninstall-keep-saves.test.cjs @@ -24,6 +24,11 @@ test('the desktop uninstall keeps a copy of the saves unless the tick is taken o assert.match(u, /invoke\('uninstall', \{ id, deleteFiles: del, runUninstaller: unins, keepSaves: keep \}\)/); }); +test('the desktop keep-saves tick is off while the folder stays', () => { + const u = fn(app, 'confirmUninstall'); + assert.match(u, /delBox\.addEventListener\('change', \(\) => \{ keepBox\.disabled = !delBox\.checked; \}\)/); +}); + test('the desktop says where the saves went, or why the folder stayed', () => { const u = fn(app, 'confirmUninstall'); assert.match(u, /if \(r\.saves_kept\) toast\(t\('A copy of its saves is kept\./); diff --git a/ui/app.css b/ui/app.css index 3f5f30ca..f4db0d92 100644 --- a/ui/app.css +++ b/ui/app.css @@ -618,6 +618,7 @@ button.prog.su-prog:focus-visible,.prog.su-prog:focus-visible{outline:2px solid .modal p{margin:0;color:var(--muted);overflow-wrap:anywhere} .modal .acts{justify-content:flex-end} .modal label{display:flex;gap:10px;align-items:center;font-size:14px} +.modal label:has(> input:disabled){opacity:.5} .modal .field{margin:2px 0 4px} .modal:has(.choices){width:min(620px,92vw)} .choices{display:flex;flex-direction:column;gap:8px;max-height:46vh;overflow:auto} diff --git a/ui/app.js b/ui/app.js index 5907b0fd..e5fe3ec0 100644 --- a/ui/app.js +++ b/ui/app.js @@ -5942,6 +5942,9 @@ function confirmUninstall(id) {
`; document.body.append(s); $('[data-x="no"]', s).focus(); + // A copy of the saves is made only when the folder goes: with it kept, the tick means nothing. + const delBox = $('#u-del', s), keepBox = $('#u-keep', s); + if (delBox && keepBox) delBox.addEventListener('change', () => { keepBox.disabled = !delBox.checked; }); s.addEventListener('click', async (e) => { const x = e.target.closest('[data-x]'); if (e.target === s || (x && x.dataset.x === 'no')) return s.remove(); From 3976a8825965f000d58214947d5232fea6348339 Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 16:20:47 +0200 Subject: [PATCH 10/15] The game's data folder is recompdata, not userdata 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. --- docs/DEVELOPERS.md | 6 +++--- src-tauri/src/lib.rs | 6 +++--- src-tauri/src/manage.rs | 12 ++++++------ src-tauri/src/profile.rs | 15 ++++++++------- src-tauri/src/saves.rs | 12 ++++++------ 5 files changed, 26 insertions(+), 25 deletions(-) diff --git a/docs/DEVELOPERS.md b/docs/DEVELOPERS.md index 7dd77956..dd303b28 100644 --- a/docs/DEVELOPERS.md +++ b/docs/DEVELOPERS.md @@ -77,10 +77,10 @@ through us, and every release you publish reaches players the next time the laun The launcher moves, backs up and uninstalls a game as its folder. What your game writes inside it goes along; what it writes anywhere else is left behind. So: -- **Write only under `{install}` and `{data}`.** `{data}` is `userdata` inside the game's folder, +- **Write only under `{install}` and `{data}`.** `{data}` is `recompdata` inside the game's folder, the one place for everything your game makes: saves, settings, caches, builds. The launcher makes it before your game or your setup step starts, and passes it as `RECOMPLAUNCHER_DATA`. - Don't ship a `userdata` folder in your release. + Don't ship a `recompdata` folder in your release. - **Take one data path for everything, like portable emulators do.** A command-line option or `RECOMPLAUNCHER_DATA` that moves all of it at once, not one option per kind of file. Without one, keep your system's usual places. An AppImage or a `.app` writes to the system's usual places @@ -311,7 +311,7 @@ These fill in anywhere a path, an argument or a value is written: | | | | --- | --- | | `{install}` | Your game's folder | -| `{data}` | `{install}/userdata`: everything your game writes (see [Where your game writes](#where-your-game-writes)) | +| `{data}` | `{install}/recompdata`: everything your game writes (see [Where your game writes](#where-your-game-writes)) | | `{game}` | The player's copy (the .iso or the folder; for a .cue, its .bin unless `label` names .cue) | | `{documents}` | Documents | | `{local}` | AppData\Local, or ~/.local/share | diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index cdc0445a..5d8b98a1 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -11136,9 +11136,9 @@ mod prepare_env_tests { assert_eq!(said(&dir, "exists.txt"), PathBuf::from("yes")); assert!(!temp.exists(), "the temp folder is gone after the run"); assert_eq!(said(&dir, "rl.txt"), PathBuf::from("1")); - assert_eq!(said(&dir, "data.txt"), dir.join("userdata")); - assert!(dir.join("userdata").is_dir()); - assert_eq!(said(&dir, "cache.txt"), dir.join("userdata").join("cache")); + assert_eq!(said(&dir, "data.txt"), dir.join("recompdata")); + assert!(dir.join("recompdata").is_dir()); + assert_eq!(said(&dir, "cache.txt"), dir.join("recompdata").join("cache")); let _ = std::fs::remove_dir_all(&dir); } diff --git a/src-tauri/src/manage.rs b/src-tauri/src/manage.rs index b89a7fbd..ffe483e7 100644 --- a/src-tauri/src/manage.rs +++ b/src-tauri/src/manage.rs @@ -272,17 +272,17 @@ mod tests { /// A game with its {data} caches and saves, as a builder leaves it. fn game_with_caches(d: &Path) -> PathBuf { let game = d.join("Game"); - fs::create_dir_all(game.join("userdata/cache/shaders")).unwrap(); - fs::create_dir_all(game.join("userdata/saves")).unwrap(); + fs::create_dir_all(game.join("recompdata/cache/shaders")).unwrap(); + fs::create_dir_all(game.join("recompdata/saves")).unwrap(); fs::write(game.join("Game.exe"), b"exe").unwrap(); - fs::write(game.join("userdata/cache/shaders/pipeline.bin"), b"cache").unwrap(); - fs::write(game.join("userdata/saves/slot1.sav"), b"save").unwrap(); + fs::write(game.join("recompdata/cache/shaders/pipeline.bin"), b"cache").unwrap(); + fs::write(game.join("recompdata/saves/slot1.sav"), b"save").unwrap(); game } fn has_caches(game: &Path) -> bool { - fs::read(game.join("userdata/cache/shaders/pipeline.bin")).ok().as_deref() == Some(b"cache".as_slice()) - && fs::read(game.join("userdata/saves/slot1.sav")).ok().as_deref() == Some(b"save".as_slice()) + fs::read(game.join("recompdata/cache/shaders/pipeline.bin")).ok().as_deref() == Some(b"cache".as_slice()) + && fs::read(game.join("recompdata/saves/slot1.sav")).ok().as_deref() == Some(b"save".as_slice()) } #[test] diff --git a/src-tauri/src/profile.rs b/src-tauri/src/profile.rs index 56fa3493..b49c00bb 100644 --- a/src-tauri/src/profile.rs +++ b/src-tauri/src/profile.rs @@ -1206,9 +1206,10 @@ pub fn app_data() -> Option { } /// The one folder a game keeps everything it writes in (saves, settings, caches), inside its own -/// folder: `{data}` in its recomplauncher.json, and RECOMPLAUNCHER_DATA when it starts. Not `data`: -/// releases ship a `data` folder of their own (TotK's does). -pub const DATA_DIR: &str = "userdata"; +/// folder: `{data}` in its recomplauncher.json, and RECOMPLAUNCHER_DATA when it starts. A name no +/// game uses: releases ship a `data` folder of their own (TotK's does), and 11 catalog games +/// already write or ship a top-level `userdata` (the same folder as `UserData` on Windows). +pub const DATA_DIR: &str = "recompdata"; /// `{data}` for a game in `install`. pub fn data_dir(install: &Path) -> PathBuf { @@ -4009,10 +4010,10 @@ mod tests { } #[test] - fn data_fills_in_as_the_userdata_folder_in_the_game() { + fn data_fills_in_as_the_recompdata_folder_in_the_game() { let install = Path::new("/games/x"); - assert_eq!(PathBuf::from(fill("{data}", install, None)), install.join("userdata")); - assert_eq!(PathBuf::from(fill("{data}/cache", install, None)), install.join("userdata").join("cache")); + assert_eq!(PathBuf::from(fill("{data}", install, None)), install.join("recompdata")); + assert_eq!(PathBuf::from(fill("{data}/cache", install, None)), install.join("recompdata").join("cache")); } #[test] @@ -4021,7 +4022,7 @@ mod tests { let pr = p.prepare.unwrap(); let e = pr.env_vars(Path::new("/games/x"), Some(Path::new("/isos/x.iso"))); let get = |k: &str| e.iter().find(|(n, _)| n == k).map(|(_, v)| PathBuf::from(v)); - assert_eq!(get("BUILD_CACHE"), Some(Path::new("/games/x").join("userdata").join("cache"))); + assert_eq!(get("BUILD_CACHE"), Some(Path::new("/games/x").join("recompdata").join("cache"))); assert_eq!(get("DISC"), Some(PathBuf::from("/isos/x.iso"))); assert_eq!(e.len(), 2, "TEMP and the launcher's own names stay out: {e:?}"); } diff --git a/src-tauri/src/saves.rs b/src-tauri/src/saves.rs index 73be6973..fa5f7e86 100644 --- a/src-tauri/src/saves.rs +++ b/src-tauri/src/saves.rs @@ -1315,8 +1315,8 @@ mod tests { #[test] fn a_folder_in_data_is_named_by_data() { let d = tmp("data-name"); - assert_eq!(templatize(&d.join("userdata").join("saves"), &d), "{data}/saves"); - assert_eq!(templatize(&d.join("userdata"), &d), "{data}"); + assert_eq!(templatize(&d.join("recompdata").join("saves"), &d), "{data}/saves"); + assert_eq!(templatize(&d.join("recompdata"), &d), "{data}"); assert_eq!(templatize(&d.join("save"), &d), "{install}/save"); let _ = fs::remove_dir_all(&d); } @@ -1324,7 +1324,7 @@ mod tests { #[test] fn data_as_a_save_place_leaves_out_caches_and_the_launchers_work_folders() { let d = tmp("data-skip"); - let data = d.join("userdata"); + let data = d.join("recompdata"); for sub in ["saves", "cache/shaders", ".recomplauncher-tmp", ".recomplauncher-game-update/old", "tmp"] { fs::create_dir_all(data.join(sub)).unwrap(); } @@ -1361,11 +1361,11 @@ mod tests { let d = tmp("data-keep"); let app = d.join("app"); let inst = d.join("lib").join("Game"); - fs::create_dir_all(inst.join("userdata/saves")).unwrap(); - fs::write(inst.join("userdata/saves/slot1.sav"), b"save").unwrap(); + fs::create_dir_all(inst.join("recompdata/saves")).unwrap(); + fs::write(inst.join("recompdata/saves/slot1.sav"), b"save").unwrap(); let g = game(&inst); let s = vec![Spot { template: "{data}/saves".into(), from: "developer" }]; - assert_eq!(files_inside(&s, &g), vec![PathBuf::from("userdata").join("saves").join("slot1.sav")]); + assert_eq!(files_inside(&s, &g), vec![PathBuf::from("recompdata").join("saves").join("slot1.sav")]); let copy = backup(&app, "g", &s, &g).unwrap().unwrap(); let kept = dir_of(&app, "g", &g).join(©.name); assert!(kept.is_file() && !kept.starts_with(&inst), "{}", kept.display()); From 7e0e7740a253d84536275017f278229456dfd31d Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 16:24:47 +0200 Subject: [PATCH 11/15] Developer guide: a setup step never waits for input, and an updater a flag turns off From a front end's suggestions (#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. --- docs/DEVELOPERS.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/docs/DEVELOPERS.md b/docs/DEVELOPERS.md index dd303b28..c56b5296 100644 --- a/docs/DEVELOPERS.md +++ b/docs/DEVELOPERS.md @@ -95,8 +95,9 @@ goes along; what it writes anywhere else is left behind. So: game's folder, so the other one goes stale. - **Don't depend on `$APPIMAGE`.** The launcher may run your AppImage unpacked, from its own folder (the Flatpak does), and then it isn't set. -- **Never update yourself when `RECOMPLAUNCHER=1`.** The launcher installs every release you - publish. Your game and your setup step both get `RECOMPLAUNCHER=1`. +- **Never update yourself when `RECOMPLAUNCHER=1`.** Your game and your setup step both get it, + and the launcher installs every release you publish. If only a flag turns your updater off, + [Mac apps](#mac-apps) shows where it goes. ```json "start": { "program": ["MyRecomp.exe"], "args": ["--data", "{data}"] }, @@ -177,8 +178,10 @@ The first entry that exists on the player's system runs, so one file covers a Ma RecompLauncher 0.90 Beta 54 and older find an app in `start.program` and `prepare.program` only by its program's own path, which works everywhere: `"MyGame.app/Contents/MacOS/MyGame"`. -If your app updates itself (Sparkle, say), leave that off when `RECOMPLAUNCHER` is set: the -launcher installs each of your releases over the app, and two updaters on one app fight. +If your game updates itself (Sparkle, say), skip that when `RECOMPLAUNCHER` is set: the +launcher installs each of your releases over the app, and two updaters on one app fight. If it +can only be turned off with a flag, put the flag in `start.args`, like +`"args": ["--no-update-check"]`. Two examples are worth reading: @@ -621,7 +624,8 @@ disc or building a cache, give the launcher a way to run it without a window: It runs on the setup screen as "Getting the extras", after the copy is checked and before the settings are written. It runs again whenever the player changes their copy. -- Don't open a window. +- The step runs with no window and never asks anything or waits for input: everything it needs + comes from its arguments and environment. - Print lines like `progress 0.4 Unpacking menu art` as you go. The number is from 0 to 1 and the text after it shows under the step. - Exit with 0 when it worked. Anything else shows as a failed setup, with your exit code. From 4373fa0684f827c2f48a7b72cbb88812ed8b87b6 Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 16:28:47 +0200 Subject: [PATCH 12/15] Developer guide: the update-flag advice is in the general rule, not only 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. --- docs/DEVELOPERS.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/DEVELOPERS.md b/docs/DEVELOPERS.md index c56b5296..e5ef2e2e 100644 --- a/docs/DEVELOPERS.md +++ b/docs/DEVELOPERS.md @@ -97,7 +97,7 @@ goes along; what it writes anywhere else is left behind. So: (the Flatpak does), and then it isn't set. - **Never update yourself when `RECOMPLAUNCHER=1`.** Your game and your setup step both get it, and the launcher installs every release you publish. If only a flag turns your updater off, - [Mac apps](#mac-apps) shows where it goes. + put it in `start.args`, like `"args": ["--no-update-check"]`. ```json "start": { "program": ["MyRecomp.exe"], "args": ["--data", "{data}"] }, @@ -179,9 +179,7 @@ RecompLauncher 0.90 Beta 54 and older find an app in `start.program` and `prepar its program's own path, which works everywhere: `"MyGame.app/Contents/MacOS/MyGame"`. If your game updates itself (Sparkle, say), skip that when `RECOMPLAUNCHER` is set: the -launcher installs each of your releases over the app, and two updaters on one app fight. If it -can only be turned off with a flag, put the flag in `start.args`, like -`"args": ["--no-update-check"]`. +launcher installs each of your releases over the app, and two updaters on one app fight. Two examples are worth reading: From 2d4d98bcd8e240d80822c93c6196eb867ac1878c Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 22:49:30 +0200 Subject: [PATCH 13/15] Developer guide: APPIMAGE is never set, since Linux always plays from a plain folder --- docs/DEVELOPERS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/DEVELOPERS.md b/docs/DEVELOPERS.md index c2feebf7..77eebb97 100644 --- a/docs/DEVELOPERS.md +++ b/docs/DEVELOPERS.md @@ -94,8 +94,8 @@ goes along; what it writes anywhere else is left behind. So: - **Name both programs.** `start.program` and `prepare.program` say which file runs. Don't copy yourself somewhere else and run from there (bootstrapping): the launcher updates the copy in the game's folder, so the other one goes stale. -- **Don't depend on `$APPIMAGE`.** The launcher may run your AppImage unpacked, from its own folder - (the Flatpak does), and then it isn't set. +- **Don't depend on `$APPIMAGE`.** On Linux the launcher always unpacks your AppImage and runs it + from a plain folder, so `APPIMAGE` is never set (see [AppImages](#appimages)). - **Never update yourself when `RECOMPLAUNCHER=1`.** Your game and your setup step both get it, and the launcher installs every release you publish. If only a flag turns your updater off, put it in `start.args`, like `"args": ["--no-update-check"]`. From 951cd650b3cc0a96d4f7120cbb9d4c7a25967d0e Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Thu, 19 Nov 2026 22:56:05 +0200 Subject: [PATCH 14/15] Developer guide: an update replaces the program's own files, so the game writes to {data} --- docs/DEVELOPERS.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/DEVELOPERS.md b/docs/DEVELOPERS.md index 77eebb97..5da83222 100644 --- a/docs/DEVELOPERS.md +++ b/docs/DEVELOPERS.md @@ -86,7 +86,9 @@ goes along; what it writes anywhere else is left behind. So: `RECOMPLAUNCHER_DATA` that moves all of it at once, not one option per kind of file. Without one, keep your system's usual places. An AppImage or a `.app` writes to the system's usual places (`~/.local/share`, `~/Library/Application Support`) unless it's given a data path; given one, - it's portable and the launcher looks after it. Never write inside the AppImage. + it's portable and the launcher looks after it. Your program's own files (an unpacked + AppImage's `AppRun` and `usr/`, a `.app`'s contents) are replaced on every update, so nothing + your game writes goes there: it goes in `{data}`. - **Caches go in `{data}`, under `{data}/cache`.** Backups and cloud saves leave `cache` folders out, so a shader cache never fills a player's save copies. - **Temp is temp.** Your setup step gets a temp folder of its own (see [`prepare`](#prepare-your-own-setup-step)), From 8bae1636e61e67c9aca2737c5bfbf7113958a97e Mon Sep 17 00:00:00 2001 From: Zacharias Xenakis Date: Fri, 20 Nov 2026 03:33:46 +0200 Subject: [PATCH 15/15] Developer guide: automatic updates are the player's choice, so the release line says so --- docs/DEVELOPERS.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/DEVELOPERS.md b/docs/DEVELOPERS.md index 60806b82..7f62eb0f 100644 --- a/docs/DEVELOPERS.md +++ b/docs/DEVELOPERS.md @@ -99,8 +99,9 @@ goes along; what it writes anywhere else is left behind. So: - **Don't depend on `$APPIMAGE`.** On Linux the launcher always unpacks your AppImage and runs it from a plain folder, so `APPIMAGE` is never set (see [AppImages](#appimages)). - **Never update yourself when `RECOMPLAUNCHER=1`.** Your game and your setup step both get it, - and the launcher installs every release you publish. If only a flag turns your updater off, - put it in `start.args`, like `"args": ["--no-update-check"]`. + and the launcher brings players every release you publish, by itself once they turn on + automatic updates. If only a flag turns your updater off, put it in `start.args`, like + `"args": ["--no-update-check"]`. ```json "start": { "program": ["MyRecomp.exe"], "args": ["--data", "{data}"] }, @@ -202,7 +203,7 @@ RecompLauncher 0.90 Beta 54 and older find an app in `start.program` and `prepar its program's own path, which works everywhere: `"MyGame.app/Contents/MacOS/MyGame"`. If your game updates itself (Sparkle, say), skip that when `RECOMPLAUNCHER` is set: the -launcher installs each of your releases over the app, and two updaters on one app fight. +launcher installs your releases over the app, and two updaters on one app fight. Two examples are worth reading: