feat(settings): the desktop and Start menu shortcuts can open the launcher #279

Closed
riqmarmes wants to merge 1 commit from riqmarmes/LongshotLauncher:feat/shortcuts-open-launcher into main
Contributor

Why

On Windows the desktop and Start menu shortcuts are written with --play, so they start the game straight away, and the refresh after a launcher update writes them again the same way. A player who wants to go through the launcher first (to check for updates or pick a version) loses that choice at every game or launcher update, and has to edit the shortcut again.

What changed

Settings has a new Shortcuts section: Open the launcher from the desktop and Start menu shortcuts. Off (the default), nothing changes: a shortcut starts the default build's game with --play. On, the Ready screen writes the same Longshot.lnk with no arguments, so it opens the launcher's window; the refresh after the launcher's own update reads the setting and keeps it. Changing the tick rewrites the shortcuts that are already there immediately, so the next press follows it without a rebuild.

  • LauncherSettings.ShortcutsOpenLauncher (off by default; no settings-format change).
  • Shortcuts.WindowsArguments decides --play or no arguments; WindowsShortcuts.Write/Refresh take the choice.
  • SettingsViewModel saves it and rewrites the shortcuts that are there; the section is Windows-only (Linux's shortcuts open the launcher already).
  • The shortcut keeps its name and the game's AppUserModelID; only its arguments change, so the Start menu still lists the launcher's and the game's entries apart.

Testing

Windows 11, .NET SDK 10.0.404, rebased onto main @ 9791346 (Launcher 2); the Settings and README conflicts were resolved over #259:

  • dotnet build App/LongshotLauncher.csproj (Release): 0 errors.
  • tests/launcher_app (Release): builds and runs with 0 failures.
  • Focused core run of SettingsChecks + ShortcutChecks: 110 checks pass, including the settings round trip and the --play/no-arguments choice.
  • Ran the built launcher against a scratch home and checked it with UI Automation: the Shortcuts section appears in the new Settings layout, and toggling the box writes "shortcutsOpenLauncher": true to settings.json.
  • shellcheck -x scripts/package.sh and gitleaks dir . --config .circleci/gitleaks.toml --redact: pass.

Not run locally:

  • The full python -I tests/test_launcher_core.py: the account-name assertion is fixed in main by #280, so the suite now passes PrivacyChecks; it stops only at SavesChecks' symlink checks because this Windows account lacks the symlink privilege (Developer Mode). A full run needs Developer Mode/elevation or a Linux machine. This repository's PR CI runs only the title check (the compile-and-test job runs on pushes to main).

The new English texts are not in the translation catalogs yet, so they show in English until translators add them (the catalog check reports them as missing, as it does for other recent texts).

No existing PR adds this setting. #273 (open) edits the same --play line for packaged launchers, so this branch will conflict there and, when it lands, the no-argument form must keep its Packaging.StartArgument. #130 is the Steam-tile precedent: that tile already opens the launcher instead of starting the game. #280 fixed the account-name privacy assertion that blocked the full core run here; it is merged in main.

Risks

The default is unchanged, so existing players keep the game shortcut. A shortcut that starts another launcher is still left alone (Shortcuts.MayTouch), and the setting is Windows-only. No save, build or release-format change.

Screenshots

launcher-settings-new.png shows the new section in the rebased Settings layout; it goes in the comment below.

Assisted-by: DeepSeek Harness (deepseek-flash)

### Why On Windows the desktop and Start menu shortcuts are written with `--play`, so they start the game straight away, and the refresh after a launcher update writes them again the same way. A player who wants to go through the launcher first (to check for updates or pick a version) loses that choice at every game or launcher update, and has to edit the shortcut again. ### What changed Settings has a new **Shortcuts** section: *Open the launcher from the desktop and Start menu shortcuts*. Off (the default), nothing changes: a shortcut starts the default build's game with `--play`. On, the Ready screen writes the same `Longshot.lnk` with no arguments, so it opens the launcher's window; the refresh after the launcher's own update reads the setting and keeps it. Changing the tick rewrites the shortcuts that are already there immediately, so the next press follows it without a rebuild. - `LauncherSettings.ShortcutsOpenLauncher` (off by default; no settings-format change). - `Shortcuts.WindowsArguments` decides `--play` or no arguments; `WindowsShortcuts.Write`/`Refresh` take the choice. - `SettingsViewModel` saves it and rewrites the shortcuts that are there; the section is Windows-only (Linux's shortcuts open the launcher already). - The shortcut keeps its name and the game's AppUserModelID; only its arguments change, so the Start menu still lists the launcher's and the game's entries apart. ### Testing Windows 11, .NET SDK 10.0.404, rebased onto `main` @ `9791346` (Launcher 2); the Settings and README conflicts were resolved over #259: - `dotnet build App/LongshotLauncher.csproj` (Release): 0 errors. - `tests/launcher_app` (Release): builds and runs with 0 failures. - Focused core run of `SettingsChecks` + `ShortcutChecks`: 110 checks pass, including the settings round trip and the `--play`/no-arguments choice. - Ran the built launcher against a scratch home and checked it with UI Automation: the **Shortcuts** section appears in the new Settings layout, and toggling the box writes `"shortcutsOpenLauncher": true` to `settings.json`. - `shellcheck -x scripts/package.sh` and `gitleaks dir . --config .circleci/gitleaks.toml --redact`: pass. Not run locally: - The full `python -I tests/test_launcher_core.py`: the account-name assertion is fixed in `main` by [#280](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/280), so the suite now passes `PrivacyChecks`; it stops only at `SavesChecks`' symlink checks because this Windows account lacks the symlink privilege (Developer Mode). A full run needs Developer Mode/elevation or a Linux machine. This repository's PR CI runs only the title check (the compile-and-test job runs on pushes to `main`). The new English texts are not in the translation catalogs yet, so they show in English until translators add them (the catalog check reports them as missing, as it does for other recent texts). ### Related work No existing PR adds this setting. [#273](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/273) (open) edits the same `--play` line for packaged launchers, so this branch will conflict there and, when it lands, the no-argument form must keep its `Packaging.StartArgument`. [#130](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/130) is the Steam-tile precedent: that tile already opens the launcher instead of starting the game. [#280](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/280) fixed the account-name privacy assertion that blocked the full core run here; it is merged in `main`. ### Risks The default is unchanged, so existing players keep the game shortcut. A shortcut that starts another launcher is still left alone (`Shortcuts.MayTouch`), and the setting is Windows-only. No save, build or release-format change. ### Screenshots `launcher-settings-new.png` shows the new section in the rebased Settings layout; it goes in the comment below. Assisted-by: DeepSeek Harness (deepseek-flash)
feat(settings): the desktop and Start menu shortcuts can open the launcher
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
988e2056de
A launcher update writes the Longshot shortcuts again with --play, so a player who wants to go through the launcher first (to check for updates or pick a version) cannot keep it. Settings now has `Open the launcher from the desktop and Start menu shortcuts`: ticked, the Ready screen writes them with no arguments, and the refresh after a launcher update keeps that choice. Changing it rewrites the shortcuts that are there at once.

The shortcut is still the same Longshot.lnk, with the game's AppUserModelID; only its arguments change. Linux's shortcuts already open the launcher.

Assisted-by: DeepSeek Harness (deepseek-flash)
Author
Contributor

The new Settings section on Windows 11 (unticked, the default). Ticking it writes shortcutsOpenLauncher: true to settings.json.

launcher-settings.png

The new Settings section on Windows 11 (unticked, the default). Ticking it writes shortcutsOpenLauncher: true to settings.json. ![launcher-settings.png](https://git.magicbean.dev/attachments/92261e70-72dd-4b96-87ee-f7c480df9964)
Member

Possibly related, for context:

  • PR #88 fix(windows): the launcher's Start menu shortcut is listed beside the game's again — Merged PR established distinct launcher/game AppUserModelIDs for Windows shortcuts; this preserves that behavior.
Possibly related, for context: - PR #88 fix(windows): the launcher's Start menu shortcut is listed beside the game's again — Merged PR established distinct launcher/game AppUserModelIDs for Windows shortcuts; this preserves that behavior.
riqmarmes changed title from WIP: feat(settings): the desktop and Start menu shortcuts can open the launcher to feat(settings): the desktop and Start menu shortcuts can open the launcher 2026-11-25 11:16:34 +00:00
Author
Contributor

Since the description was written: the app-level test project builds and runs cleanly (0 failures). The full core suite still stops at the pre-existing account-name and Windows symlink-privilege limits described under Testing; a normal Windows account with Developer Mode, or a Linux machine, still needs that run.

Since the description was written: the app-level test project builds and runs cleanly (0 failures). The full core suite still stops at the pre-existing account-name and Windows symlink-privilege limits described under Testing; a normal Windows account with Developer Mode, or a Linux machine, still needs that run.
Author
Contributor

Added #280, the test-only fix for the account-name privacy assertion that stopped the full suite here. With it, the remaining local blocker is the Windows symlink privilege (Developer Mode/elevation).

Added #280, the test-only fix for the account-name privacy assertion that stopped the full suite here. With it, the remaining local blocker is the Windows symlink privilege (Developer Mode/elevation).
riqmarmes force-pushed feat/shortcuts-open-launcher from 988e2056de
Some checks failed
CI / Conventional Commit title (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
to 83fa4e8a6c
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
CI / Package (setup, portable zip, AppImage; Wine self-check) (pull_request) Has been cancelled
PR title / Conventional Commit title (pull_request) Has been cancelled
2026-11-26 08:39:28 +00:00
Compare
Author
Contributor

Rebased onto main @ 9791346 (Launcher 2): the SettingsView and README conflicts are resolved, and the Shortcuts section now sits after Updates. New screenshot attached. App tests still pass (0 failures); the core suite now passes PrivacyChecks and stops only at the Windows symlink privilege.

launcher-settings-new.png

Rebased onto main @ 9791346 (Launcher 2): the SettingsView and README conflicts are resolved, and the Shortcuts section now sits after Updates. New screenshot attached. App tests still pass (0 failures); the core suite now passes PrivacyChecks and stops only at the Windows symlink privilege. ![launcher-settings-new.png](https://git.magicbean.dev/attachments/f39136e2-aa40-4cdb-88b9-437a8ee9faf8)
Owner

I believe the new launcher fixes this, please let me know!

I believe the new launcher fixes this, please let me know!
HumanBean closed this pull request 2026-11-27 04:03:40 +00:00
Some checks failed
CI / What the change needs (pull_request) Has been cancelled
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Has been cancelled
CI / Compile and test (pull_request) Has been cancelled
CI / Package (setup, portable zip, AppImage; Wine self-check) (pull_request) Has been cancelled
PR title / Conventional Commit title (pull_request) Has been cancelled

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
3 participants
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!279
No description provided.