feat(versions): show previous launcher builds and remove one in one action #317
No reviewers
Labels
No labels
area/build
area/install
area/mods
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!317
Loading…
Reference in a new issue
No description provided.
Delete branch "riqmarmes/LongshotLauncher:feat/previous-launcher-builds"
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?
Why. A player upgrading from Longshot Launcher 1.3.x arrives with a complete Longshot build that the new launcher cannot run (it plays only
longshot-builderversions), and today nothing says so: Versions is empty and the only trace is one generic sentence. Players conclude their 20–30 GiB build is gone and switch back to stable. This change shows the previous launcher's builds, explains them, and gives one honest action to clean them up without losing saves or the game dump. (It also removes the separate "Clean up files" trip: Remove now does the generated-file cleanup and the folder removal in one confirmed action.)What changed.
src/game/previous.rs: lists the previous launcher's installations read-only from itsbuilds.jsonplus a folder scan (version, folder, size, last used date), de-duplicated against this launcher's own versions. Nothing is registered, played or modified during discovery.user/saves; runs the previous launcher's reviewed generated-file cleanup (storage::clean_previous, the Storage → Previous launcher list, now also including old toolchains); resolves reparse-point ancestors (e.g. OneDrive) and then deletes only that build's actual folder. It refuses unknown folders, the launcher's own folder, a linked build folder, or a running game; shared saves and the original game dump are never touched. A row shows "Removing this build…" while the background work runs, and the result reports the files/bytes cleaned and where the saves were backed up.docs/saves.md.Tests.
previous: listing newest-first with versions/sizes/dates, folder-scan fallback, de-duplication of registered versions, display rows, save-backup-then-remove, generated-file cleanup, a build reached through a Windows junction, and the refusal cases (unknown folder, the launcher's own folder).cargo fmt --all -- --check;cargo clippy --locked --all-targets -- -D warnings;cargo test --locked→ 192 passed on Windows with the same 14 pre-existing environment-only failures (junction/symlink, Steam and portable-folder tests), none in touched code;python -I scripts/translations.py; Toolingtests/test_release.py→ 46 tests OK. The branch is merged up tomain@ed29aca.tests/test_launcher_core.py(needs the pinned Longshot checkout7015105c) andtests/test_rust_window.py(needs a Linux display); CI covers both..nup, and a 75-byte mock old build, so no real game data or game build is involved. Screenshots are attached on the screenshot comment. The original game file, saves, and the previous launcher's own files were left byte-identical by the discovery path.Screenshots. Attached on the screenshot comment: Home card + Manage, the updated Versions layout (Build above the previous-launcher section; Remove then Open folder in the row), and the Remove confirmation.
Screenshots from a synthetic launcher home (updated layout: Build a new version above the previous-launcher section; Remove before Open folder) (a copied save set, a fake empty .nup, and a 75-byte mock old build, so no real game data or game build is involved).
Possibly related, for context:
The "Build a new version" should be at top of the list, alongside "Clean up all"
I thought we already had something like this which does cleanup btw? Can you verify
@HumanBean wrote in #317 (comment):
I m not sure i understood what you mean by algonside clean up all but I'll push an update and let me know again if it wasn't what you intended
Yes, cleanup existed — but it only deletes recognized generated files (reclaim/previous_plan), never an old build's folder. #317 reuses that same cleanup and adds the missing part: list the old build, back up its saves, delete its folder.
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.