From c08b1f3391dae9144ed4b7663f08991f65531729 Mon Sep 17 00:00:00 2001 From: Devin Binnie <52460000+devinbinnie@users.noreply.github.com> Date: Wed, 4 Dec 2024 11:32:29 -0500 Subject: [PATCH] [MM-61994] Fix UpgradeCode to use the old one, allow MSI to uninstall both (#3237) Co-authored-by: Devin Binnie --- electron-builder.json | 3 ++- patches/app-builder-lib+24.13.3.patch | 21 ++++++++++++++++----- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/electron-builder.json b/electron-builder.json index 228c8f68..078ae887 100644 --- a/electron-builder.json +++ b/electron-builder.json @@ -181,7 +181,8 @@ "include": "scripts/installer.nsh" }, "msi": { - "additionalWixArgs": ["-ext", "WixUtilExtension"] + "additionalWixArgs": ["-ext", "WixUtilExtension"], + "upgradeCode": "{8523DAF0-699D-4CC7-9A65-C5E696A9DE6D}" }, "rpm": { "fpm": ["--rpm-rpmbuild-define", "_build_id_links none", "--rpm-digest=sha256"] diff --git a/patches/app-builder-lib+24.13.3.patch b/patches/app-builder-lib+24.13.3.patch index 6eb18929..ffed5727 100644 --- a/patches/app-builder-lib+24.13.3.patch +++ b/patches/app-builder-lib+24.13.3.patch @@ -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 -index 2d5cd3c..92a0556 100644 +index 2d5cd3c..0ce1b74 100644 --- a/node_modules/app-builder-lib/templates/msi/template.xml +++ b/node_modules/app-builder-lib/templates/msi/template.xml @@ -1,5 +1,8 @@ @@ -12,7 +12,18 @@ index 2d5cd3c..92a0556 100644 -@@ -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. + --> ++ ++ ++ ++ + + + +@@ -26,6 +33,27 @@ {{ } -}} @@ -40,7 +51,7 @@ index 2d5cd3c..92a0556 100644 {{ if (isRunAfterFinish) { }} {{ if (!isAssisted) { }} -@@ -42,6 +66,7 @@ +@@ -42,6 +70,7 @@ {{ } -}} @@ -48,7 +59,7 @@ index 2d5cd3c..92a0556 100644 {{ if (isAssisted) { }} -@@ -80,6 +105,7 @@ +@@ -80,6 +109,7 @@ {{ } -}} @@ -56,7 +67,7 @@ index 2d5cd3c..92a0556 100644 {{ if (menuCategory) { }} -@@ -110,6 +136,10 @@ +@@ -110,6 +140,10 @@ {{-dirs}}