• 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    <Fragment>
4        <Property Id="ROOTREGISTRYKEY" Value="Software\Python\PythonCore" />
5    </Fragment>
6
7    <Fragment>
8        <Property Id="REGISTRYKEY" Value="Software\Python\PythonCore\$(var.ShortVersion)$(var.PyArchExt)$(var.PyTestExt)" />
9    </Fragment>
10
11    <Fragment>
12        <Component Id="OptionalFeature" Guid="*" Directory="InstallDirectory">
13            <Condition>OPTIONALFEATURESREGISTRYKEY</Condition>
14            <RegistryKey Root="HKMU" Key="[OPTIONALFEATURESREGISTRYKEY]">
15                <RegistryValue Type="string" Name="$(var.OptionalFeatureName)" Value="$(var.Version)" KeyPath="yes" />
16            </RegistryKey>
17        </Component>
18    </Fragment>
19
20    <Fragment>
21        <Property Id="UpgradeTable" Value="1" />
22
23        <?ifndef SuppressUpgradeTable ?>
24        <Upgrade Id="$(var.UpgradeCode)">
25            <UpgradeVersion Property="DOWNGRADE" Minimum="$(var.Version)" IncludeMinimum="no" OnlyDetect="yes" />
26            <UpgradeVersion Property="UPGRADE" Minimum="$(var.UpgradeMinimumVersion)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="no" />
27        </Upgrade>
28        <?endif ?>
29
30        <?ifdef CoreUpgradeCode ?>
31        <?if $(var.UpgradeCode)!=$(var.CoreUpgradeCode) ?>
32        <Upgrade Id="$(var.CoreUpgradeCode)">
33            <UpgradeVersion Property="MISSING_CORE" Minimum="$(var.Version)" IncludeMinimum="yes" Maximum="$(var.Version)" IncludeMaximum="yes" OnlyDetect="yes" />
34        </Upgrade>
35        <Condition Message="!(loc.IncorrectCore)">Installed OR NOT MISSING_CORE</Condition>
36        <?endif ?>
37        <?endif ?>
38
39        <Condition Message="!(loc.NoDowngrade)">Installed OR NOT DOWNGRADE</Condition>
40        <Condition Message="!(loc.NoTargetDir)">Installed OR TARGETDIR OR Suppress_TARGETDIR_Check</Condition>
41
42        <InstallExecuteSequence>
43            <RemoveExistingProducts After="InstallInitialize" Overridable="yes">UPGRADE</RemoveExistingProducts>
44        </InstallExecuteSequence>
45    </Fragment>
46
47    <Fragment>
48        <!-- Include an icon for the Programs and Features dialog -->
49        <Icon Id="ARPIcon" SourceFile="!(bindpath.src)PC\icons\python.ico" />
50        <Property Id="ARPPRODUCTICON" Value="ARPIcon" />
51        <Property Id="ARPNOMODIFY" Value="1" />
52        <Property Id="DISABLEADVTSHORTCUTS" Value="1" />
53    </Fragment>
54
55    <Fragment>
56        <Directory Id="TARGETDIR" Name="SourceDir">
57        <?ifdef InstallDirectoryGuidSeed ?>
58            <Directory Id="InstallDirectory" ComponentGuidGenerationSeed="$(var.InstallDirectoryGuidSeed)" />
59        <?endif ?>
60        </Directory>
61    </Fragment>
62
63    <Fragment>
64        <?ifdef PythonExeComponentGuid ?>
65        <!-- Locate TARGETDIR automatically assuming we have executables installed -->
66        <Property Id="TARGETDIR">
67            <ComponentSearch Id="PythonExe_Directory" Guid="$(var.PythonExeComponentGuid)">
68                <DirectorySearch Id="PythonExe_Directory" AssignToProperty="yes" Path=".">
69                    <FileSearch Id="PythonExe_DirectoryFile" Name="python.exe" />
70                </DirectorySearch>
71            </ComponentSearch>
72        </Property>
73        <?endif ?>
74        <Property Id="DetectTargetDir" Value="1" />
75    </Fragment>
76
77    <!-- Top-level directories -->
78    <Fragment>
79        <DirectoryRef Id="InstallDirectory">
80            <Directory Id="DLLs" Name="DLLs">
81                <Directory Id="Catalogs" />
82            </Directory>
83        </DirectoryRef>
84    </Fragment>
85
86    <Fragment>
87        <DirectoryRef Id="InstallDirectory">
88            <Directory Id="Doc" Name="Doc" />
89        </DirectoryRef>
90    </Fragment>
91
92    <Fragment>
93        <DirectoryRef Id="InstallDirectory">
94            <Directory Id="include" Name="include" />
95        </DirectoryRef>
96    </Fragment>
97
98    <Fragment>
99        <DirectoryRef Id="InstallDirectory">
100            <Directory Id="Lib" Name="Lib" />
101        </DirectoryRef>
102    </Fragment>
103
104    <Fragment>
105        <DirectoryRef Id="InstallDirectory">
106            <Directory Id="libs" Name="libs" />
107        </DirectoryRef>
108    </Fragment>
109
110    <Fragment>
111        <DirectoryRef Id="InstallDirectory">
112            <Directory Id="Scripts" Name="Scripts" />
113        </DirectoryRef>
114    </Fragment>
115
116    <Fragment>
117        <DirectoryRef Id="InstallDirectory">
118            <Directory Id="tcl" Name="tcl" />
119        </DirectoryRef>
120    </Fragment>
121
122    <Fragment>
123        <DirectoryRef Id="InstallDirectory">
124            <Directory Id="Tools" Name="Tools" />
125        </DirectoryRef>
126    </Fragment>
127
128    <!-- Start Menu folder -->
129    <Fragment>
130        <DirectoryRef Id="TARGETDIR">
131            <Directory Id="ProgramMenuFolder">
132                <Directory Id="MenuDir" Name="!(loc.ProductName)" />
133            </Directory>
134        </DirectoryRef>
135    </Fragment>
136</Wix>
137