blob: 4c3dc59ec3b180ceb3e42cb9053370ee308501b0 [file] [log] [blame]
Steve Dowerbb240872015-02-05 22:08:48 -08001<?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
6 <PropertyRef Id="UpgradeTable" />
7 <PropertyRef Id="REGISTRYKEY" />
8
9 <Property Id="PYTHON_EXE" Secure="yes">
10 <ComponentSearch Id="PythonExe" Guid="$(var.PythonExeComponentGuid)">
11 <FileSearch Name="python.exe" />
12 </ComponentSearch>
13 </Property>
14
15 <Condition Message="!(loc.NoPython)">PYTHON_EXE</Condition>
16
17 <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
18 <Component Id="pip" Guid="*" Directory="InstallDirectory">
19 <RegistryValue KeyPath="yes" Root="HKMU" Key="[REGISTRYKEY]\EnsurePipRun" Value="1" Type="integer" />
20 </Component>
21 </Feature>
22
23 <?if $(var.Platform)~="x64" ?>
24 <CustomAction Id="UpdatePip" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="deferred" Return="ignore"/>
25 <?else ?>
26 <CustomAction Id="UpdatePip" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore"/>
27 <?endif ?>
28
29 <!-- Install/uninstall pip -->
30 <CustomAction Id="SetUpdatePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -m ensurepip -U --default-pip' Execute="immediate" />
31 <CustomAction Id="SetRemovePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -B -m ensurepip._uninstall' Execute="immediate" />
32
33 <InstallExecuteSequence>
34 <Custom Action="SetUpdatePipCommandLine" Before="UpdatePip">(&amp;DefaultFeature=3) AND NOT (!DefaultFeature=3)</Custom>
35 <Custom Action="SetRemovePipCommandLine" Before="UpdatePip">(&amp;DefaultFeature=2) AND (!DefaultFeature=3)</Custom>
36
37 <Custom Action="UpdatePip" Before="InstallFinalize">UpdatePip</Custom>
38 </InstallExecuteSequence>
39 </Product>
40</Wix>
41