fix(builder): share installed and portable launcher folders #2629

Merged
HumanBean merged 3 commits from HumanBean/Longshot:feat/shared-linux-launcher-folders into main 2026-11-26 23:31:44 +00:00
Owner

Players on Linux and Windows who start a new standalone builder and later open the Rust launcher should find the same default profile and reuse their build tools and shader cache. This change aligns the fresh-install paths with the launcher rewrite.

Summary

A new standalone profile lives under $XDG_DATA_HOME/longshot/profiles/default and the builder cache under $XDG_CACHE_HOME/longshot/longshot-builder. On Windows, fresh versions use %LOCALAPPDATA%\Longshot\data\profiles\default and %LOCALAPPDATA%\Longshot\cache\longshot-builder. Directly starting a builder inside a marked portable launcher uses its sibling data and cache folders. Preparation and play share the same shader store, and a named cache takes precedence over the machine’s older shader cache. Existing populated portable profiles and caches remain usable in place, including older per-user caches and shader packs. Explicit profile, cache and shader settings retain precedence.

Testing

Tested on Linux with isolated temporary data and cache directories. 252 tests passed across build-driver and longshot-builder. I also ran the built executable’s info command against three synthetic setups and verified that it selected the fresh XDG profile, an explicitly requested profile, and an existing portable profile.

The patched standalone builder launched an isolated copy of the installed game on Linux with an NVIDIA GeForce RTX 3090, driver 620.70.06. I verified the live game window and checked the child process received the fresh XDG profile and shader store paths. No prior save was used. Clippy passed with warnings denied.

Tested on the current head: All 269 tests across build-driver, longshot-builder and Steam passed on Linux. The portable profile regression failed on the previous revision and passed on this one. Clippy passed with warnings denied. The Windows GNU target compiled with all targets. XDG tests cover relative paths during profile, cache, Steam library and Vulkan manifest discovery.

Still to test Windows runtime behavior and the repository-wide suite on this revision.

Measurements

The change selects folders during startup. It adds no rendering or compilation work. The tests compare the resolved paths directly.

Risks

A populated portable profile intentionally keeps priority over the shared profile. Players who want another profile can select it with --profile. Existing shader packs are reused in place to preserve their indices.

Checklist

Ready for review

  • One topic, on current main; the title is a Conventional Commit.
  • Tested on my own PC, in the game for a change the game runs, as Testing says.
  • mise run test passes (any failure that also fails on main is named).
  • Measured against main, or Measurements says why there is nothing to measure.
  • No game files, build output or hand-edited generated files; third_party/ untouched; nothing GPL-incompatible.

When it applies

  • A fix: a game-free test that fails on main and passes here.
  • A switch added or changed: it ships at the default the measurements chose, with its row in gpu/vk/switches.def.
  • A check under tests/ that reads changed source is updated, not weakened.
  • MKWVK_API_VERSION bumped (MkwVkHost or MkwVkRenderer in gpu/vk/vk_api.h changed).
  • The SPIR-V headers regenerated (a shader changed).
  • Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths.
  • Screenshots of the same spot on main and here, for a change that shows on screen.
  • Docs updated.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers").
  • Approved in review, every comment answered.
  • CI passes on the head; on current main, measured again or a comment says why the numbers still hold.
