Skip to content

fix: Give each Windows installer a unique MSI version - #7788

Merged
Vest merged 1 commit into
PCGen:masterfrom
Vest:fix/windows-jpackage-upgrades
Nov 9, 2026
Merged

Vest merged 1 commit into
PCGen:masterfrom
Vest:fix/windows-jpackage-upgrades

Conversation

@Vest

@Vest Vest commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

Problem

Some users can't install PCGen with the Windows installer. Windows logs:

  • "Windows Installer reconfigured the product. Product Name: pcgen. Product Version: 6.09.08. … Reconfiguration success or error status: 1638."
  • "Product: pcgen -- Configuration failed."

Error 1638 means another version of this product is already installed.

Cause

The installer's internal version was the PCGen version with its suffix stripped, so RCs, nightlies and rebuilds of 6.09.08 all became 6.09.08. jpackage (JDK 25) derives the installer's product code from vendor, name and version. Different installers therefore shared one identity, and Windows treated a new installer as reconfiguring the one already installed.

Fix

  • The Windows installer version is now major.minor.<windowsBuildNumber>, e.g. 6.9.27927. Windows Installer only compares these three numbers.
  • The nightly and release workflows pass git rev-list --count HEAD as windowsBuildNumber. Their build checkouts now fetch the full history so the count is correct.
  • Local builds without the parameter use 0.
  • The full PCGen version (e.g. PCGen 6.09.08.RC1) is kept in the installer description, so builds can still be matched.

Testing

  • Checked the Gradle configuration: a local build gives 6.9.0, and with the commit count it gives 6.9.27927. The jpackage tasks still configure.
  • Not tested yet: building a real installer, upgrading an existing install, and running the workflows on GitHub.

Notes

  • Users who already hit error 1638 need to uninstall PCGen once (Settings → Apps), then install the new version.
  • Manufacturer still shows "Unknown". Setting a vendor would change the identity Windows uses to recognise earlier installs, so it's left unchanged.
  • Rewriting master history (e.g. a squashed force-push) could lower the commit count.

MSI compares only major.minor.build, and the sanitized app version collapsed RC, nightly, and rebuilt installers to the same 6.09.08, causing error 1638. Use the git commit count, passed by release workflows, as the build field (0 for local builds) and keep the full version in the installer description.
@Vest Vest self-assigned this Nov 9, 2026
@Vest Vest added the bug label Nov 9, 2026
@Vest
Vest merged commit e1f0ca4 into PCGen:master Nov 9, 2026
4 checks passed
@Vest
Vest deleted the fix/windows-jpackage-upgrades branch November 9, 2026 10:54
@github-actions

github-actions Bot commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

🚧 PCGen Code Coverage

Overall Project 28.05% ❌

There is no coverage information present for the Files changed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant