fix(windows): an older download never goes back over a newer installed launcher; the installed one starts instead (#129) #172
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!172
Loading…
Reference in a new issue
No description provided.
Delete branch "madebyjordan/LongshotLauncher:fix/setup-never-downgrades"
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?
Fixes #129. Starting the old Windows download again (from Downloads or the desktop) and pressing Install put that old launcher back over the newer one installed, which had updated itself since.
Installer.Installcopied the running file over the installed program without comparing versions.What changes
Installer.InstalledVersionreads the installed launcher's version from its Apps & features entry'sDisplayVersion(1.0.0-rc.9, orNightly 100 · 5f30eea3turned back into a nightly tag). The installed launcher rewrites that entry at every start, the first one after each self-update too, and rc.3 already did.InstalledIsNewer: when the installed launcher is newer,Installleaves the program, entry and shortcut alone and returns its path, so the Install button and--installstart the newer one. The download also skips the Install / Run portable window and starts the installed launcher directly, passing its arguments on (--playand the rest).Testing
Windows 11, .NET SDK 10.0.404.
python -I tests/test_launcher_core.pywith TEMP on its long path: main 1439 checks, this branch 1447. The check commit fails on main withAn older download's Install put its launcher back over the newer one installed (#129).; breaking the comparison brings it back.dotnet build: 0 warnings.Not tested: a real older setup started over a real newer install. While a newer launcher is installed, an older download can't reach Run portable; a
portablefile beside it still makes it portable.Found on the way, not fixed here (its own topic): the self-update rollback at
App/Program.csnever runs on Windows, becauseSelfUpdate.CurrentFileaccepts only names ending.exe, so a process started asLongshotLauncher.exe.oldgets null. It only matters when the main exe is missing, so it doesn't explain #129.🤖 Generated with Claude Code