blob: 19e9f5fd2088607f2c860ef33e2d10e6b0f8e2fa [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)">
Steve Dower49437492015-07-08 20:18:44 -070018 <ComponentRef Id="OptionalFeature" />
Steve Dowerbb240872015-02-05 22:08:48 -080019 </Feature>
20
21 <?if $(var.Platform)~="x64" ?>
22 <CustomAction Id="UpdatePip" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="deferred" Return="ignore"/>
23 <?else ?>
24 <CustomAction Id="UpdatePip" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore"/>
25 <?endif ?>
26
27 <!-- Install/uninstall pip -->
Steve Dower06606e72015-07-04 11:48:37 -070028 <CustomAction Id="SetUpdatePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -E -s -m ensurepip -U --default-pip' Execute="immediate" />
29 <CustomAction Id="SetRemovePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -E -s -B -m ensurepip._uninstall' Execute="immediate" />
Steve Dowerbb240872015-02-05 22:08:48 -080030
31 <InstallExecuteSequence>
32 <Custom Action="SetUpdatePipCommandLine" Before="UpdatePip">(&amp;DefaultFeature=3) AND NOT (!DefaultFeature=3)</Custom>
33 <Custom Action="SetRemovePipCommandLine" Before="UpdatePip">(&amp;DefaultFeature=2) AND (!DefaultFeature=3)</Custom>
34
35 <Custom Action="UpdatePip" Before="InstallFinalize">UpdatePip</Custom>
36 </InstallExecuteSequence>
37 </Product>
38</Wix>
39