fix(builder): the update's running-game check counts only longshot.exe, not Longshot Launcher kept in the game folder #1081

Merged
HumanBean merged 2 commits from HumanBean/Longshot:fix/running-check-launcher into main 2026-11-16 07:01:10 +00:00
Owner

The build settings offered DLSS and FSR 4 on PCs that can't run them, kept a "Prepare shaders now" switch nobody should turn off, and the build page sat at 0% while it read the game and showed the log as one grey wall. This fixes those in one go.

What changed

  • DLSS and FSR 4 only where they run. Each switch is enabled only when a card runs it: GeForce RTX for DLSS, Radeon RX 6000 and newer for FSR 4 (SystemInfo.DlssRuns, FsrRuns, Offers). On Windows the launcher now reads the display adapters from the registry, by maker and name (App/WindowsGpus.cs). On Linux it still knows each card only by its maker. When no card is found, both stay on offer. A switch remembered from another PC is left out of the build and the report, and the row says why ("This PC has no GeForce RTX card.").
  • "Prepare shaders now" removed. Every build prepares the shaders. LauncherSettings.PrepareShaders is gone, and an older settings.json that has it still loads.
  • Linux FSR 4: choose your library. AMD publishes its signed runtime for Windows only, and Longshot can't include AMD's files, so on Linux the library is the player's. With FSR 4 on, a new FSR 4 library row has a Choose… button. The launcher checks the file (a 64-bit ELF under 256 MB), remembers it (LauncherSettings.FsrLibraryPath), and copies it into the game folder as amd_fidelityfx_upscaler_vk.so whenever a build with FSR 4 finishes, including updates and rebuilds (Core/FsrLibrary.cs). If the copy fails, the Ready page and the log say so. The notice no longer reads as unsupported: it explains this and doesn't tell players where to get the library.
  • Names. The build title reads "Building Longshot v3.0.0" (also Updating to / Rebuilding). The title bar reads "Longshot Launcher" with the launcher's version in small text beside it.
  • Show details. Each line starts with its level's tag (ERR, WRN, INF, DBG, TRC) in that level's colour. The level picker shows coloured swatches that build up with each level, so it's clear each level adds to the ones before it.
  • Read the game files progress. The unpacking sends no @@progress, so the row sat at 0% for minutes. Its row now moves with nup.py's MiB written lines, measured against the title's size from the title 0: ... romfs N files, X GB line. The unpacking fills 95% of the row, the checks after it the rest (measured: unpacking took 87 s of a 91 s read).
  • All 12 full catalogs have the new texts, and the leftovers are gone (scripts/translations.py: all complete).

Testing

Tested:

  • python -I tests/test_launcher_core.py: 1059 checks passed, 14 of them new. They cover the FSR 4 library check and copy (64-bit ELF taken; 32-bit, text or missing refused; the old copy replaced; the game folder left alone on a refusal), GPU makers from Windows device ids, which cards run DLSS and FSR 4, the offers with no card found, the read's progress from MiB lines (before the size, past the end, in another stage), log prefixes and lines with levels, and an old settings.json with prepareShaders.
  • python -I tests/test_release.py: OK.
  • dotnet build: no warnings.

Not tested: a real build through the launcher with these changes, and the copy with a real FSR 4 library. The screens are checked in the screenshots below. I also haven't run the Windows registry read on a Windows PC.

Screenshots

Drawn with the screenshot tool from #85, on this branch merged with it locally.

Linux with an AMD GPU: DLSS off and disabled, FSR 4 on with the library row

settings-linux

Windows with an RTX card: FSR 4 disabled, and the Prepare shaders switch gone

settings-windows

The Linux FSR 4 notice

fsr-linux-notice

Building Longshot v3.0.0, reading the game files at 48%, and Longshot Launcher with its version in the title bar

build

Show details at Debug: each line's coloured prefix and the picker's stacked swatches

build-log

