fix(ci): the Windows builder may import cfgmgr32.dll, which is part of Windows #3301

Merged
HumanBean merged 1 commit from HumanBean/Longshot:fix/win-cfgmgr32 into main 2026-12-06 02:19:02 +00:00
Owner

Summary

The release's Windows job (run 1830) compiles longshot-builder.exe, then stops at what was built is not usable: needs cfgmgr32.dll, which is not part of Windows. cfgmgr32.dll is System32's device-configuration API, imported beside setupapi and hid for the controllers; scripts/longshot_builder.py's WINDOWS_UI_IMPORT just didn't list it. This adds it, so the Windows build passes its usability check again.

Read WINDOWS_UI_IMPORT in scripts/longshot_builder.py and the new WindowsImportsTest in tests/test_longshot_builder.py.

Testing

Tested: python -I -B tests/test_longshot_builder.py on Linux: the new test fails on main (needs cfgmgr32.dll, which is not part of Windows) and passes here. Nothing the game runs changes: only the build script's check of which DLLs the Windows builder may import.

Still to test:

  • The next release run's Windows job: it gets past the usability check (by hand, from the Release repo's runs)

Measurements

Nothing to measure: a build check's allowlist.

Risks

None for players: cfgmgr32.dll ships in System32 on every supported Windows. A revert is enough.

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). — only tests/test_longshot_builder.py ran here
  • 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.
  • AI assistance recorded with Assisted-by: / Co-Authored-By: trailers.

Ready to merge

  • Everything in Still to test has run, its results in Tested.
  • 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.

🤖 Generated with Claude Code

## Summary The release's Windows job ([run 1830](https://git.magicbean.dev/MagicBeanAdmin/Release/actions/runs/1830)) compiles longshot-builder.exe, then stops at `what was built is not usable: needs cfgmgr32.dll, which is not part of Windows`. cfgmgr32.dll is System32's device-configuration API, imported beside setupapi and hid for the controllers; `scripts/longshot_builder.py`'s `WINDOWS_UI_IMPORT` just didn't list it. This adds it, so the Windows build passes its usability check again. Read `WINDOWS_UI_IMPORT` in `scripts/longshot_builder.py` and the new `WindowsImportsTest` in `tests/test_longshot_builder.py`. ## Testing **Tested:** `python -I -B tests/test_longshot_builder.py` on Linux: the new test fails on `main` (`needs cfgmgr32.dll, which is not part of Windows`) and passes here. Nothing the game runs changes: only the build script's check of which DLLs the Windows builder may import. **Still to test:** - The next release run's Windows job: it gets past the usability check (by hand, from the Release repo's runs) ## Measurements Nothing to measure: a build check's allowlist. ## Risks None for players: cfgmgr32.dll ships in System32 on every supported Windows. A revert is enough. ## 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). — only `tests/test_longshot_builder.py` ran here - [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. - [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. - [ ] 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. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(ci): the Windows builder may import cfgmgr32.dll, which is part of Windows
Some checks are pending
CI / What the change needs (pull_request) Waiting to run
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Blocked by required conditions
CI / Third-party parts and guide screenshots (pull_request) Waiting to run
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Blocked by required conditions
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Blocked by required conditions
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Blocked by required conditions
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Blocked by required conditions
CI / Website build and checks (pull_request) Blocked by required conditions
PR description / Title and description (pull_request_target) Waiting to run
2f483b0e22
The release's Windows job stopped at 'needs cfgmgr32.dll, which is not part
of Windows': it is System32's device-configuration API, imported beside
setupapi and hid for the controllers.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
HumanBean changed title from WIP: fix(ci): the Windows builder may import cfgmgr32.dll, which is part of Windows to fix(ci): the Windows builder may import cfgmgr32.dll, which is part of Windows 2026-12-06 02:18:58 +00:00
HumanBean deleted branch fix/win-cfgmgr32 2026-12-06 02:19:03 +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!3301
No description provided.