Repository navigation
Fix NSIS VIProductVersion for pre-release versions - #3
Merged
Merged
Conversation
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>
There was a problem hiding this comment.
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_versioninrelease.ymlby stripping any pre-release/build suffix and padding to 4 numeric parts, then passes it to NSIS via/DVIVERSION. - Updates
installer.nsito use${VIVERSION}forVIProductVersion, with a safe0.0.0.0fallback 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The first pre-release tag
v0.1.0-alpha.1failed inbuild-windows:installer.nsiusedVIProductVersion "${VERSION}.0", which only yields a validnumeric quad for plain
X.Y.Ztags. A semver pre-release (0.1.0-alpha.1)produces
0.1.0-alpha.1.0, whichmakensisrejects.Fix: derive a clean numeric
vi_versioninrelease.yml(strip-/+suffix,pad to four parts) and pass it as
/DVIVERSION;installer.nsiusesVIVERSIONwith a
0.0.0.0fallback for local compiles. The human-readableVERSIONisunchanged for filenames and the string version fields.
🤖 Generated with Claude Code