The build settings offered DLSS and FSR 4 on PCs that can't run them, kept a "Prepare shaders now" switch nobody should turn off, and the build page sat at 0% while it read the game and showed the log as one grey wall. This fixes those in one go. ## What changed - **DLSS and FSR 4 only where they run.** Each switch is enabled only when a card runs it: GeForce RTX for DLSS, Radeon RX 6000 and newer for FSR 4 (`SystemInfo.DlssRuns`, `FsrRuns`, `Offers`). On Windows the launcher now reads the display adapters from the registry, by maker and name (`App/WindowsGpus.cs`). On Linux it still knows each card only by its maker. When no card is found, both stay on offer. A switch remembered from another PC is left out of the build and the report, and the row says why ("This PC has no GeForce RTX card."). - **"Prepare shaders now" removed.** Every build prepares the shaders. `LauncherSettings.PrepareShaders` is gone, and an older settings.json that has it still loads. - **Linux FSR 4: choose your library.** AMD publishes its signed runtime for Windows only, and Longshot can't include AMD's files, so on Linux the library is the player's. With FSR 4 on, a new **FSR 4 library** row has a **Choose…** button. The launcher checks the file (a 64-bit ELF under 256 MB), remembers it (`LauncherSettings.FsrLibraryPath`), and copies it into the game folder as `amd_fidelityfx_upscaler_vk.so` whenever a build with FSR 4 finishes, including updates and rebuilds (`Core/FsrLibrary.cs`). If the copy fails, the Ready page and the log say so. The notice no longer reads as unsupported: it explains this and doesn't tell players where to get the library. - **Names.** The build title reads "Building Longshot v3.0.0" (also Updating to / Rebuilding). The title bar reads "Longshot Launcher" with the launcher's version in small text beside it. - **Show details.** Each line starts with its level's tag (ERR, WRN, INF, DBG, TRC) in that level's colour. The level picker shows coloured swatches that build up with each level, so it's clear each level adds to the ones before it. - **Read the game files progress.** The unpacking sends no `@@progress`, so the row sat at 0% for minutes. Its row now moves with nup.py's `MiB written` lines, measured against the title's size from the `title 0: ... romfs N files, X GB` line. The unpacking fills 95% of the row, the checks after it the rest (measured: unpacking took 87 s of a 91 s read). - All 12 full catalogs have the new texts, and the leftovers are gone (`scripts/translations.py`: all complete). ## Testing **Tested:** - `python -I tests/test_launcher_core.py`: 1059 checks passed, 14 of them new. They cover the FSR 4 library check and copy (64-bit ELF taken; 32-bit, text or missing refused; the old copy replaced; the game folder left alone on a refusal), GPU makers from Windows device ids, which cards run DLSS and FSR 4, the offers with no card found, the read's progress from MiB lines (before the size, past the end, in another stage), log prefixes and lines with levels, and an old settings.json with prepareShaders. - `python -I tests/test_release.py`: OK. - `dotnet build`: no warnings. **Not tested:** a real build through the launcher with these changes, and the copy with a real FSR 4 library. The screens are checked in the screenshots below. I also haven't run the Windows registry read on a Windows PC. ## Screenshots Drawn with the screenshot tool from #85, on this branch merged with it locally. **Linux with an AMD GPU: DLSS off and disabled, FSR 4 on with the library row** ![settings-linux](https://git.magicbean.dev/attachments/74d4a5a5-6b9c-4dae-9d83-264ccecd0927) **Windows with an RTX card: FSR 4 disabled, and the Prepare shaders switch gone** ![settings-windows](https://git.magicbean.dev/attachments/22da2354-3d02-4f86-88a4-244ba9a09bd5) **The Linux FSR 4 notice** ![fsr-linux-notice](https://git.magicbean.dev/attachments/14693c3d-11a9-46d5-a491-c6400244f08f) **Building Longshot v3.0.0, reading the game files at 48%, and Longshot Launcher with its version in the title bar** ![build](https://git.magicbean.dev/attachments/30b4bc30-2f6a-4d94-9ff2-4b9949b2eefc) **Show details at Debug: each line's coloured prefix and the picker's stacked swatches** ![build-log](https://git.magicbean.dev/attachments/0e5a0feb-e404-4a93-b6f1-648294cc4bcf)
fix(builder): the update's running-game check counts only longshot.exe, not Longshot Launcher kept in the game folder (LongshotLauncher#139)
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 6s
PR description / Description follows the template (pull_request_target) Successful in 8s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 10s
CI / Workflow lint (actionlint) (pull_request) Successful in 11s
Third-party parts / As their notes say (pull_request) Successful in 14s
Website / Website on Cloudflare (pull_request_target) Has been skipped
fc7dddc46c
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merge branch 'main' into fix/running-check-launcher
Some checks failed
CI / Python source checks (ubuntu-24.04, part 1/2) (pull_request) Has been skipped
CI / Python source checks (ubuntu-24.04, part 2/2) (pull_request) Has been skipped
CI / SPIR-V fixtures (global narrow load/store, direct surface atomics, F2I immediate) (pull_request) Has been skipped
Third-party parts / The same as upstream (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 7s
PR description / Description follows the template (pull_request_target) Failing after 11s
Guide screenshots / Guide images and local UI source review (pull_request) Failing after 15s
CI / Workflow lint (actionlint) (pull_request) Successful in 15s
Third-party parts / As their notes say (pull_request) Successful in 20s
8bf166e965
HumanBean changed title from WIP: fix(builder): the update's running-game check counts only longshot.exe, not Longshot Launcher kept in the game folder to fix(builder): the update's running-game check counts only longshot.exe, not Longshot Launcher kept in the game folder 2026-11-16 07:00:54 +00:00
HumanBean deleted branch fix/running-check-launcher 2026-11-16 07:01: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/Longshot!1081
No description provided.