Skip to content

Fix MSI installer to ensure proper version replacement and cleanup#16

Merged
Malcolmnixon merged 3 commits into
mainfrom
fix/msi-upgrade-version-collision
Jul 21, 2026
Merged

Fix MSI installer to ensure proper version replacement and cleanup#16
Malcolmnixon merged 3 commits into
mainfrom
fix/msi-upgrade-version-collision

Conversation

@Malcolmnixon

Copy link
Copy Markdown
Member

This pull request updates the Windows installer for SysML2 Workbench to improve upgrade behavior, user experience, and reliability. The changes ensure that any version of the installer (older, same, or newer) will always replace the currently installed version, prevent installation failures if the app is running, and enhance the information shown in Add/Remove Programs. The most important changes are grouped below:

Installer upgrade and versioning behavior:

  • Changed the MajorUpgrade element in Package.wxs to use AllowDowngrades="yes", ensuring that installing any version always replaces the current installation, including downgrades and same-version upgrades.
  • Suppressed ICE61 warnings in the WiX project file (.wixproj) since the lack of a maximum version in the Upgrade table is intentional with AllowDowngrades="yes".
  • Added comments in the build workflow to clarify that MSI version numbers are truncated to three numeric fields, and why this is safe given the installer’s upgrade logic.

Installer reliability and user experience:

  • Added the WixToolset.Util.wixext package and used the util:CloseApplication action in Package.wxs to automatically close a running instance of SysML2 Workbench before installation or upgrade, preventing failures due to open files. [1] [2] [3]
  • Improved Add/Remove Programs integration in Package.wxs by setting icon, support/about links, contact information, and hiding non-functional "Modify" and "Repair" options since there is no UI for them.

Malcolm Nixon and others added 3 commits July 21, 2026 17:12
Installing SysML2Workbench previously only replaced strictly-older
versions and could leave two side-by-side Add/Remove Programs entries
when a prerelease and its stable release computed to the identical
MSI ProductVersion (build.yaml truncated the SemVer prerelease suffix
naively). Fixes both problems:

- build.yaml: compute the MSI build field as patch*1000 +
  prerelease-number, reserving 999 for stable releases, so every
  prerelease/patch/stable combination gets a distinct, monotonically
  increasing MSI version and never collides.
- Package.wxs: MajorUpgrade now uses AllowDowngrades="yes" so
  installing SysML2Workbench always replaces whatever version is
  already present - older, same, or newer - rather than ever
  refusing to install.
- Installer.wixproj: suppress ICE61, a known false positive for
  AllowDowngrades (it expects an Upgrade table Maximum version, which
  AllowDowngrades intentionally omits).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Package.wxs: add util:CloseApplication so a running SysML2 Workbench
  is closed (gracefully, then forcibly after a short timeout) before
  install/upgrade replaces its files, instead of the upgrade failing
  or silently leaving stale files in use.
- Package.wxs: set ARPHELPLINK/ARPURLINFOABOUT to the project's GitHub
  page and ARPCONTACT to DEMA Consulting, so Add/Remove Programs shows
  useful support/about links instead of nothing.
- Package.wxs: set ARPNOMODIFY/ARPNOREPAIR since there is no WixUI
  dialog sequence to drive those buttons - hide them rather than offer
  non-functional options.
- Installer.wixproj: reference WixToolset.Util.wixext for the
  CloseApplication element.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The patch*1000+prerelease-number/999-sentinel encoding was solving a
version-collision bug that AllowDowngrades="yes" (added in the
previous commit) already makes irrelevant - that setting replaces
whatever version is installed regardless of number comparison, so
two builds truncating to the same MSI version is no longer a
problem. Worse, the encoding produced nonsensical Add/Remove Programs
version numbers (e.g. stable 0.1.1 would show as 0.1.1999), so it's
not worth keeping even for display purposes. Reverting to the simple
truncation that was there before.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Malcolmnixon
Malcolmnixon merged commit 741e1b9 into main Jul 21, 2026
6 checks passed
@Malcolmnixon
Malcolmnixon deleted the fix/msi-upgrade-version-collision branch July 21, 2026 21:54
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