feat(builds): an instance's folder is builds/<track>/<version>, renamed when it updates #184
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!184
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/LongshotLauncher:fix/instance-folder-names"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A build's folder named after its track (
nightly,nightly (2)) looked like a copy of another and said nothing about what was in it, so anyone cleaning up their disk couldn't tell which version was where. Every instance now lives in<builds>/<track>/<version>, and an update renames its folder to the new version.Stacked on #182 (the stack below it: #181 is merged): merge order #182, #184, then #185. Related: #180 (the home's list is Your instances).
What changed
<builds>/<track>/<version>(LauncherSettings.FolderFor):nightly/nightly-2029-c544828f,stable/v3.0.1. The folder name is the version itself (Versions.IsTagName's characters, safe on Windows and Linux;Longshotfor an unknown track or a version with no such name). A second instance of the same version is<version> (2), the only suffix. A new build never goes inside an old instance's folder named after its track (<builds>/nightly (2)/<version>until that one is moved).BuildRegistry.FolderOf,BuildJob.Place,BuildStepViewModel.RenameFolder,InstanceFolders.Rename), so make_game.py's--out/--updateis the final path.ShaderCaches.Keepsees the same folder), mods and a save in its ownuser/savego with it.BuildRegistry.Replace).InstanceFolders.MoveBack, waiting up to 10 s for a file the stopped build still holds), so the row's folder names the version the row still has. If it can't go back, the row lists where the folder is and the log says so.PickedFolderis gone). Under it, where this build goes: Builds into nightly\nightly-…, or for an update/go-back nightly\nightly-189-… becomes nightly\nightly-187-… when the build starts ….nightly,nightly (2), launchers rc.7 and on) and those named after their first version (v3.0.0-rc.5, launchers before rc.7). Track-named ones first, since<builds>/nightlybecomes the nightly's folder (moved by way of a name beside it, and back the same way). Same safety rules as before, plus: never into another instance's folder. Keep is remembered.InstanceFolders.Folders).The trade-off: shortcuts made by hand
The launcher's own shortcuts start
--playand keep working. A shortcut or a Steam (non-Steam game) entry made to the game's own program (bin\longshot.exe), common on the Steam Deck, or a Gear Lever entry, points at the old path and has to be made again after an update. Step 2 says so before every update that renames, and so does the README. That's the price of a folder that names its version.Tests
python -I tests/test_launcher_core.py: 1798 checks pass. NewInstanceFolderChecksdrive the real path in temp folders:nightly/<v1>(make_game's--outis that folder); another version →nightly/<v2>; the same version again →(2);<v3>with save, shader caches, mods and settings inside, the list saved; a go-back renamed down;FileShare.Nonelock on this PC) → nothing changed;MoveBackwaiting for a held file;UpdateFolderChecksandFolderFor's vectors are rewritten for the new layout (not weakened); a source check makes sure step 2 picks no folder of its own.python -I tests/test_release.py: OK.dotnet build App -c Release: 0 warnings, 0 errors.Screenshots
Before/after in #184 (comment) (headless,
tools/screenshots).What to check on a PC with a dump
Not run with a real build here (no game dump on this PC).
<builds>\nightly\<version>.<builds>\nightly\<other version>, no(2).<builds>\nightlyor<builds>\v3.0.0-rc.5): the home offers Move; after it, the instance is in<builds>\<track>\<version>and plays.Screenshots
The offer is new, so there is no before. Drawn with
tools/screenshots(headless, scenehome-rename-folders): two instances an older launcher named after a version, Keep or Rename. The existinghome-leftoversscene is unchanged.Possibly related, for context:
b0017b3a2c0fc4752372Rebased onto #182 so the stack merges in order; only the language files conflicted (both sides kept); builds with 0 errors.
0fc47523726bd1ab1210Rebased onto main (
8594b47: #180, #171 and #179 merged). Only the language files and the screenshot tool's scene list conflicted, both sides adding entries; both kept, each catalog checked as JSON with no duplicate key, the app and the screenshot tool build with 0 warnings. The code is otherwise unchanged, so the earlier test runs stand. Merge order: #181, #182, #184, #185.Screenshots: before and after (the instance-folder rework,
d9f5559)Drawn with
tools/screenshots(headless, the same scene and window size on both sides). Before is this PR's previous head,6bd1ab1.Settings: the builds folder and the build files
Each row now says what it holds.
Step 2, a new build
"Game folder" is now the Builds folder, Settings' own setting; the line under it says where this build goes (
nightly\nightly-…).Step 2, going back to an older nightly
The instance's folder takes that version's name when the build starts, and the line says what follows it.
The home's offer
Instances in the old layout (named after their track or their first version) move into
<builds>/<track>/<version>.fix(home): offer to rename instances' folders an old launcher named after a versionto feat(builds): an instance's folder is builds/<track>/<version>, renamed when it updatesReworked (
d9f5559): instances live in //, a second same version is ' (2)', an update or go-back renames its folder before make_game.py and back if the build doesn't finish, step 2's Change sets the builds folder (Settings' own) and shows where the build goes, and the home's offer moves both old shapes into the layout. 1798 checks pass. Description rewritten; screenshots above.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.