Skip to content

feat(version): stamp the binaries so the build is identifiable#39

Merged
mkpoli merged 1 commit into
masterfrom
chore/binary-version
Jun 27, 2026
Merged

feat(version): stamp the binaries so the build is identifiable#39
mkpoli merged 1 commit into
masterfrom
chore/binary-version

Conversation

@mkpoli

@mkpoli mkpoli commented Jun 27, 2026

Copy link
Copy Markdown
Owner

Fixes "no way to confirm the version of each binary." Nothing reported a version: Cargo.toml said 0.2.1, the DLL had no VERSIONINFO, and the settings dialog showed no version.

  • Cargo.toml → 0.3.3 (single source of truth).
  • DLL VERSIONINFObuild.rs generates + embeds a version resource from CARGO_PKG_VERSION, so Explorer → Properties → Details shows File/Product version. Validated locally with llvm-rc (compiles to a valid .res with the version strings). Same non-MSVC no-op path as the existing icon embed.
  • Settings dialog title now reads ainuKey vX.Y.Z — 設定 / Settings, so opening Settings confirms the running build.
  • Installer.iss sets VersionInfoVersion, so setup.exe carries the version in its Properties.

All three derive from the version and agree when Cargo.toml is bumped with the tag. Clippy -D warnings clean; cross-link green.

Goes into v0.3.3 alongside the already-merged Start-menu settings fix (#31).

Summary by CodeRabbit

  • New Features

    • The app and installer now display version information in Windows file properties and product details.
    • The settings window title now includes the current app version for easier identification.
  • Chores

    • Updated the bundled crate version to the latest release.

Until now nothing reported a version: Cargo.toml said 0.2.1, the DLL had no
VERSIONINFO, and the settings dialog showed no version — so there was no way to
confirm which build was installed.

- Cargo.toml bumped to 0.3.3 (single source of truth).
- build.rs embeds a Windows VERSIONINFO resource in ainukey.dll from
  CARGO_PKG_VERSION, so Explorer → Properties → Details shows File/Product
  version (validated with llvm-rc). Same no-op-on-non-MSVC path as the icon embed.
- settings dialog title now reads 'ainuKey vX.Y.Z — 設定 / Settings'.
- installer .iss sets VersionInfoVersion so setup.exe carries the version too.

All three (DLL, installer, dialog) derive from the version, so they agree when
Cargo.toml is bumped with the release tag.
@coderabbitai

coderabbitai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: c22ff12a-b896-4c31-89f2-22970482486d

📥 Commits

Reviewing files that changed from the base of the PR and between dea9b55 and 5b211d4.

📒 Files selected for processing (4)
  • Cargo.toml
  • build.rs
  • installer/ainuKey.iss
  • src/settings_dialog.rs

📝 Walkthrough

Walkthrough

The PR bumps the crate version and propagates that version into the generated Windows resource, installer metadata, and settings dialog title.

Changes

Version stamping

Layer / File(s) Summary
Package version and Windows resource metadata
Cargo.toml, build.rs, installer/ainuKey.iss
Cargo.toml sets the crate version to 0.3.3, build.rs generates and embeds a version.rc VERSIONINFO resource from CARGO_PKG_VERSION, and the installer sets VersionInfoVersion from MyAppVersion.
Settings dialog title version
src/settings_dialog.rs
show formats the dialog title with CARGO_PKG_VERSION, converts it to UTF-16, and passes it to CreateWindowExW.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hop through versions, bright and neat,
With window titles that now repeat.
A DLL sings its version tune,
And setup shines like a proper moon.
Bink! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/binary-version

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mkpoli mkpoli merged commit 25a0172 into master Jun 27, 2026
2 of 3 checks 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.

1 participant