Skip to content

Fix NSIS VIProductVersion for pre-release versions - #3

Merged
devnull03 merged 1 commit into
mainfrom
fix-nsis-viproductversion
Jun 7, 2026
Merged

devnull03 merged 1 commit into
mainfrom
fix-nsis-viproductversion

Conversation

@devnull03

Copy link
Copy Markdown
Owner

The first pre-release tag v0.1.0-alpha.1 failed in build-windows:

Error: invalid VIProductVersion format, should be X.X.X.X

installer.nsi used VIProductVersion "${VERSION}.0", which only yields a valid
numeric quad for plain X.Y.Z tags. A semver pre-release (0.1.0-alpha.1)
produces 0.1.0-alpha.1.0, which makensis rejects.

Fix: derive a clean numeric vi_version in release.yml (strip -/+ suffix,
pad to four parts) and pass it as /DVIVERSION; installer.nsi uses VIVERSION
with a 0.0.0.0 fallback for local compiles. The human-readable VERSION is
unchanged for filenames and the string version fields.

🤖 Generated with Claude Code

makensis requires VIProductVersion to be a strict numeric X.X.X.X, but the script appended .0 to the raw VERSION, which breaks for semver pre-releases (e.g. 0.1.0-alpha.1 -> 0.1.0-alpha.1.0). Derive a clean numeric vi_version in release.yml (strip -suffix, pad to 4) and pass it as /DVIVERSION; installer.nsi now uses VIVERSION with a 0.0.0.0 fallback.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 7, 2026 11:51
@devnull03
devnull03 merged commit 5be968b into main Jun 7, 2026
3 checks passed
@devnull03
devnull03 deleted the fix-nsis-viproductversion branch June 7, 2026 11:52

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes Windows NSIS installer builds for semver pre-release tags (e.g. v0.1.0-alpha.1) by ensuring VIProductVersion always receives a strict numeric quad (X.X.X.X) that makensis accepts, while keeping the human-readable version string unchanged for filenames and other version metadata.

Changes:

  • Derives a clean numeric vi_version in release.yml by stripping any pre-release/build suffix and padding to 4 numeric parts, then passes it to NSIS via /DVIVERSION.
  • Updates installer.nsi to use ${VIVERSION} for VIProductVersion, with a safe 0.0.0.0 fallback for local/manual compiles.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
scripts/installer.nsi Switches VIProductVersion to use a dedicated numeric VIVERSION define (with fallback) instead of ${VERSION}.0.
.github/workflows/release.yml Computes and exports vi_version, then passes it into makensis as /DVIVERSION=... during build-windows.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

2 participants