Skip to content

Embed Windows VERSIONINFO resource in datui.exe - #54

Closed
derekwisong wants to merge 1 commit into
mainfrom
feat/windows-version-resource
Closed

Embed Windows VERSIONINFO resource in datui.exe#54
derekwisong wants to merge 1 commit into
mainfrom
feat/windows-version-resource

Conversation

@derekwisong

Copy link
Copy Markdown
Owner

What

The shipped Windows binary has an empty PE resource directory. Parsing the data directories of the released datui.exe from v0.2.56:

Certificate  0x0  0     <- unsigned
Resource     0x0  0     <- no VERSIONINFO

No ProductName, CompanyName, FileDescription, FileVersion or LegalCopyright — the Properties dialog in Explorer shows nothing, and users have no way to confirm what they downloaded.

This adds a winresource-driven VERSIONINFO block to build.rs, gated to Windows hosts (the MSVC toolchain supplies the resource compiler; the release workflow builds natively on windows-latest, so the gate is always satisfied there).

FileVersion / ProductVersion are derived from CARGO_PKG_VERSION, so they track releases automatically.

Guardrail

Both the CI and release Windows jobs now read the metadata back off the built exe and fail if any field is empty, so this can't silently regress. The release check runs before the zip is created, so an anonymous binary can never be published.

Context

Not a fix for the winget 0.2.56 Defender block — that traces to microsoft/winget-pkgs#399077, an open winget validation-pipeline bug where Defender fails during dynamic analysis and the failure is reported as a detection. Defender-error PRs in winget-pkgs went from ~10/month through June to 548 in August. This is general hardening: publisher metadata is worth having on its own, and anonymous binaries score worse with reputation-based scanners.

Test plan

  • CI Windows job passes and the new Verify version resource step prints non-empty ProductName / CompanyName / FileVersion
  • Linux/macOS jobs unaffected (build.rs no-ops off-Windows)
  • cargo check --locked --workspace clean (verified locally; Cargo.lock only gains winresource + its toml stack, no existing versions changed)

The shipped Windows binary had an empty resource directory - no product
name, company, description, or version in the file's Properties dialog.
Add a winresource-driven VERSIONINFO block in build.rs, and fail the CI
and release Windows jobs if any of the fields come back empty.
@derekwisong
derekwisong deleted the feat/windows-version-resource branch August 25, 2026 17:39
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.

1 participant