Home | History | Annotate | Download | only in pip
      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)">
     18             <ComponentRef Id="OptionalFeature" />
     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 -->
     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" />
     30         
     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 
     40