Skip to content

Simplify Windows build pipeline: replace Resource Hacker with go-winres - #23

Merged
TheZeekA merged 2 commits into
mainfrom
testing
Aug 2, 2026
Merged

TheZeekA merged 2 commits into
mainfrom
testing

Conversation

@TheZeekA

@TheZeekA TheZeekA commented Aug 2, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Move manifest (RT_MANIFEST) and version info (RT_VERSION) into src/winres/winres.json, alongside the existing icon entries. dist/windows/versioninfo.rc is removed (superseded).
  • Replace CI's 5-step Resource Hacker chain (unversioned github user-attachments zip download + silent install + hardcoded Start-Sleep calls totaling 3.5+ min) with a single go tool go-winres patch --in winres/winres.json --no-backup 1.exe step, using go-winres pinned as a checksummed Go tool dependency instead of an unversioned URL.
  • upx compression and the WiX MSI step are untouched.

The manifest can't be folded into the compile-time .syso the way the icon is — this project cgo-links via mingw, whose CRT auto-links its own default-manifest.o into GUI executables, which conflicts with an embedded RT_MANIFEST at link time (ld: .rsrc merge failure: multiple non-default manifests). So the icon stays compile-time via .syso as before, and the manifest + version info get patched into the already-linked exe post-build via go-winres patch — same post-link approach Resource Hacker used, just one deterministic call instead of five.

Validated end-to-end on a real windows-2025 runner via manual dispatch: run 30731838971, 5m16s (vs. ~8-9 min previously) with icon, asInvoker manifest, and version info all correctly embedded.

Fixes #13

Test plan

  • Verified locally: go build (icon via .syso) → go tool go-winres patch (manifest + version) produces an exe with correct icon (MAINICON/GLFW_ICON), asInvoker manifest, and FileVersionRaw/ProductVersionRaw = 1.51.0.0.
  • pr-test-build-windows.yml passed via manual dispatch on windows-2025.

TheZeekA and others added 2 commits August 2, 2026 16:04
Manifest and version info are now defined in src/winres/winres.json
(RT_MANIFEST/RT_VERSION) alongside the existing icon entries, and
patched into the built exe post-link via `go tool go-winres patch`.
This drops the unversioned Resource Hacker zip download and five
tool invocations separated by hardcoded Start-Sleep calls (3.5+
minutes per build), replacing them with one deterministic, checksum
pinned Go tool dependency.

The manifest can't be folded into the compile-time .syso like the
icon is, because this project cgo-links via mingw, whose CRT
auto-links its own default-manifest.o into GUI executables and
conflicts with an embedded RT_MANIFEST at link time. Patching it in
post-build sidesteps that.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Automatic triggers (push/pull_request) don't fire on this fork until
approved in repo settings, so this workflow has never actually run.
Manual dispatch lets it be validated without needing that approval or
touching the release pipeline.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@TheZeekA
TheZeekA merged commit 6c7b2cc into main Aug 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Simplify the Windows build pipeline: replace Resource Hacker with go-winres

1 participant