From c6c011f2358fadecdabe104d0d556817c7acfb4e Mon Sep 17 00:00:00 2001 From: Micah Lee Date: Tue, 22 Jun 2021 11:51:35 -0700 Subject: [PATCH] Change Wix config to allow upgrades --- install/windows/build-wxs.py | 25 ++++--------------------- 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/install/windows/build-wxs.py b/install/windows/build-wxs.py index 1ad211e..8c0d410 100644 --- a/install/windows/build-wxs.py +++ b/install/windows/build-wxs.py @@ -154,7 +154,7 @@ def main(): "Product", Name="Dangerzone", Manufacturer="First Look Media", - Id="f40ff0a9-ebf8-4e1e-9bce-6ab5c74fe119", + Id="*", UpgradeCode="$(var.ProductUpgradeCode)", Language="1033", Codepage="1252", @@ -203,29 +203,12 @@ def main(): Id="WixUIDialogBmp", Value="..\\..\\install\\windows\\dialog.bmp", ) - upgrade_el = ET.SubElement(product_el, "Upgrade", Id="$(var.ProductUpgradeCode)") ET.SubElement( - upgrade_el, - "UpgradeVersion", - Minimum="$(var.ProductVersion)", - OnlyDetect="yes", - Property="NEWERVERSIONDETECTED", - ) - ET.SubElement( - upgrade_el, - "UpgradeVersion", - Minimum="0.0.0", - Maximum="$(var.ProductVersion)", - IncludeMinimum="yes", - IncludeMaximum="no", - Property="OLDERVERSIONBEINGUPGRADED", - ) - condition_el = ET.SubElement( product_el, - "Condition", - Message="A newer version of this software is already installed.", + "MajorUpgrade", + AllowSameVersionUpgrades="yes", + DowngradeErrorMessage="A newer version of [ProductName] is already installed. If you are sure you want to downgrade, remove the existing installation via Programs and Features.", ) - condition_el.text = "NOT NEWERVERSIONDETECTED" build_dir_xml(product_el, data) component_ids = build_components_xml(product_el, data)