feat(play): the game settings follow the player into a new build, and Linux builds get --user #84
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!84
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/LongshotLauncher:feat/settings-follow"
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?
An update into a new folder starts the game from the default settings: the Insert menu's choices and the controls are lost, because the new folder's
longshot_options.iniholds only make_game.py'scompile_shaders=. Longshot #729 keeps the settings in the user folder the launcher passes with--user. This PR brings the settings to a build that has none, and passes that folder on Linux too.What changed
--useras well (GamePlay.UserFolder,StartInfo):~/.local/share/longshot, the folder Linux saves already use, so #729's settings are shared there too. The exception: while the build's folder has auser/of its own, nothing is passed. The game then handles that folder itself, moving an old build's saves into the shared folder at its next start, or keeping a link the player made.Core/SettingsCarry.cs,LauncherService.CarrySettings): when the build's ownlongshot_options.inihas no setting of the player's (missing, orcompile_shaders=alone), it's filled from the newest file among the user folder's and the other builds'. The build'scompile_shaders=is kept.HookshotSettings.Import's newoptionsFile,LauncherService.OptionsFileOf): the import writes into the file the build reads, which is the user folder's once there is one. Otherwise the game would ignore the imported settings.language.txtstays the build's.BuildFolders: the foldersGatherSavesalready looked in (every build's, the builds folder's game folders, the 2.x Builder's), now shared with the settings fill.Core/layout),docs/saves.md.Testing
Tested (Windows 11, .NET SDK 10.0.103):
python -I tests/test_launcher_core.py --strict --longshot <Longshot checkout>: 1038 checks pass. That includes the newSettingsCarryChecks, which cover:compile_shaders=and line endings;compile_shaders=-only file never chosen;UserFolderon Windows and Linux, with and without the build's ownuser/;The two existing
--userchecks now expect the argument on Linux too.dotnet build App -c Release: 0 warnings, 0 errors.python -I tests/test_release.py: the same 6 failures as a cleanmaincheckout on this PC. They're Windows-side (a shell script it can't execute, CRLF in a published file) and in code this PR doesn't touch.core.autocrlf=truethe signed fixtures check out with CRLF, and the release checks fail on their signatures.git -c core.autocrlf=false checkout -- tests/fixturesfixes the checkout; nothing in this PR changes them.Not tested:
Must be tested:
longshot_options.ini(itscompile_shaders=kept), the notice on the home once, and the game starting with them.user/. Expect the game's log to show it was started with--user ~/.local/share/longshot, and the saves to be the shared ones.Risks
--userwhen its folder has nouser/. That's the folder the game's own rule already picks for its saves. A player who points the saves elsewhere with auser/link in the game folder keeps that, because no--useris passed then.Related: Longshot #729 (the game side). #57 (an update in place) and #78 (the shader caches carried on update) touch the same update path; this one doesn't depend on either. Next, in its own PR: the per-exe Windows GPU preference and NVIDIA profile carried to a new build before Play.
🤖 Generated with Claude Code
WIP: feat(play): the game settings follow the player into a new build, and Linux builds get --userto feat(play): the game settings follow the player into a new build, and Linux builds get --user