- Added macros for uninstalling previous Farm Control installations in the NSIS installer. - Updated the MSI wrapped configuration to include custom actions for handling previous installations. - Improved the Electron navigation by modifying CSS classes for better drag-and-drop functionality. - Enhanced build scripts to include the WixUtilExtension for improved MSI packaging.
112 lines
3.8 KiB
XML
112 lines
3.8 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
|
<Product
|
|
Id="__PRODUCT_ID__"
|
|
Name="Farm Control"
|
|
Language="1033"
|
|
Version="__VERSION__"
|
|
Manufacturer="Tom Butcher"
|
|
UpgradeCode="__UPGRADE_CODE__">
|
|
<Package
|
|
InstallerVersion="500"
|
|
Compressed="yes"
|
|
InstallScope="perMachine"
|
|
Platform="x64" />
|
|
|
|
<Condition Message="Windows 7 and above is required"><![CDATA[Installed OR VersionNT >= 601]]></Condition>
|
|
|
|
<MajorUpgrade
|
|
AllowSameVersionUpgrades="yes"
|
|
DowngradeErrorMessage="A newer version of [ProductName] is already installed." />
|
|
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
|
|
|
|
<Property Id="DISABLEADVTSHORTCUTS" Value="1" />
|
|
<Property Id="MSIINSTALLPERUSER" Value="1" />
|
|
|
|
<Property Id="PREVIOUS_UNINSTALL_CMD">
|
|
<RegistrySearch
|
|
Id="PreviousUninstallCmdSearch"
|
|
Root="HKLM"
|
|
Key="Software\Microsoft\Windows\CurrentVersion\Uninstall\Farm Control"
|
|
Name="UninstallString"
|
|
Type="raw" />
|
|
</Property>
|
|
|
|
<Property Id="PREVIOUS_INSTALL_DIR">
|
|
<RegistrySearch
|
|
Id="PreviousInstallDirSearch"
|
|
Root="HKLM"
|
|
Key="Software\Tom Butcher\Farm Control"
|
|
Name="InstallDir"
|
|
Type="directory" />
|
|
</Property>
|
|
|
|
<Binary Id="WrappedExe" SourceFile="__SETUP_EXE__" />
|
|
|
|
<CustomAction
|
|
Id="KillFarmControl"
|
|
BinaryKey="WixCA"
|
|
DllEntry="WixQuietExec"
|
|
Execute="deferred"
|
|
Impersonate="no"
|
|
Return="ignore" />
|
|
|
|
<CustomAction
|
|
Id="UninstallPrevious"
|
|
BinaryKey="WixCA"
|
|
DllEntry="WixQuietExec"
|
|
Execute="deferred"
|
|
Impersonate="no"
|
|
Return="ignore" />
|
|
|
|
<CustomAction
|
|
Id="RunInstaller"
|
|
BinaryKey="WrappedExe"
|
|
ExeCommand="/S"
|
|
Execute="deferred"
|
|
Impersonate="no"
|
|
Return="check" />
|
|
|
|
<Directory Id="TARGETDIR" Name="SourceDir">
|
|
<Directory Id="TempFolder" Name="Temp">
|
|
<Component Id="EmptyComponent" Guid="8A3F2E1D-9C4B-4A7E-B6D5-1F0E3C2B4A59">
|
|
<CreateFolder />
|
|
</Component>
|
|
</Directory>
|
|
</Directory>
|
|
|
|
<Feature Id="EmptyFeature" Level="0">
|
|
<ComponentRef Id="EmptyComponent" />
|
|
</Feature>
|
|
|
|
<CustomAction
|
|
Id="SetKillFarmControl"
|
|
Property="QtKillFarmControl"
|
|
Value="taskkill.exe /F /IM launcher.exe /T"
|
|
Execute="immediate" />
|
|
|
|
<CustomAction
|
|
Id="SetUninstallPreviousFromRegistry"
|
|
Property="QtUninstallPrevious"
|
|
Value=""[PREVIOUS_UNINSTALL_CMD]" /S"
|
|
Execute="immediate" />
|
|
|
|
<CustomAction
|
|
Id="SetUninstallPreviousFromInstallDir"
|
|
Property="QtUninstallPrevious"
|
|
Value=""[PREVIOUS_INSTALL_DIR]Uninstall.exe" /S"
|
|
Execute="immediate" />
|
|
|
|
<InstallExecuteSequence>
|
|
<Custom Action="SetKillFarmControl" Before="KillFarmControl">NOT Installed</Custom>
|
|
<Custom Action="KillFarmControl" After="SetKillFarmControl">NOT Installed</Custom>
|
|
<Custom Action="SetUninstallPreviousFromRegistry" After="KillFarmControl">NOT Installed AND PREVIOUS_UNINSTALL_CMD</Custom>
|
|
<Custom Action="SetUninstallPreviousFromInstallDir" After="KillFarmControl">NOT Installed AND NOT PREVIOUS_UNINSTALL_CMD AND PREVIOUS_INSTALL_DIR</Custom>
|
|
<Custom Action="UninstallPrevious" After="SetUninstallPreviousFromRegistry">NOT Installed AND (PREVIOUS_UNINSTALL_CMD OR PREVIOUS_INSTALL_DIR)</Custom>
|
|
<Custom Action="UninstallPrevious" After="SetUninstallPreviousFromInstallDir">NOT Installed AND (PREVIOUS_UNINSTALL_CMD OR PREVIOUS_INSTALL_DIR)</Custom>
|
|
<Custom Action="RunInstaller" After="UninstallPrevious">NOT Installed AND (PREVIOUS_UNINSTALL_CMD OR PREVIOUS_INSTALL_DIR)</Custom>
|
|
<Custom Action="RunInstaller" After="KillFarmControl">NOT Installed AND NOT PREVIOUS_UNINSTALL_CMD AND NOT PREVIOUS_INSTALL_DIR</Custom>
|
|
</InstallExecuteSequence>
|
|
</Product>
|
|
</Wix>
|