feat(migrate): carry the previous launcher's language and cache folder #316
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!316
Loading…
Reference in a new issue
No description provided.
Delete branch "riqmarmes/LongshotLauncher:feat/stable-preferences"
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. The upgrade notes tell players coming from Longshot Launcher 1.3.x to set their language, update channel and custom cache drive again. Two of those are safe to reuse — the launcher language, the game language and a custom build-files (
work) folder location — so a player does not have to repeat setup that has not changed. Nothing here is a consent or a channel choice.What changed.
src/home/stable_prefs.rsreads the previous launcher'ssettings.jsonread-only and fills only what this launcher has not set yet:uiLanguage(validated against the launcher's languages),language(validated against the wizard's game languages), andworkonly when it is an absolute existing folder. The folder's contents are never reused or copied.launcherChannel(it would point this launcher's updater at the older C# stable launcher), telemetry/crash consents, licence acceptances, the profile choice,buildsFolder.stable-prefs-v1.json, mirroring the save/mod import markers; a player's later choice is never overwritten.preferences::bind(after the settings file exists), best-effort: a failure is logged and startup continues.docs/saves.md, and the marker list indocs/paths.md.Tests.
stable_prefs: the safe values are carried once, values chosen here are not replaced, no previous launcher means no change, and unknown languages or a missing folder are skipped; the oldsettings.jsonis asserted byte-identical.cargo fmt --all -- --check;cargo clippy --locked --all-targets -- -D warnings;cargo test --locked→ 12 pre-existing Windows environment-only failures, none in touched code;python -I scripts/translations.py; Toolingtests/test_release.py→ 46 tests OK.tests/test_launcher_core.py(needs the pinned Longshot checkout, as above); CI covers it.Screenshots. None: no visible UI change, the settings simply start from the previous values.
Possibly related, for context: