feat(storage): remove everything Longshot put on the PC in one go, the saves kept unless ticked #236
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
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!236
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/LongshotLauncher:feat/remove-everything"
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?
Players who are done with Longshot, or need the space back, have to hunt down game folders, build files, tools, caches and logs by hand, and the Windows uninstaller leaves the versions and the build files behind (#147). This adds one action that removes all of it, keeping the saves unless the player ticks a separate box.
Fixes #200
Summary
Where it lives. It's a Remove Longshot from this PC card on the Storage page, under Where it goes, with a Remove everything… button. The dialog lists what goes and what stays, with the sizes from the page's last measure:
The dialog also has a total and a separate tick: Also delete my saves, their backups, the game's settings and NFC tags. When the work is done, it lists what was kept and why. Close the launcher then shuts it down. Linux has no uninstaller, so this is its full uninstall, and it is on Windows too.
On Windows, the uninstaller's data tick (Apps & features > Uninstall) now runs the same removal, with the saves always kept. Before, it kept the build folders and the build files.
What goes (
Core/RemoveEverything.cs,Run):BuildRegistry.DeleteGame). A save in the folder is gathered or backed up first. Unlisted game folders in the builds folder go throughLeftovers.Delete, the same way. Empty track folders (nightly/,stable/) go too.Disk.FreeWork).ShaderCaches.ClearStore)cache/andtemp/in its user folderLongshotparent folders once they are empty.longshot.desktopfiles, only thoseShortcuts.MayTouchallowsSteamShortcuts.Remove)Longshot.lnkfiles, viaWindowsShortcuts.Write(false, false)Installer.Uninstall: program, Start menu entry, Apps & features). Elsewhere the dialog asks the player to delete the AppImage or the portable folder.Safety:
Runitself refuses before touching anything.save-backups, the game's settings and the NFC tags (whenLONGSHOT_NFC_DIRisn't set). The sharedoot-save-backupsis never deleted: Longshot's scripts and Hookshot use it.HoldsYours).Other changes: the README describes it,
--uninstall's row is updated, and the uninstaller's three old texts are dropped from the catalogs (scripts/translations.pyflags them as left over).Other PRs: this doesn't touch the lines #231 changes. Its dialog after the last version's delete is a separate, smaller offer and can land in either order.
Testing
python -I tests/test_launcher_core.py: 2618 checks passed. The newRemoveEverythingChecksruns on made-up Linux homes in the scratch folder, never this PC's data. It checks:oot-save-backups, a chosen builds folder's other game, a chosen build files folder's notes, a folder holding the player's mods, and a file behind a link in the home. The versions, unlisted folders, track folders, make_game's parts, home, cache, SDK, shader store and game cache are gone.LAUNCHER=$PWD python -I ../Tooling/tests/test_release.py: 3 failures:test_the_bump,test_the_next_stableandtest_check_tag_against_the_published_releases. They fail the same way on unchanged main.dotnet build LongshotLauncher.slnxin Debug and Release (locked restore): 0 warnings.tools/screenshots): new scenesstorage-remove-everything,storage-remove-everything-savesandstorage-remove-everything-done, plusstoragewith the new card. They're in the first comment.Not tested:
Installer.Uninstallfrom the Storage dialog, the uninstaller's new data tick, the.lnkremoval and Windows paths (junctions, a file in use) are untested.SteamShortcuts.Remove, untested here.🤖 Generated with Claude Code
Screenshots (
tools/screenshots, headless):The Storage page with the new card under Where it goes:

Remove everything…: what goes and what stays, with the measured sizes, the saves kept:

The saves ticked, with the warning:

Done: what was kept and why, then Close the launcher:
