build(windows): give longshot-builder.exe its product, publisher and version #3274
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3274
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:build/builder-version-info"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The Windows
longshot-builder.exesays 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 newbuild.rslinks a version resource into the Windows program: company MagicBean, product Longshot, description Longshot Builder, a GPL line. Readbuilder/crates/longshot-builder/build.rs, thenversion_entryandversion_numbersinbuilder/crates/build-core/src/res.rs(the numeric version now follows theFileVersionstring:vX.Y.Zis X.Y.Z,nightly-<count>-<commit>is 0.0.count). The game's version strings have noFileVersiontoday, so its resource is unchanged.Releases get no version number yet. The version strings need
LONGSHOT_VERSIONwhen the builder is compiled, and MagicBeanAdmin/Release'slongshot.ymldoes not set it on that step. It would takeLONGSHOT_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
--forceat the author's request. Linux (CachyOS), no GPU involved. Windows cross-build with llvm-mingw 20261104 andscripts/longshot_builder.py build --target windows --profile release,LONGSHOT_VERSION=v3.2.1, on mainbb5a5682with this change and the then-unsplit change to the game's resources:llvm-readobjshows the version resource, its strings and numeric version 3.2.1.0 are as above,longshot_builder.py checksays usable, and--versionruns under Wine. After rebasing ontoad7970c4:cargo testof 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; itsdrivertest does not compile, onmaintoo.cargo fmt --all --checkfails on files this does not touch, onmaintoo.Still to test:
mise run test, expecting no failure thatmainlacks (by hand).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
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). Not run, at the author's request.main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
WIP: build(windows): give longshot-builder.exe its product, publisher and versionto build(windows): give longshot-builder.exe its product, publisher and version