feat(install)!: one download per system, which asks to install on first start #273
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!273
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/LongshotLauncher:one-download"
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
Players had three files to choose from (a Windows setup, a Windows portable zip, an AppImage) and Linux had no real install. Now there is one download per system, and its first start asks whether to install it or use it from where it is. Packagers (distros, Flatpak, Snap) can also turn the launcher's own updater and the install question off.
What changed
Downloads
Windows:
LongshotLauncher-<v>-windows-x64.exe. Linux:LongshotLauncher-<v>-linux-x64.AppImage, named for its system as the Windows one is (and as every other release file:windows-x64,linux-x64).The portable zip and the separate setup naming are gone from the README and docs.
Old names kept as aliases. Every release still carries
-windows-x64-setup.exe(the same program, byte for byte) and-windows-x64-portable.zip(that program alone asLongshotLauncher.exe, with noportablefile). The Linux AppImage is also published as-x86_64.AppImage(the same file), the name earlier launchers update from. They are needed because:/download/launcher/[<channel>/]windowsandwindows-portablelinks (Longshot'swebsite/worker/index.ts, which matches the-windows-x64-setup.exesuffix) find files by them;release.pybuilds the release page header from them.So every website link keeps working, and serves the same program. The new launcher reads the new name first and the setup name second, so it can update from releases made before or after this change. Follow-ups to drop the aliases later: the website and
release.pyshould name-windows-x64.exe. I didn't touch either; they're in other repos.First start (
LauncherLayout.FirstStartOf)~/.local/share/LongshotLauncher/LongshotLauncher.AppImage, with its version in a file beside it;longshot-launcher.desktopmenu entry and a hicolor icon;Longshotfolder beside the program. That folder is the mark and holds all of the launcher's data. ALongshotfolder that is really something else doesn't count as the mark: the default builds folder~/Games/Longshot,%APPDATA%\Longshot, or a builds folder.Self-update keeps the kind. An installed launcher updates the installed file. A portable one updates itself in place, from the same one program. The portable-zip update path is removed.
Migration
portablefile plusLongshotLauncher-data): still portable, data stays where it is. If both marks exist, the old one wins.<AppImage>.home: still portable.Packaging (README, "Packaging")
-p:LongshotPackaged=true(an AssemblyMetadata baked into the binary);--no-self-update;LONGSHOT_LAUNCHER_NO_SELF_UPDATE=1is set;FLATPAK_IDor/.flatpak-info) or a Snap (SNAP).--rollback;infocapabilities, so there's no flag to pass.AppImage FUSE: the build already uses AppImage's static
type2-runtime(20251108, a static-pie with libfuse3 built in), so nolibfuse2is needed. It needs the kernel's FUSE and afusermount3/fusermounthelper. Without them,APPIMAGE_EXTRACT_AND_RUN=1still works. This is documented in package.sh, the README and docs/releases.md.Texts: the new texts are in all 12 full catalogs, and the three texts this PR replaces are removed. I also removed 4 stale leftover keys that already made
scripts/translations.pyfail onmain(the old-folder-layout texts and "Details"). The whole test file can't run past that check without this.Review fixes (self-review)
.portablefile inside theLongshotfolder: a bareLongshotfolder (the player's own, or a builds folder) is asked about, never taken for the mark.installed-oncein the launcher's home, so a download started after an uninstall asks again instead of carrying on silently.How it was tested
dotnet build App -c Release -maxcpucount:4: 0 warnings, 0 errors.python -I tests/test_launcher_core.py --dotnet …, the whole file unmodified, passes: 2696 checks. New checks (tests/launcher_core/OneDownloadChecks.cs,InstallChecks.cs,Program.cs,test_launcher_core.py):first-start-windowsandfirst-start-linux).🤖 Generated with Claude Code
Possibly related, for context:
@review
Recommendation: Request changes. A newly portable launcher can lose access to its data when switching to an older launcher, and an unrelated folder can be mistaken for its portable home. The new install and uninstall flows also need real Windows and Linux runs.
The change combines each platform’s downloads, adds Linux installation and package-manager controls, and preserves release aliases. It simplifies the download choice, but adds migration and lifecycle cases that are not yet handled safely.
Blocking (4): must change before merging.
App/LauncherService.cs:262: Switching a newly portable launcher to an older channel can replace it with a launcher that cannot recognize its portable home. (more on the line) Do: Preserve a portable layout understood by the selected older launcher, or prevent switching to an incompatible version with a clear explanation.Core/LauncherLayout.cs:97: A logs directory or ordinary settings file is accepted as a portable marker even without the new .portable file. (more on the line) Do: Require the explicit .portable marker for the new layout; retain only the separately identified legacy markers for migration.Core/LauncherLayout.cs:167: The command-line packaging choice is not retained by shortcuts the launcher creates. (more on the line) Do: Ensure generated entry points preserve the packaging choice, for example by requiring and using a package wrapper for shortcut targets or propagating the argument.@fixor@rebasetry first). (for the author)Should fix (1): not blocking, but worth doing before merging.
App/SetupWindows.cs:116: A failure to start the installed launcher is only logged, and the setup window closes. (more on the line) Do: Show the failure in the setup window and allow the player to retry or keep the download.Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
@fixcan do L1, L2, L3 and L4.Questions (1) (not confirmed from the code; they don't hold the recommendation)
More: does it help, other systems, switches, what was read
Does it help: Unproven: the supplied evidence includes core checks and headless screenshots, but no installation or startup on a real Windows PC or Linux home.
Other systems: The change affects existing Windows portable launchers, Linux AppImages, launcher channel changes, shortcuts, package-managed installations and release consumers. Alias compatibility is covered by source checks and fake releases; real platform installation and migration remain untested.
Switches: Adds LongshotPackaged=true, --no-self-update and LONGSHOT_LAUNCHER_NO_SELF_UPDATE; all default off. Flatpak and Snap detection also disable self-update automatically. The command-line switch is lost when generated shortcuts start the executable directly.
Reviewed:
af88cfbecfagainst4dd60cea24: Read repository rules and the principal startup, layout, installation, update, release and shortcut code and their diffs. Skimmed translations, documentation, release workflow, packaging and test changes; not every changed code file was read in full. No review checklist or pull request template was found at the named paths.; nothing run (a code review).Checked and fine:
Testing: No commands from the project, builds or tests were run, as requested. The pull request reports 2,696 checks and headless screenshots.
Overlaps and merge order: Not checked; network access was unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@ -258,3 +259,4 @@if (!layout.UpdatesItself) throw new InvalidOperationException("This launcher's package manager updates it.");var current = layout.File?? throw new InvalidOperationException("This launcher was not started from its own file, so it cannot replace itself.");var file = release.Launcher.TryGetValue(layout.UpdateKey, out var f) ? fL1 (blocking): Switching a newly portable launcher to an older channel can replace it with a launcher that cannot recognize its portable home.
When: A player chooses portable with this version and then selects a channel whose newest release predates this change. The older Windows launcher looks for the old portable marker and data folder, while the older Linux launcher looks for an AppImage.home folder, so the existing Longshot folder and its builds are no longer used.
Do: Preserve a portable layout understood by the selected older launcher, or prevent switching to an incompatible version with a clear explanation.
@ -96,0 +113,4 @@Program.Layout.File ?? "")));void Start(bool delete){try { Program.StartInstalled(installed, delete); }L4 (should fix): A failure to start the installed launcher is only logged, and the setup window closes.
When: If starting the installed file fails after installation, either button closes the window without telling the player why; no launcher window opens.
Do: Show the failure in the setup window and allow the player to retry or keep the download.
@ -57,0 +94,4 @@if (IsReserved(folder, platform, getenv)) return false;// (a mark of its own, or the launcher's data: never any folder that happens to be called Longshot, a builds folder or// one of the player's)return System.IO.File.Exists(Path.Combine(folder, PortableMark)) || HasData(folder) || Directory.Exists(Path.Combine(folder, "logs"));L2 (blocking): A logs directory or ordinary settings file is accepted as a portable marker even without the new .portable file.
When: A download sits beside an unrelated Longshot folder containing a logs directory. It is classified as portable without asking and uses that folder as its data home, where launcher files can be written into the unrelated folder.
Do: Require the explicit .portable marker for the new layout; retain only the separately identified legacy markers for migration.
@ -57,0 +164,4 @@{getenv ??= Environment.GetEnvironmentVariable;exists ??= System.IO.File.Exists;if (Built(assembly)) return "build";L3 (blocking): The command-line packaging choice is not retained by shortcuts the launcher creates.
When: A package starts the launcher with --no-self-update and the player creates a game shortcut. The shortcut starts LauncherPath directly without that argument, so the next window is classified as unpackaged and can offer or perform self-update.
Do: Ensure generated entry points preserve the packaging choice, for example by requiring and using a package wrapper for shortcut targets or propagating the argument.
af88cfbecfb08d0ced01Thanks for the review. Pushed at
b08d0ced, now onmain(with #276 underneath, which fixesmain's compile: merge that first).Longshotfolder is no longer offered a launcher release from before one download per system. Those releases are the ones that carry only the old asset names. The reason is logged. Portable launchers with the old marks, and installed launchers, are unaffected..portablefile marks the new layout now. The old marks (Windows'portablefile withLongshotLauncher-data, Linux's<AppImage>.home) are still read separately, so existing portable launchers keep working. "Use it from here" refuses an unmarkedLongshotfolder that's something else.--no-self-updateorLONGSHOT_LAUNCHER_NO_SELF_UPDATEmade the launcher packaged, the shortcuts, menu entries and Steam tile it creates pass--no-self-update. The build flag, Flatpak and Snap don't need it. Not covered: the game folder'sbuilder=stamp is a bare path; a packager using the argument should use the build flag or a wrapper.main. #151's symlink resolution is kept: a symlinked AppImage is resolved to its target before its portable marks and install state are read.website/worker/index.tsand Tooling'srelease.pystill name the old files, which every release keeps publishing, so nothing breaks. Switching them to the new names is a follow-up once this merges.Checks:
tests/test_launcher_core.py --strict --longshot <Longshot main>: 2812 passed.WIP: feat(install)!: one download per system, which asks to install on first startto feat(install)!: one download per system, which asks to install on first startb08d0ced012049720b53@review
At
2049720b: L1–L4 fixed (see the comment above), rebased onmainafter #272 and #276.Recommendation: Approve. The code is ready: only testing is left. The reported code issues are addressed, but the new installation and portable flows still need real Windows and Linux runs before merge. Recommend approval; not approved on the forge.
The launcher offers installation or portable use from one download per system, adds Linux installation, and lets packages disable self-update. The change simplifies the download choice but adds platform-specific installation and migration paths.
Testing before merging (1) (runs on the systems it can change; it doesn't hold the recommendation)
Since the last review (on
af88cfbecf)Resolved: L1 (Switching a newly portable launcher to an older channel can replace it with a launcher tha…); L2 (A logs directory or ordinary settings file is accepted as a portable marker even without t…); L3 (The command-line packaging choice is not retained by shortcuts the launcher creates.); L4 (A failure to start the installed launcher is only logged, and the setup window closes.); L6 (It conflicts with its base branch: bring it up to date (
@fixor@rebasetry first).)Still open: L5 (The new first-start and installation flows have not been exercised on either supported des…)
Also noticed (1; not asked for, not blocking)
More: does it help, other systems, switches, what was read
Does it help: Unproven: the author reports 2,812 automated checks passing, but no real Windows or Linux installation runs are reported.
Other systems: Windows and Linux installation, portable migration, self-update, desktop shortcuts and Steam tiles are affected. Release aliases preserve the existing website and Tooling download names; real-system behavior remains to be checked.
Switches: LongshotPackaged defaults to false; --no-self-update and LONGSHOT_LAUNCHER_NO_SELF_UPDATE opt into package-managed updates. Flatpak and Snap are detected automatically. The defaults fit the stated packaging behavior.
Reviewed:
2049720b53against3af691ed6d: Read AGENTS.md, CONTRIBUTING.md, Core/LauncherLayout.cs, App/SetupWindows.cs and App/WindowsShortcuts.cs in full; inspected the relevant diffs, callers and tests. Other changed files, translations and generated assets were not read in full.; nothing run (a code review).Checked and fine:
Testing: No commands that execute project code were run. The author reports 2,812 checks passed; real desktop runs remain outstanding.
Overlaps and merge order: #272 and #276 are included in the current base; the corresponding Longshot release-documentation change is still needed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
Pull request closed