Compare commits

..

2 commits

Author SHA1 Message Date
jkarasti
d531dbb7e8
Merge e6380f793b into 1d2a91e8c5 2024-11-22 17:59:29 +00:00
jkarasti
e6380f793b Fix: Dangerzone installed using an msi built with WiX Toolset v3 is not uninstalled by an msi built with WiX Toolset v5
Workaround for an issue after upgrading from WiX Toolset v3 to v5 where the previous
version of Dangerzone is not uninstalled during the upgrade by checking if the older installation
exists in "C:\Program Files (x86)\Dangerzone".

Also handle a special case for Dangerzone 0.8.0 which allows choosing the install location
during install by checking if the registry key for it exists.

Note that this seems to allow installing Dangerzone 0.8.0 after installing Dangerzone from this branch.
In this case the installer errors until Dangerzone 0.8.0 is uninstalled again
2024-11-22 19:52:30 +02:00

View file

@ -152,6 +152,10 @@ def main():
Id="ARPURLINFOABOUT",
Value="https://freedom.press",
)
ET.SubElement(
package_el, "ui:WixUI", Id="WixUI_InstallDir", InstallDirectory="INSTALLFOLDER"
)
ET.SubElement(package_el, "UIRef", Id="WixUI_ErrorProgressText")
ET.SubElement(
package_el,
"WixVariable",
@ -170,13 +174,6 @@ def main():
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.",
)
# Add The UI element
ui_el = ET.SubElement(package_el, "UI")
ET.SubElement(
ui_el, "ui:WixUI", Id="WixUI_InstallDir", InstallDirectory="INSTALLFOLDER"
)
ET.SubElement(ui_el, "UIRef", Id="WixUI_ErrorProgressText")
# Workaround for an issue after upgrading from WiX Toolset v3 to v5 where the previous
# version of Dangerzone is not uninstalled during the upgrade by checking if the older installation
# exists in "C:\Program Files (x86)\Dangerzone".