This changes the REINSTALLMODE [1] from the default omus to amus. this isn't recommended [2] but CMAKE [3] has been doing it for 6 years now without issues, so it will probably be fine? [1] https://learn.microsoft.com/en-us/windows/win32/msi/reinstallmode [2] https://stackoverflow.com/a/71225056/1938798 [3] https://github.com/Kitware/CMake/blame/master/Utilities/Release/WiX/WIX.template.in#L28 Pull Request: https://projects.blender.org/blender/blender/pulls/137668
84 lines
3.7 KiB
XML
84 lines
3.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<?include "cpack_variables.wxi"?>
|
|
|
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
|
|
RequiredVersion="3.6.3303.0">
|
|
|
|
<Product Id="$(var.CPACK_WIX_PRODUCT_GUID)"
|
|
Name="$(var.CPACK_PACKAGE_NAME)"
|
|
Language="1033"
|
|
Version="$(var.CPACK_PACKAGE_VERSION)"
|
|
Manufacturer="$(var.CPACK_PACKAGE_VENDOR)"
|
|
UpgradeCode="$(var.CPACK_WIX_UPGRADE_GUID)">
|
|
|
|
<Package InstallerVersion="301" Compressed="yes"/>
|
|
|
|
<Media Id="1" Cabinet="media1.cab" EmbedCab="yes"/>
|
|
<Condition Message="This application is only supported on Windows 8.1, Windows Server 2016, or higher.">
|
|
<![CDATA[Installed OR (VersionNT >= 603)]]>
|
|
</Condition>
|
|
<MajorUpgrade
|
|
Schedule="afterInstallInitialize"
|
|
AllowSameVersionUpgrades="yes"
|
|
DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/>
|
|
|
|
<WixVariable Id="WixUILicenseRtf" Value="$(var.CPACK_WIX_LICENSE_RTF)"/>
|
|
<Property Id="WIXUI_INSTALLDIR" Value="INSTALL_ROOT"/>
|
|
|
|
<?ifdef CPACK_WIX_PRODUCT_ICON?>
|
|
<Property Id="ARPPRODUCTICON">ProductIcon.ico</Property>
|
|
<Icon Id="ProductIcon.ico" SourceFile="$(var.CPACK_WIX_PRODUCT_ICON)"/>
|
|
<?endif?>
|
|
|
|
<?ifdef CPACK_WIX_UI_BANNER?>
|
|
<WixVariable Id="WixUIBannerBmp" Value="$(var.CPACK_WIX_UI_BANNER)"/>
|
|
<?endif?>
|
|
|
|
<?ifdef CPACK_WIX_UI_DIALOG?>
|
|
<WixVariable Id="WixUIDialogBmp" Value="$(var.CPACK_WIX_UI_DIALOG)"/>
|
|
<?endif?>
|
|
|
|
<FeatureRef Id="ProductFeature"/>
|
|
|
|
<UIRef Id="$(var.CPACK_WIX_UI_REF)" />
|
|
|
|
<?include "properties.wxi"?>
|
|
<UI>
|
|
<Publish Dialog="ExitDialog"
|
|
Control="Finish"
|
|
Event="DoAction"
|
|
Value="LaunchBrowser">WIXUI_EXITDIALOGOPTIONALCHECKBOX = 1 and NOT Installed</Publish>
|
|
<ProgressText Action="RegisterBlender">Registering Blender</ProgressText>
|
|
</UI>
|
|
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOXTEXT" Value="Learn how to support Blender" />
|
|
<Property Id="WIXUI_EXITDIALOGOPTIONALCHECKBOX" Value="1" />
|
|
<SetProperty Id="REINSTALLMODE" Value="amus" Before="FindRelatedProducts" Sequence="first">NOT REINSTALLMODE</SetProperty>
|
|
|
|
<UIRef Id="WixUI_ErrorProgressText" />
|
|
<CustomAction Id="LaunchBrowser"
|
|
ExeCommand="explorer.exe "https://fund.blender.org/?utm_source=blender-$(var.CPACK_PACKAGE_VERSION)-installer-msi""
|
|
Directory="INSTALL_ROOT"
|
|
Return="asyncNoWait" >
|
|
REMOVE="ALL"
|
|
</CustomAction>
|
|
<CustomAction Id="RegisterBlender"
|
|
Impersonate="no"
|
|
Execute="deferred"
|
|
FileKey="CM_FP_Blender.blender_launcher.exe"
|
|
ExeCommand="--register-allusers"
|
|
Return="ignore" />
|
|
<CustomAction Id="UnRegisterBlender"
|
|
Impersonate="no"
|
|
Execute="deferred"
|
|
FileKey="CM_FP_Blender.blender_launcher.exe"
|
|
ExeCommand="--unregister-allusers"
|
|
Return="ignore" />
|
|
<InstallExecuteSequence>
|
|
<Custom Action="RegisterBlender" After="InstallFiles" />
|
|
<!-- https://stackoverflow.com/questions/320921/how-to-add-a-wix-custom-action-that-happens-only-on-uninstall-via-msi -->
|
|
<Custom Action="UnRegisterBlender" Before="RemoveFiles">(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")</Custom>
|
|
</InstallExecuteSequence>
|
|
</Product>
|
|
</Wix>
|