fix(profile): load environment switches from the active profile #2710

Merged
HumanBean merged 1 commit from HumanBean/Longshot:fix/profile-env-first into main 2026-11-28 01:27:04 +00:00
Owner

Players who use several builds need their environment switches to follow their active profile. Longshot reads the profile copy of longshot_env.txt first. When that file is absent, it reads config/longshot_env.txt in an organized build or longshot_env.txt at the root of an older build.

An explicit HOS_ENV_FILE selects the file for that run. Player-file switch restrictions continue to apply. The player guide, troubleshooting page, profile reference, and switch reference describe the lookup order and file locations.

The rebased environment-file regression test covers both build layouts and profile precedence. The settings migration test also passes. Two Linux game starts before the rebase verified profile selection and build fallback. Windows runtime verification remains pending.

Players who use several builds need their environment switches to follow their active profile. Longshot reads the profile copy of `longshot_env.txt` first. When that file is absent, it reads `config/longshot_env.txt` in an organized build or `longshot_env.txt` at the root of an older build. An explicit `HOS_ENV_FILE` selects the file for that run. Player-file switch restrictions continue to apply. The player guide, troubleshooting page, profile reference, and switch reference describe the lookup order and file locations. The rebased environment-file regression test covers both build layouts and profile precedence. The settings migration test also passes. Two Linux game starts before the rebase verified profile selection and build fallback. Windows runtime verification remains pending.
Load environment switches from the player profile before the build folder
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
PR description / Title and description (pull_request_target) Successful in 26s
CI / What the change needs (pull_request) Successful in 29s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 35s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 35s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
de31741b4f
Author
Owner

Tested in game: Linux, NVIDIA GeForce RTX 3090. Started the patched game twice with a throwaway profile. Distinct diagnostic markers confirmed the game read only the profile file when present and the build file when absent.

Tested in game: Linux, NVIDIA GeForce RTX 3090. Started the patched game twice with a throwaway profile. Distinct diagnostic markers confirmed the game read only the profile file when present and the build file when absent.
HumanBean force-pushed fix/profile-env-first from de31741b4f
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
PR description / Title and description (pull_request_target) Successful in 26s
CI / What the change needs (pull_request) Successful in 29s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Third-party parts and guide screenshots (pull_request) Failing after 35s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 35s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Has been cancelled
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Has been cancelled
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Has been cancelled
CI / Website build and checks (pull_request) Has been cancelled
to 8d784cf379
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 22s
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Has been skipped
PR description / Title and description (pull_request_target) Has been cancelled
CI / Third-party parts and guide screenshots (pull_request) Failing after 41s
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Successful in 35s
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Failing after 3m17s
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Successful in 2m2s
CI / Website build and checks (pull_request) Failing after 1m24s
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Failing after 25m31s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Failing after 34m48s
2026-11-28 01:26:16 +00:00
Compare
Author
Owner

Rebased onto d05a0dab and preserved main’s organized build layout during conflict resolution. Updated the player and developer docs and verified profile precedence and both build fallbacks.

Rebased onto d05a0dab and preserved main’s organized build layout during conflict resolution. Updated the player and developer docs and verified profile precedence and both build fallbacks.
HumanBean changed title from WIP: fix(profile): load environment switches from the active profile to fix(profile): load environment switches from the active profile 2026-11-28 01:26:38 +00:00
HumanBean deleted branch fix/profile-env-first 2026-11-28 01:27:09 +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!2710
No description provided.