• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0" encoding="UTF-8"?>
2<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3    <Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
4        <Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
5        <MediaTemplate EmbedCab="yes" CompressionLevel="high" />
6
7        <Property Id="Suppress_TARGETDIR_Check" Value="1" />
8        <Icon Id="ARPIcon" SourceFile="!(bindpath.src)PC\icons\launcher.ico" />
9        <Property Id="ARPPRODUCTICON" Value="ARPIcon" />
10        <Property Id="ARPNOMODIFY" Value="1" />
11        <Property Id="DISABLEADVTSHORTCUTS" Value="1" />
12
13        <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
14            <ComponentGroupRef Id="launcher_exe" Primary="yes" />
15        </Feature>
16        <Feature Id="AssociateFiles" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
17            <ComponentGroupRef Id="launcher_exe" />
18            <ComponentGroupRef Id="launcher_reg" />
19        </Feature>
20
21        <Directory Id="TARGETDIR" Name="SourceDir">
22            <Directory Id="LauncherInstallDirectory" />
23        </Directory>
24
25        <CustomAction Id="SetLauncherInstallDirectoryLM" Property="LauncherInstallDirectory" Value="[WindowsFolder]" />
26        <CustomAction Id="SetLauncherInstallDirectoryCU" Property="LauncherInstallDirectory" Value="[LocalAppDataFolder]Programs\Python\Launcher" />
27
28        <InstallExecuteSequence>
29            <Custom Before="SetLauncherInstallDirectoryLM" Action="SetLauncherInstallDirectoryCU">NOT Installed AND NOT ALLUSERS=1</Custom>
30            <Custom Before="CostFinalize" Action="SetLauncherInstallDirectoryLM">NOT Installed AND ALLUSERS=1</Custom>
31
32            <RemoveExistingProducts After="InstallValidate">UPGRADE or REMOVE_350_LAUNCHER or REMOVE_360A1_LAUNCHER</RemoveExistingProducts>
33        </InstallExecuteSequence>
34
35        <!-- Upgrade all versions of the launcher -->
36        <Upgrade Id="$(var.UpgradeCode)">
37            <UpgradeVersion Property="DOWNGRADE" Minimum="$(var.Version)" IncludeMinimum="no" OnlyDetect="yes" />
38            <UpgradeVersion Property="UPGRADE" Minimum="0.0.0.0" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="no" />
39        </Upgrade>
40        <!-- Python 3.5.0 shipped with a different UpgradeCode -->
41        <Upgrade Id="A71530B9-E89D-53DB-9C2D-C6D7551876D8">
42            <UpgradeVersion Minimum="0.0.0.0" Property="REMOVE_350_LAUNCHER" />
43        </Upgrade>
44        <!-- Python 3.6.0a1 shipped with a different UpgradeCode -->
45        <Upgrade Id="394750C0-7880-5A8F-999F-933965FBCFB4">
46            <UpgradeVersion Minimum="0.0.0.0" Property="REMOVE_360A1_LAUNCHER" />
47        </Upgrade>
48    </Product>
49</Wix>
50