|
1 | 1 | <!-- Copyright (c) DataLab Platform Developers, BSD 3-Clause license, see LICENSE file. --> |
2 | 2 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" |
3 | 3 | xmlns:ui="http://wixtoolset.org/schemas/v4/wxs/ui"> |
4 | | - <Package Name="DataLab" ProductCode="b9f2e8d4-7c3a-4f1b-9e6d-5a8c2f1b4e9a" Language="1033" Version="{version}" Codepage="1252" Manufacturer="DataLab Platform Developers" UpgradeCode="e7a3f5c1-9d84-4b2a-a6f1-2c5d8e9b7a31" InstallerVersion="200" Scope="perUserOrMachine"> |
5 | | - <Upgrade Id="e7a3f5c1-9d84-4b2a-a6f1-2c5d8e9b7a31"> |
6 | | - <UpgradeVersion Minimum="1.0.0" Maximum="{version}" IncludeMinimum="yes" IncludeMaximum="no" OnlyDetect="no" Property="PREVIOUSVERSIONSINSTALLED" /> |
7 | | - <UpgradeVersion Minimum="{version}" OnlyDetect="yes" Property="NEWERVERSIONDETECTED" /> |
8 | | - </Upgrade> |
9 | | - <CustomAction Id="PreventDowngrade" Error="A newer version of [ProductName] is already installed." /> |
10 | | - <InstallExecuteSequence> |
11 | | - <Custom Action="PreventDowngrade" After="FindRelatedProducts" Condition="NEWERVERSIONDETECTED" /> |
12 | | - <RemoveExistingProducts After="InstallInitialize" /> |
13 | | - </InstallExecuteSequence> |
14 | | - <Icon Id="DataLab.exe" SourceFile=".\resources\DataLab.ico" /> |
| 4 | + <Package Name="DataLab" ProductCode="{product_code}" Language="1033" Version="{version}" Codepage="1252" Manufacturer="DataLab Platform Developers" UpgradeCode="e7a3f5c1-9d84-4b2a-a6f1-2c5d8e9b7a31" InstallerVersion="200" Scope="perUserOrMachine"> |
| 5 | + <MajorUpgrade DowngradeErrorMessage="A newer or same version of [ProductName] is already installed. Please uninstall the existing version before installing this one." /> |
| 6 | + <Icon Id="DataLabIcon" SourceFile=".\resources\DataLab.ico" /> |
15 | 7 | <Icon Id="DataLabResetIcon" SourceFile=".\resources\DataLab-Reset.ico" /> |
16 | 8 | <WixVariable Id="WixUILicenseRtf" Value=".\wix\license.rtf" /> |
17 | 9 | <WixVariable Id="WixUIDialogBmp" Value=".\wix\dialog.bmp" /> |
|
51 | 43 | <File Source=".\dist\DataLab\manifest.json" /> |
52 | 44 | </Component> |
53 | 45 | <!-- Automatically inserted components --> |
54 | | - <Component Id="PC_Shortcuts" Directory="ApplicationProgramsFolder" Guid="858c3c36-978e-4edb-a2c3-cf5c91588bcf"> |
55 | | - <Shortcut Id="ApplicationStartMenuShortcut" Name="{display_folder_name}" Description="{display_folder_name}" Target="[INSTALLFOLDER]\DataLab.exe" WorkingDirectory="INSTALLFOLDER" /> |
| 46 | + <!-- Shortcut components: one component per shortcut with registry KeyPath --> |
| 47 | + <Component Id="PC_Shortcut_Main" Directory="ApplicationProgramsFolder" Guid="*"> |
| 48 | + <Shortcut Id="ApplicationStartMenuShortcut" Name="{display_folder_name}" Description="{display_folder_name}" Target="[INSTALLFOLDER]\DataLab.exe" WorkingDirectory="INSTALLFOLDER" Icon="DataLabIcon" /> |
| 49 | + <RegistryValue Root="HKCU" Key="Software\[Manufacturer]\{install_folder_name}" Name="shortcut_main" Type="integer" Value="1" KeyPath="yes" /> |
| 50 | + <RemoveFolder Id="RemoveApplicationProgramsFolder1" Directory="ApplicationProgramsFolder" On="uninstall" /> |
| 51 | + </Component> |
| 52 | + <Component Id="PC_Shortcut_Reset" Directory="ApplicationProgramsFolder" Guid="*"> |
56 | 53 | <Shortcut Id="ResetApplicationStartMenuShortcut" Name="Reset {display_folder_name}" Description="Resets {display_folder_name} configuration" Target="[INSTALLFOLDER]\DataLab.exe" Arguments="--reset" WorkingDirectory="INSTALLFOLDER" Icon="DataLabResetIcon" /> |
57 | | - <Shortcut Id="UninstallProductShortcut" Name="Uninstall {display_folder_name}" Description="Uninstalls {display_folder_name}" Target="[System64Folder]msiexec.exe" Arguments="/x [ProductCode]" WorkingDirectory="INSTALLFOLDER" /> |
58 | | - <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall" /> |
59 | | - <RegistryValue Root="HKCU" Key="Software\[Manufacturer]\{install_folder_name}" Name="installed" Type="integer" Value="1" KeyPath="yes" /> |
| 54 | + <RegistryValue Root="HKCU" Key="Software\[Manufacturer]\{install_folder_name}" Name="shortcut_reset" Type="integer" Value="1" KeyPath="yes" /> |
| 55 | + <RemoveFolder Id="RemoveApplicationProgramsFolder2" Directory="ApplicationProgramsFolder" On="uninstall" /> |
| 56 | + </Component> |
| 57 | + <Component Id="PC_Shortcut_Uninstall" Directory="ApplicationProgramsFolder" Guid="*"> |
| 58 | + <Shortcut Id="UninstallProductShortcut" Name="Uninstall {display_folder_name}" Description="Uninstalls {display_folder_name}" Target="[System64Folder]msiexec.exe" Arguments="/x [ProductCode]" WorkingDirectory="INSTALLFOLDER" Icon="DataLabIcon" /> |
| 59 | + <RegistryValue Root="HKCU" Key="Software\[Manufacturer]\{install_folder_name}" Name="shortcut_uninstall" Type="integer" Value="1" KeyPath="yes" /> |
| 60 | + <RemoveFolder Id="RemoveApplicationProgramsFolder3" Directory="ApplicationProgramsFolder" On="uninstall" /> |
60 | 61 | </Component> |
61 | 62 | </ComponentGroup> |
62 | 63 | </Fragment> |
|
0 commit comments