Launcher won't update game if using Gear Lever #118
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
6 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher#118
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Gear Lever renames AppImages when added the launcher menu. I believe this is causing the launcher to detect the game as running and won't update.
This is a known issue https://github.com/mijorus/gearlever/issues/428. In this case, the launcher appimage gets renamed to
/home/user/AppImages/longshot.appimageLauncher won't update if usingto Launcher won't update if using Gear LeverLauncher won't update if using Gear Leverto Launcher won't update game if using Gear LeverAnything we need to do on our side?
Could the issue be that Gear Lever detects "Longshot" as the name of the app, then renames the AppImage file to longshot.appimage because that's the name of the application in the metadata, possibly in
Name=Longshot?
The name of the app in Gear Lever should probably be "Longshot Launcher", the file would then be renamed to something other than "longshot" and would no longer be detected as the actual game running.
@HumanBean wrote in #118 (comment):
I imagine, change how the Longshot executable is detected, or like Krafish said rename the launcher executable, or allow the option to skip having to close the game Longshot. I don't think Gear Lever is going to change their functionality anytime soon.
Claiming the launcher-side fix. Measured today on current main to separate what actually happens from the report's guess:
scripts/package.shbakesName=Longshotinto the desktop entry (StartupWMClass islongshot-launcher, but the Name is what Gear Lever keys its rename on, upstream mijorus/gearlever#428). Renaming the shipped fileLongshotLauncher-<tag>-x86_64.AppImageby hand tolongshot.appimagereproduces the reporter's layout./proc: the AppImage runtime's own process is separate from the launcher's (comm=longshot.appima,argv0=/path/longshot.appimagevs the launcher atcomm=LongshotLauncheunder the mount dir).Core/Saves.csRunning()feeds bothcommand the argv0 basename of every process intoRunningFrom, and excludes only the launcher's own pid (own = Environment.ProcessId) — the runtime process is not excluded.RunningFrom(^(longshot|…)[-_.].*\.appimage$) flags anylongshot<sep>…appimagename as the game running. Plainlongshot.appimagedoes not match today (no middle segment), but Gear Lever's dedupe names do (longshot-2.appimageand friends from #428) — and then the launcher counts itself as the running game and refuses the update. That is the exact symptom: updates blocked with a game-is-running message while no game runs.Fix shape: (1)
Running()must drop candidates that are the launcher itself — compare against$APPIMAGE/ the own exe path (SelfUpdate.CurrentFile), not just the pid — so no rename scheme can make the launcher look like the game; (2)package.shdesktopName=Longshot→Name=Longshot Launcher, per Krafish's diagnosis, so Gear Lever and friends stop naming our launcher after the game. Regression pins in the launcher core suite for both: renamed-runtime candidates must not flag, and the package metadata must name the launcher, not the game.Fix is up: PR https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/NEWPR (head
836eb5d). Both halves of what made the Gear Lever rename harmful are gone: the packaged desktop entry now says Name=Longshot Launcher (so the rename names the launcher after itself, never after the game), and the running-game check skips the process whose argv[0] is the launcher's own AppImage ($APPIMAGE), which is the process Gear Lever's renamed runtime was. A tester on a Deck that already went through the rename: update through Gear Lever once and confirm the launcher updates normally.Correction to the link above: the PR is #169 (head
836eb5d).From Discord:
Reporter on Bazzite (Linux), Ryzen 5 5600XT and Radeon RX 6650 XT reports game update remains blocked while only the launcher is open. Screenshot tooltip: “Save and close Longshot first: this replaces the game in its folder.” Update target shown: v3.0.0-rc.7. They confirmed closing Longshot / the previous suggested workaround did not help. No launcher version or logs supplied.
@HumanBean I think this one should be a priority: it probably hits a lot of Linux users, since Gear Lever is a common way to add AppImages on Bazzite and the Deck. Confirmed today with a Bazzite user from Discord: Gear Lever renamed the launcher to longshot.appimage_0.appimage, which matches the running-game check, so since rc.7 every game update is blocked with "Save and close Longshot first". Renaming the AppImage works around it, but most people won't find that. #169 should fix it (I left a note there about symlinked paths). It would be great to get it in ASAP.