fix(saves): every Windows build shares one save folder, and the Start menu shortcut survives launcher updates #43
No reviewers
Labels
No labels
area/build
area/install
area/saves
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
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!43
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/LongshotLauncher:fix/shared-saves"
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
Players on Windows are losing their saves when they update Longshot or move to the launcher: each Windows build kept its own saves in its own folder, so a new version started empty unless Move my saves ran, and picking "Start with no saves" once turned it off for every later update. Players also report that the launcher's Start menu shortcut is gone after the launcher updated itself.
What changed
One save folder for every build, on Windows as on Linux.
%APPDATA%\Longshot\save\<user id>\on Windows (SaveEnvironment.LongshotUser; a portable launcher keeps them inLongshotLauncher-data\user\). Linux is unchanged:$XDG_DATA_HOME/longshot.--user <that folder>(GamePlay.StartInfo). Every Windows build of the game already takes--user(host/hos_main.c), the ones from before this change too, so no game release is needed for launcher starts.Saves.Gather), when the window opens and before a game starts (Play,--play, the shortcuts):%USERPROFILE%\Games\Longshot\user(not for a portable launcher);progress.sav; a tie keeps the shared one, so a save an old build just made, with nothing played, never replaces it);oot-save-backups\gather-<stamp>\<game folder name>;savefolder is renamedsave.moved-<stamp>, so the game no longer finds it;userorsavefolder that is a link (a player's synced folder, or the shared one itself) is left alone;mouse_sens.txtandpresent.txtcome along when the shared folder has none;moveSavessetting, which was what made "Start with no saves" stick), the move on the Ready screen, the "its saves go with it" warning when deleting a build, and the saves count on each version's row. The Saves page, the wizard's saves card and the delete dialog now read the same on Windows as on Linux. Asettings.jsonwithmoveSavesis still read.The Start menu shortcut after the launcher's own update.
Installer.Refresh: at the first start of another launcher version (the Apps & features entry names another one), an installed launcher makes its Start menu shortcut again, and the Longshot shortcuts it made that are there. Once per version: a shortcut the player deleted stays deleted, and the entry is written after the shortcut, so one that could not be made is tried again at the next start. The update moves the running program aside toLongshotLauncher.exe.oldbefore the new one takes its name, and Windows' shortcut tracking can follow it there; the next update deletes that.old, and the Start menu drops a shortcut to nothing. I couldn't confirm that this is the exact cause without a Windows PC; making the shortcut again on each new version fixes it whatever the cause, and costs one hidden PowerShell start per update.Docs:
docs/saves.md(where saves are, "Saves from before (Windows)"), README.Follow-up, not in this PR: Longshot's game, started on its own (
bin\longshot.exedouble-clicked rather than through the launcher), still uses its folder'suser\. The launcher brings such saves in at its next start (newest wins), so nothing is lost, but a Longshot PR should make%APPDATA%\Longshotthe game's own default on Windows, as~/.local/share/longshotis on Linux, and update Longshot'sdocs/saves.mdanddocs/updates-and-saves.md.Testing
python -I tests/test_launcher_core.py: 658 checks passed (635 onmain). New checks: the shared folder on Windows and Linux and a portable one;--useron Windows only; import into the shared save; Hookshot import with no build;Saves.Gather: the old folders found once each, none on Linux, never the shared one, nothing while Longshot runs (an emulator running doesn't stop it), the newest kept, every one backed up, the old ones renamed aside, done once, an old build saving again later (newer wins, shared one backed up), an older one (shared kept), a swap that fails half-way (everything as it was), a shared save left aside by a gather cut short (backed up), a save with nothing played (never wins), a linkedsavefolder (left alone),mouse_sens.txtbrought along;Installer.Refresh: made again after an update, left alone otherwise (a deleted shortcut stays deleted), retried after a failure; an oldsettings.jsonwithmoveSaves.python -I tests/test_release.py: 28 tests OK.dotnet build App/LongshotLauncher.csproj -c Release: 0 errors, no new warning (the existingTextBox.Watermarkone).--user, and the Start menu shortcut after a launcher update. A test request asks for it.Screenshots
None yet: what changes on screen is Windows' Saves page (no build picker, no From another version…), the wizard's saves card and the delete dialog, which now look as Linux's already do. The Windows test run will add them.
🤖 Generated with Claude Code
WIP: fix(saves): every Windows build shares one save folder, and the Start menu shortcut survives launcher updatesto fix(saves): every Windows build shares one save folder, and the Start menu shortcut survives launcher updates