[pr-fix][startup] Scripts: bench and the frame generation start read F1's file in DARNER_HOME #79

Manually merged
TrustNo1 merged 1 commit from iboom72/scripts-darner-home into main 2026-12-03 20:19:24 +00:00 AGit
Contributor

What it changes

With DARNER_HOME set, scripts\play-nvidia.ps1 and darner play read darner-settings.txt there. Two scripts looked elsewhere:

  • scripts\play-nvidia-framegen.ps1 looked only in the repository folder, so it could miss a saved FSR 3 choice and not fetch AMD's files.
  • scripts\bench.ps1 looked only in %LOCALAPPDATA%\darner. It could miss saved choices that change a run, or stop for a file play does not read. It looked for NVIDIA's files there too.

Each now looks where the launcher it starts does:

  • bench.ps1 starts play in the repository folder, so a relative DARNER_HOME is taken from there.
  • The frame generation start takes it from the current folder, as play-nvidia.ps1 does.
  • Both join with [IO.Path]::Combine, so a DARNER_HOME on a drive that is not there does not stop the script. Join-Path stopped bench.ps1 there.

Like the other scripts, these two do not read the folder picked in F1 (folders.txt).

How it was tested

  • Tested revision: 4bf4518a
  • Commands and results:
    • Both scripts parse with the PowerShell parser ([Parser]::ParseFile): 0 errors.
    • I ran the changed lines on their own for four values of DARNER_HOME. Each gives the folder of the launcher the script starts:
      • an absolute path: that folder;
      • a relative one: under the repository for bench.ps1, under the current folder for the frame generation start;
      • unset: %LOCALAPPDATA%\darner for bench.ps1, the repository folder for the frame generation start;
      • one on a missing drive: no error.
    • The asset-policy pre-commit hook passed (2 files ok).
  • Gameplay: not run. No bench and no game start were made.
  • Coverage gaps: the summary's notes and the stop for clashing F1 choices were not seen on a real run with DARNER_HOME set.

Checklist

  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: #74 also changes scripts/bench.ps1, in other lines. The two merge together without conflicts, in either order.

🤖 Generated with Claude Code

## What it changes With `DARNER_HOME` set, `scripts\play-nvidia.ps1` and `darner play` read `darner-settings.txt` there. Two scripts looked elsewhere: - `scripts\play-nvidia-framegen.ps1` looked only in the repository folder, so it could miss a saved FSR 3 choice and not fetch AMD's files. - `scripts\bench.ps1` looked only in `%LOCALAPPDATA%\darner`. It could miss saved choices that change a run, or stop for a file `play` does not read. It looked for NVIDIA's files there too. Each now looks where the launcher it starts does: - `bench.ps1` starts `play` in the repository folder, so a relative `DARNER_HOME` is taken from there. - The frame generation start takes it from the current folder, as `play-nvidia.ps1` does. - Both join with `[IO.Path]::Combine`, so a `DARNER_HOME` on a drive that is not there does not stop the script. `Join-Path` stopped `bench.ps1` there. Like the other scripts, these two do not read the folder picked in F1 (`folders.txt`). ## How it was tested - Tested revision: 4bf4518a - Commands and results: - Both scripts parse with the PowerShell parser (`[Parser]::ParseFile`): 0 errors. - I ran the changed lines on their own for four values of `DARNER_HOME`. Each gives the folder of the launcher the script starts: - an absolute path: that folder; - a relative one: under the repository for `bench.ps1`, under the current folder for the frame generation start; - unset: `%LOCALAPPDATA%\darner` for `bench.ps1`, the repository folder for the frame generation start; - one on a missing drive: no error. - The asset-policy pre-commit hook passed (2 files ok). - Gameplay: not run. No bench and no game start were made. - Coverage gaps: the summary's notes and the stop for clashing F1 choices were not seen on a real run with `DARNER_HOME` set. ## Checklist - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: #74 also changes `scripts/bench.ps1`, in other lines. The two merge together without conflicts, in either order. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With DARNER_HOME set, play-nvidia.ps1 and `darner play` read
darner-settings.txt there. play-nvidia-framegen.ps1 looked only in the
repository folder, so it could miss a saved FSR 3 choice and not fetch
AMD's files. bench.ps1 looked only in %LOCALAPPDATA%\darner, so it could
miss choices that change a run, or stop for a file `play` does not read.
It looked for NVIDIA's files there too.

Each now looks where the launcher it starts does. bench.ps1 starts
`play` in the repository folder, so a relative DARNER_HOME is taken from
there; the frame generation start takes it from the current folder, as
play-nvidia.ps1 does. Both join with [IO.Path]::Combine, so a
DARNER_HOME on a drive that is not there does not stop the script.

The folder picked in F1 (folders.txt) is not read, as in the other
scripts.

Port of 5ef3aa58 (2026-11-29) onto the new main.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
TrustNo1 manually merged commit c7e041bf35 into main 2026-12-03 20:19:24 +00:00
Sign in to join this conversation.
No reviewers
No labels
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
TrustNo1/Darner!79
No description provided.