Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 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 | |
| 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 Dower | 4943749 | 2015-07-08 20:18:44 -0700 | [diff] [blame] | 18 | <ComponentRef Id="OptionalFeature" /> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 19 | </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 Dower | 06606e7 | 2015-07-04 11:48:37 -0700 | [diff] [blame] | 28 | <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 Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 30 | |
| 31 | <InstallExecuteSequence> |
| 32 | <Custom Action="SetUpdatePipCommandLine" Before="UpdatePip">(&DefaultFeature=3) AND NOT (!DefaultFeature=3)</Custom> |
| 33 | <Custom Action="SetRemovePipCommandLine" Before="UpdatePip">(&DefaultFeature=2) AND (!DefaultFeature=3)</Custom> |
| 34 | |
| 35 | <Custom Action="UpdatePip" Before="InstallFinalize">UpdatePip</Custom> |
| 36 | </InstallExecuteSequence> |
| 37 | </Product> |
| 38 | </Wix> |
| 39 | |