Fix MSI installer to ensure proper version replacement and cleanup#16
Merged
Conversation
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>
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.
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:
MajorUpgradeelement inPackage.wxsto useAllowDowngrades="yes", ensuring that installing any version always replaces the current installation, including downgrades and same-version upgrades..wixproj) since the lack of a maximum version in the Upgrade table is intentional withAllowDowngrades="yes".Installer reliability and user experience:
WixToolset.Util.wixextpackage and used theutil:CloseApplicationaction inPackage.wxsto automatically close a running instance of SysML2 Workbench before installation or upgrade, preventing failures due to open files. [1] [2] [3]Package.wxsby setting icon, support/about links, contact information, and hiding non-functional "Modify" and "Repair" options since there is no UI for them.