build(windows): give longshot-builder.exe its product, publisher and version #3274

Merged
HumanBean merged 1 commit from HumanBean/Longshot:build/builder-version-info into main 2026-12-05 19:23:20 +00:00
Owner

Summary

The Windows longshot-builder.exe says nothing about itself: no product, publisher or version in the file's properties. It is unsigned and antivirus often flags Longshot's programs; this may help a little with that heuristic guesswork. It is not code signing, and no effect on detections has been measured. See #46. The launcher's counterpart is LongshotLauncher #423.

longshot-builder's new build.rs links a version resource into the Windows program: company MagicBean, product Longshot, description Longshot Builder, a GPL line. Read builder/crates/longshot-builder/build.rs, then version_entry and version_numbers in builder/crates/build-core/src/res.rs (the numeric version now follows the FileVersion string: vX.Y.Z is X.Y.Z, nightly-<count>-<commit> is 0.0.count). The game's version strings have no FileVersion today, so its resource is unchanged.

Releases get no version number yet. The version strings need LONGSHOT_VERSION when the builder is compiled, and MagicBeanAdmin/Release's longshot.yml does not set it on that step. It would take LONGSHOT_VERSION: ${{ needs.plan.outputs.tag }} on the Windows build step.

Testing

Tested: not run in the game, and no game was built with it; opened with --force at the author's request. Linux (CachyOS), no GPU involved. Windows cross-build with llvm-mingw 20261104 and scripts/longshot_builder.py build --target windows --profile release, LONGSHOT_VERSION=v3.2.1, on main bb5a5682 with this change and the then-unsplit change to the game's resources: llvm-readobj shows the version resource, its strings and numeric version 3.2.1.0 are as above, longshot_builder.py check says usable, and --version runs under Wine. After rebasing onto ad7970c4: cargo test of build-core, build-assets, build-compile and longshot-builder passes, and Clippy on the touched crates' libraries and programs is clean. build-driver's library tests passed 251 of 251 on one run and 250 on the next; its driver test does not compile, on main too. cargo fmt --all --check fails on files this does not touch, on main too.

Still to test:

  • This PC or CI: mise run test, expecting no failure that main lacks (by hand).
  • Windows: open the properties of a built longshot-builder.exe, expecting the product and publisher under Details (by hand).

Measurements

Nothing to measure: a few hundred bytes of metadata in the builder's program.

Risks

A developer's link with GNU ld takes no .res, so the resource is added for llvm and MSVC links alone. A revert is enough to undo it. A player notices nothing but the file's properties.

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. Not run in the game: this changes the builder program's file metadata.
  • mise run test passes (any failure that also fails on main is named). Not run, at the author's request.
  • 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

  • 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.

🤖 Generated with Claude Code

## Summary The Windows `longshot-builder.exe` says nothing about itself: no product, publisher or version in the file's properties. It is unsigned and antivirus often flags Longshot's programs; this may help a little with that heuristic guesswork. It is not code signing, and no effect on detections has been measured. See #46. The launcher's counterpart is [LongshotLauncher #423](https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/423). `longshot-builder`'s new `build.rs` links a version resource into the Windows program: company MagicBean, product Longshot, description Longshot Builder, a GPL line. Read `builder/crates/longshot-builder/build.rs`, then `version_entry` and `version_numbers` in `builder/crates/build-core/src/res.rs` (the numeric version now follows the `FileVersion` string: `vX.Y.Z` is X.Y.Z, `nightly-<count>-<commit>` is 0.0.count). The game's version strings have no `FileVersion` today, so its resource is unchanged. **Releases get no version number yet.** The version strings need `LONGSHOT_VERSION` when the builder is compiled, and MagicBeanAdmin/Release's `longshot.yml` does not set it on that step. It would take `LONGSHOT_VERSION: ${{ needs.plan.outputs.tag }}` on the Windows build step. ## Testing **Tested:** not run in the game, and no game was built with it; opened with `--force` at the author's request. Linux (CachyOS), no GPU involved. Windows cross-build with llvm-mingw 20261104 and `scripts/longshot_builder.py build --target windows --profile release`, `LONGSHOT_VERSION=v3.2.1`, on main `bb5a5682` with this change and the then-unsplit change to the game's resources: `llvm-readobj` shows the version resource, its strings and numeric version 3.2.1.0 are as above, `longshot_builder.py check` says usable, and `--version` runs under Wine. After rebasing onto `ad7970c4`: `cargo test` of build-core, build-assets, build-compile and longshot-builder passes, and Clippy on the touched crates' libraries and programs is clean. `build-driver`'s library tests passed 251 of 251 on one run and 250 on the next; its `driver` test does not compile, on `main` too. `cargo fmt --all --check` fails on files this does not touch, on `main` too. **Still to test:** - This PC or CI: `mise run test`, expecting no failure that `main` lacks (by hand). - Windows: open the properties of a built `longshot-builder.exe`, expecting the product and publisher under Details (by hand). ## Measurements Nothing to measure: a few hundred bytes of metadata in the builder's program. ## Risks A developer's link with GNU ld takes no `.res`, so the resource is added for llvm and MSVC links alone. A revert is enough to undo it. A player notices nothing but the file's properties. ## Checklist ### Ready for review - [x] 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. Not run in the game: this changes the builder program's file metadata. - [ ] `mise run test` passes (any failure that also fails on `main` is named). Not run, at the author's request. - [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] 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. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
build(windows): give longshot-builder.exe its product, publisher and version
Some checks failed
CI / What the change needs (pull_request) Successful in 7s
CI / Game-free checks (run_all.py, part 2/2) (pull_request) Waiting to run
CI / Lint (pre-commit, ShellCheck, actionlint) (pull_request) Waiting to run
CI / Rust (rustfmt, clippy, cargo test, end to end) (pull_request) Waiting to run
CI / Host C for Windows (llvm-mingw, compile only) (pull_request) Waiting to run
CI / Renderer build check (Windows, compile --only renderer, without and with FSR 4) (pull_request) Waiting to run
CI / Renderer build check (Linux, compile --only renderer, without and with FSR 4) (pull_request) Waiting to run
CI / Game-free checks (run_all.py, part 1/2) (pull_request) Waiting to run
CI / Website build and checks (pull_request) Waiting to run
CI / Third-party parts and guide screenshots (pull_request) Successful in 14s
PR description / Title and description (pull_request_target) Failing after 6s
3fd95b5c9f
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
HumanBean changed title from WIP: build(windows): give longshot-builder.exe its product, publisher and version to build(windows): give longshot-builder.exe its product, publisher and version 2026-12-05 19:23:16 +00:00
HumanBean deleted branch build/builder-version-info 2026-12-05 19:23:20 +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!3274
No description provided.