Skip to content

Show the version in the menu and in the exe's file properties - #2

Merged
ruia merged 1 commit into
mainfrom
app-version
Oct 23, 2026
Merged

ruia merged 1 commit into
mainfrom
app-version

Conversation

@ruia

@ruia ruia commented Oct 23, 2026

Copy link
Copy Markdown
Owner

Requested by Rui

Summary

Makes the running version visible in two places:

  • Right-click menu: the first item is a greyed-out "StatsOverlay v0.3.0", followed by a separator. The version comes from env!("CARGO_PKG_VERSION"). The hover panel is unchanged.
  • Explorer > Properties > Details: build.rs now adds a VERSIONINFO resource built from Cargo.toml's version, with FileVersion, ProductVersion, ProductName, FileDescription and OriginalFilename.
    • MSVC: build.rs writes a small .res file and passes it to the linker, next to the embedded manifest.
    • GNU: the same block is appended to a copy of app.rc for windres.
    • No new build dependencies.

Tested

  • fmt passes, and clippy with -D warnings passes with and without default features.
  • Tests pass.
  • Built with MSVC, the exe reports:
    • FileVersion and ProductVersion: 0.3.0 (raw 0.3.0.0)
    • ProductName: StatsOverlay
    • FileDescription: StatsOverlay taskbar resource monitor
    • Explorer shows the same values.
  • The manifest resource is still present, so per-monitor DPI and the Windows 8+ compatibility entry are unchanged.
  • The menu shows "StatsOverlay v0.3.0" greyed at the top.
  • Not tested: the GNU (windres) path. No MinGW toolchain was available on the dev PC.

🤖 Generated with Claude Code

- The right-click menu starts with a greyed "StatsOverlay v0.3.0" (from
  CARGO_PKG_VERSION) and a separator.
- build.rs adds a VERSIONINFO resource built from Cargo.toml's version
  (FileVersion, ProductVersion, ProductName, FileDescription,
  OriginalFilename), so Explorer's Properties > Details shows it. MSVC: a
  .res file written by build.rs and passed to the linker, next to the
  embedded manifest. GNU: the same block appended to app.rc for windres. No
  new build dependencies.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@ruia
ruia merged commit ab7758c into main Oct 23, 2026
1 check passed
@ruia
ruia deleted the app-version branch October 23, 2026 14:22
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