[MM-61994] Fix UpgradeCode to use the old one, allow MSI to uninstall both (#3237)
Co-authored-by: Devin Binnie <devin@sourcestorm.net>
This commit is contained in:
@@ -181,7 +181,8 @@
|
|||||||
"include": "scripts/installer.nsh"
|
"include": "scripts/installer.nsh"
|
||||||
},
|
},
|
||||||
"msi": {
|
"msi": {
|
||||||
"additionalWixArgs": ["-ext", "WixUtilExtension"]
|
"additionalWixArgs": ["-ext", "WixUtilExtension"],
|
||||||
|
"upgradeCode": "{8523DAF0-699D-4CC7-9A65-C5E696A9DE6D}"
|
||||||
},
|
},
|
||||||
"rpm": {
|
"rpm": {
|
||||||
"fpm": ["--rpm-rpmbuild-define", "_build_id_links none", "--rpm-digest=sha256"]
|
"fpm": ["--rpm-rpmbuild-define", "_build_id_links none", "--rpm-digest=sha256"]
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/node_modules/app-builder-lib/templates/msi/template.xml b/node_modules/app-builder-lib/templates/msi/template.xml
|
diff --git a/node_modules/app-builder-lib/templates/msi/template.xml b/node_modules/app-builder-lib/templates/msi/template.xml
|
||||||
index 2d5cd3c..92a0556 100644
|
index 2d5cd3c..0ce1b74 100644
|
||||||
--- a/node_modules/app-builder-lib/templates/msi/template.xml
|
--- a/node_modules/app-builder-lib/templates/msi/template.xml
|
||||||
+++ b/node_modules/app-builder-lib/templates/msi/template.xml
|
+++ b/node_modules/app-builder-lib/templates/msi/template.xml
|
||||||
@@ -1,5 +1,8 @@
|
@@ -1,5 +1,8 @@
|
||||||
@@ -12,7 +12,18 @@ index 2d5cd3c..92a0556 100644
|
|||||||
<!-- https://blogs.msdn.microsoft.com/gremlininthemachine/2006/12/05/msi-wix-and-unicode/ -->
|
<!-- https://blogs.msdn.microsoft.com/gremlininthemachine/2006/12/05/msi-wix-and-unicode/ -->
|
||||||
<Product Id="*" Name="${productName}" UpgradeCode="${upgradeCode}" Version="${version}" Language="1033" Codepage="65001" Manufacturer="${manufacturer}">
|
<Product Id="*" Name="${productName}" UpgradeCode="${upgradeCode}" Version="${version}" Language="1033" Codepage="65001" Manufacturer="${manufacturer}">
|
||||||
<Package Compressed="yes" InstallerVersion="500"/>
|
<Package Compressed="yes" InstallerVersion="500"/>
|
||||||
@@ -26,6 +29,27 @@
|
@@ -13,6 +16,10 @@
|
||||||
|
|
||||||
|
So, AllowSameVersionUpgrades="yes" allows to build and test MSI with the same version, and previously installed app will be removed.
|
||||||
|
-->
|
||||||
|
+ <!-- Remove versions of newer MSI using the wrong UpgradeCode -->
|
||||||
|
+ <Upgrade Id="{0F183CAA-DF79-5400-A71F-684F563AF31C}">
|
||||||
|
+ <UpgradeVersion Property="PREVMSIINSTALLER" IncludeMaximum="yes" Maximum="${version}" MigrateFeatures="yes" OnlyDetect="no"/>
|
||||||
|
+ </Upgrade>
|
||||||
|
<MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage='A newer version of "[ProductName]" is already installed.'/>
|
||||||
|
<MediaTemplate CompressionLevel="${compressionLevel}" EmbedCab="yes"/>
|
||||||
|
|
||||||
|
@@ -26,6 +33,27 @@
|
||||||
<Property Id="ARPPRODUCTICON" Value="${iconId}"/>
|
<Property Id="ARPPRODUCTICON" Value="${iconId}"/>
|
||||||
{{ } -}}
|
{{ } -}}
|
||||||
|
|
||||||
@@ -40,7 +51,7 @@ index 2d5cd3c..92a0556 100644
|
|||||||
{{ if (isRunAfterFinish) { }}
|
{{ if (isRunAfterFinish) { }}
|
||||||
<CustomAction Id="runAfterFinish" FileKey="mainExecutable" ExeCommand="" Execute="immediate" Impersonate="yes" Return="asyncNoWait"/>
|
<CustomAction Id="runAfterFinish" FileKey="mainExecutable" ExeCommand="" Execute="immediate" Impersonate="yes" Return="asyncNoWait"/>
|
||||||
{{ if (!isAssisted) { }}
|
{{ if (!isAssisted) { }}
|
||||||
@@ -42,6 +66,7 @@
|
@@ -42,6 +70,7 @@
|
||||||
<Property Id="ALLUSERS" Secure="yes" Value="2"/>
|
<Property Id="ALLUSERS" Secure="yes" Value="2"/>
|
||||||
{{ } -}}
|
{{ } -}}
|
||||||
<Property Id="MSIINSTALLPERUSER" Secure="yes" Value="1"/>
|
<Property Id="MSIINSTALLPERUSER" Secure="yes" Value="1"/>
|
||||||
@@ -48,7 +59,7 @@ index 2d5cd3c..92a0556 100644
|
|||||||
|
|
||||||
{{ if (isAssisted) { }}
|
{{ if (isAssisted) { }}
|
||||||
<WixVariable Id="WixUISupportPerUser" Value="1" Overridable="yes"/>
|
<WixVariable Id="WixUISupportPerUser" Value="1" Overridable="yes"/>
|
||||||
@@ -80,6 +105,7 @@
|
@@ -80,6 +109,7 @@
|
||||||
</UI>
|
</UI>
|
||||||
{{ } -}}
|
{{ } -}}
|
||||||
|
|
||||||
@@ -56,7 +67,7 @@ index 2d5cd3c..92a0556 100644
|
|||||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||||
<Directory Id="${programFilesId}">
|
<Directory Id="${programFilesId}">
|
||||||
{{ if (menuCategory) { }}
|
{{ if (menuCategory) { }}
|
||||||
@@ -110,6 +136,10 @@
|
@@ -110,6 +140,10 @@
|
||||||
{{-dirs}}
|
{{-dirs}}
|
||||||
|
|
||||||
<ComponentGroup Id="ProductComponents" Directory="APPLICATIONFOLDER">
|
<ComponentGroup Id="ProductComponents" Directory="APPLICATIONFOLDER">
|
||||||
|
Reference in New Issue
Block a user