Players on Linux and Windows who start a new standalone builder and later open the Rust launcher should find the same default profile and reuse their build tools and shader cache. This change aligns the fresh-install paths with [the launcher rewrite](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/284). ## Summary A new standalone profile lives under `$XDG_DATA_HOME/longshot/profiles/default` and the builder cache under `$XDG_CACHE_HOME/longshot/longshot-builder`. On Windows, fresh versions use `%LOCALAPPDATA%\Longshot\data\profiles\default` and `%LOCALAPPDATA%\Longshot\cache\longshot-builder`. Directly starting a builder inside a marked portable launcher uses its sibling data and cache folders. Preparation and play share the same shader store, and a named cache takes precedence over the machine’s older shader cache. Existing populated portable profiles and caches remain usable in place, including older per-user caches and shader packs. Explicit profile, cache and shader settings retain precedence. ## Testing **Tested** on Linux with isolated temporary data and cache directories. 252 tests passed across build-driver and longshot-builder. I also ran the built executable’s `info` command against three synthetic setups and verified that it selected the fresh XDG profile, an explicitly requested profile, and an existing portable profile. The patched standalone builder launched an isolated copy of the installed game on Linux with an NVIDIA GeForce RTX 3090, driver 620.70.06. I verified the live game window and checked the child process received the fresh XDG profile and shader store paths. No prior save was used. Clippy passed with warnings denied. **Tested on the current head:** All 269 tests across build-driver, longshot-builder and Steam passed on Linux. The portable profile regression failed on the previous revision and passed on this one. Clippy passed with warnings denied. The Windows GNU target compiled with all targets. XDG tests cover relative paths during profile, cache, Steam library and Vulkan manifest discovery. **Still to test** Windows runtime behavior and the repository-wide suite on this revision. ## Measurements The change selects folders during startup. It adds no rendering or compilation work. The tests compare the resolved paths directly. ## Risks A populated portable profile intentionally keeps priority over the shared profile. Players who want another profile can select it with `--profile`. Existing shader packs are reused in place to preserve their indices. ## Checklist ### Ready for review - [x] One topic, on current `main`; the title is a Conventional Commit. - [x] Tested on my own PC, in the game for a change the game runs, as Testing says. - [ ] `mise run test` passes (any failure that also fails on `main` is named). - [x] Measured against `main`, or Measurements says why there is nothing to measure. - [x] No game files, build output or hand-edited generated files; `third_party/` untouched; nothing GPL-incompatible. ### When it applies - [x] A fix: a game-free test that fails on `main` and passes here. - [ ] A switch added or changed: it ships at the default the measurements chose, with its row in `gpu/vk/switches.def`. - [ ] A check under `tests/` that reads changed source is updated, not weakened. - [ ] `MKWVK_API_VERSION` bumped (`MkwVkHost` or `MkwVkRenderer` in `gpu/vk/vk_api.h` changed). - [ ] The SPIR-V headers regenerated (a shader changed). - [ ] Host code builds on Windows (llvm-mingw) and Linux, with UTF-8 paths. - [ ] Screenshots of the same spot on `main` and here, for a change that shows on screen. - [x] Docs updated. - [x] AI assistance recorded with `Assisted-by:` / `Co-Authored-By:` trailers. ### Ready to merge - [ ] Everything in Still to test has run, its results in Tested. - [ ] Tier 1 hardware it can affect is tested (docs/dev/standards.md, "Hardware tiers"). - [ ] Approved in review, every comment answered. - [ ] CI passes on the head; on current `main`, measured again or a comment says why the numbers still hold.
fix(builder): share Linux defaults with Longshot Launcher
All checks were successful
Website / Website preview, upload (pull_request_target) Has been skipped
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
CI / What the change needs (pull_request) Successful in 8s
PR description / Title and description (pull_request_target) Successful in 10s
CI / Third-party parts and guide screenshots (pull_request) Successful in 12s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 1m13s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 1m55s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m35s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 2m39s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Successful in 3m54s
CI / Website build and checks (pull_request) Successful in 1m49s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Successful in 3m45s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Successful in 21m52s
99bf538e11
Assisted-by: OpenAI Codex
Co-authored-by: OpenAI Codex <[email protected]>
Author
Owner

Tested in game: Linux, NVIDIA GeForce RTX 3090, driver 620.70.06. The patched standalone builder launched an isolated copy of Longshot on a private X display with an empty user profile. The running game window belonged to the installed engine and its process used the expected XDG profile and shader store directories.

Tested in game: Linux, NVIDIA GeForce RTX 3090, driver 620.70.06. The patched standalone builder launched an isolated copy of Longshot on a private X display with an empty user profile. The running game window belonged to the installed engine and its process used the expected XDG profile and shader store directories.
Member

Possibly related, for context:

  • PR #737 feat(vk): one shader cache store for every game folder, so a build whose translation is unchanged prepares nothing — Open PR introducing the shared shader-cache store this change targets
  • issue #1906 # Bug Report: Shared Object Cache Fails to Reuse Compiled Objects Across Nightly Updates on LinuxInstall: — Open Linux issue about launcher build-cache reuse paths
Possibly related, for context: - PR #737 feat(vk): one shader cache store for every game folder, so a build whose translation is unchanged prepares nothing — Open PR introducing the shared shader-cache store this change targets - issue #1906 # Bug Report: Shared Object Cache Fails to Reuse Compiled Objects Across Nightly Updates on LinuxInstall: — Open Linux issue about launcher build-cache reuse paths
fix(builder): share installed and portable launcher directories
Some checks failed
Website / Website on Cloudflare (pull_request_target) Has been skipped
Website / Website preview, built by CI (pull_request_target) Has been skipped
Website / Website preview, upload (pull_request_target) Has been skipped
CI / What the change needs (pull_request) Successful in 8s
CI / Third-party parts and guide screenshots (pull_request) Successful in 11s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 45s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 1m16s
PR description / Title and description (pull_request_target) Failing after 5s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Successful in 2m20s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Successful in 5m8s
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Successful in 1m48s
CI / Website build and checks (pull_request) Successful in 2m26s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Successful in 18m6s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Successful in 30m45s
b82ebd015a
HumanBean changed title from WIP: fix(builder): share Linux defaults with Longshot Launcher to WIP: fix(builder): share installed and portable launcher folders 2026-11-26 23:28:31 +00:00
HumanBean changed title from WIP: fix(builder): share installed and portable launcher folders to fix(builder): share installed and portable launcher folders 2026-11-26 23:31:38 +00:00
HumanBean deleted branch feat/shared-linux-launcher-folders 2026-11-26 23:31:44 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 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/Longshot!2629
No description provided.