fix(shortcuts): a portable launcher makes no shortcuts unless ticked, and none takes over another launcher's (#161) #173

Merged
HumanBean merged 2 commits from madebyjordan/LongshotLauncher:fix/portable-no-shortcuts into main 2026-11-17 16:00:07 +00:00
Member

Fixes #161. A portable launcher made Desktop and Start-menu shortcuts after every build, aimed at whatever its file was called (for the reporter, the setup-named exe on a removable drive), though "Run portable" promises none, and it remade any the player deleted. It could also take over the installed launcher's "Longshot" shortcuts.

What changes

  • A portable launcher's ticks on the Ready screen start as whatever shortcuts already point at it, so it makes or removes one only when the player ticks it, and never recreates a deleted one.
  • Never another launcher's shortcut: a shortcut that starts another launcher that still exists is never written over or removed by a portable copy, or on Windows by any copy that isn't installed (a dev build). The launcher reads the .lnk target on Windows and the .desktop Exec line on Linux to tell.
  • A ticked shortcut left alone says so: "{0} starts another Longshot Launcher, so it was left as it is." Translated into all 12 catalogs plus es-419 (worth a check by a native speaker).
  • The installed launcher is unchanged: both ticked, written as Ready opens, and it still takes shortcuts back, as does a non-portable AppImage.
  • WriteLinux and WindowsShortcuts.Write now return the shortcuts they left alone.

Testing

Windows 11, .NET SDK 10.0.404.

  • python -I tests/test_launcher_core.py with TEMP on its long path: main 1439 checks, this branch 1454. The check commit fails on main with A portable launcher took over the shortcuts another launcher made (#161).; breaking the default ticks fails Ready makes the shortcuts as it opens, both ticked, for every launcher but a portable one….
  • dotnet build: 0 warnings.

Not tested: a real portable launcher on a removable drive. Not changed: on uninstall, WindowsShortcuts.RemoveGame still deletes every "Longshot" shortcut, a portable copy's too.

🤖 Generated with Claude Code

Fixes #161. A portable launcher made Desktop and Start-menu shortcuts after every build, aimed at whatever its file was called (for the reporter, the setup-named exe on a removable drive), though "Run portable" promises none, and it remade any the player deleted. It could also take over the installed launcher's "Longshot" shortcuts. ## What changes - **A portable launcher's ticks** on the Ready screen start as whatever shortcuts already point at it, so it makes or removes one only when the player ticks it, and never recreates a deleted one. - **Never another launcher's shortcut**: a shortcut that starts another launcher that still exists is never written over or removed by a portable copy, or on Windows by any copy that isn't installed (a dev build). The launcher reads the `.lnk` target on Windows and the `.desktop` Exec line on Linux to tell. - A ticked shortcut left alone says so: "{0} starts another Longshot Launcher, so it was left as it is." Translated into all 12 catalogs plus es-419 (worth a check by a native speaker). - The installed launcher is unchanged: both ticked, written as Ready opens, and it still takes shortcuts back, as does a non-portable AppImage. - `WriteLinux` and `WindowsShortcuts.Write` now return the shortcuts they left alone. ## Testing Windows 11, .NET SDK 10.0.404. - `python -I tests/test_launcher_core.py` with TEMP on its long path: main 1439 checks, this branch 1454. The check commit fails on main with `A portable launcher took over the shortcuts another launcher made (#161).`; breaking the default ticks fails `Ready makes the shortcuts as it opens, both ticked, for every launcher but a portable one…`. - `dotnet build`: 0 warnings. Not tested: a real portable launcher on a removable drive. Not changed: on uninstall, `WindowsShortcuts.RemoveGame` still deletes every "Longshot" shortcut, a portable copy's too. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The Ready screen writes the game's Desktop and menu shortcuts as it opens,
both ticked, from whichever launcher finished the build. A portable copy
(on a removable drive, still named as the setup) so points the player's
Longshot shortcuts at itself, over the ones the installed launcher made, and
unticking a box deletes them even when they start another launcher. This
check makes the shortcuts from one AppImage, then has a portable AppImage
(its .home folder beside it) write them ticked and unticked: the first
launcher's must stay. It fails on main, which writes over them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
fix(shortcuts): a portable launcher makes no shortcuts unless ticked, and none takes over another launcher's (#161)
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 4s
205814d381
Run portable promises nothing written outside the launcher's folder, yet
the Ready screen ticked Desktop and Start menu and made both as it opened,
for every launcher. A portable copy on a removable drive, still named as
the setup, so pointed the player's Longshot shortcuts at
LongshotLauncher-...-setup.exe --play, made them again after every build
even once deleted, and wrote over the installed launcher's: the next Play
from the desktop started the portable copy, or nothing once the drive was
out.

- A portable launcher's Ready ticks start as the shortcuts that already
  start it are, and it makes or removes them only when the player ticks
  (Shortcuts.MadeAtReady): nothing of its own accord, so a deleted one
  stays deleted.
- A shortcut that starts another launcher which is still there is neither
  written over nor removed (Shortcuts.TakesOver, MayTouch), by a portable
  launcher or, on Windows, by one that is not installed (a build from a
  checkout). A toast names the ticked ones left as they are. The installed
  launcher, and the AppImage that is not portable, still take them over,
  so they come back to it from a copy that had them.
- The Linux .desktop file's Exec is read back (Shortcuts.LinuxTarget) to
  tell whose a shortcut is; Windows reads the .lnk through ShellLinks.

The installed launcher's Ready is unchanged: both ticked, made as it opens.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
HumanBean deleted branch fix/portable-no-shortcuts 2026-11-17 16:00:10 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/LongshotLauncher!173
No description provided.