mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00

Rather than using Burn "Persisted" variables we now add registry keys for each added feature. These can be detected by the installer regardless of which version installed them, and we use this for Modify and Upgrade. In particular, Upgrades can't access the Persisted variables, but can find well-known registry keys. There are also some changes to the bootstrap app to properly handle upgrades. Finally, a few minor improvements to the Windows build to keep things tidier.
39 lines
2 KiB
XML
39 lines
2 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
|
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
|
|
<Package InstallerVersion="300" Compressed="yes" InstallScope="perUser" Platform="$(var.Platform)" />
|
|
|
|
<PropertyRef Id="UpgradeTable" />
|
|
<PropertyRef Id="REGISTRYKEY" />
|
|
|
|
<Property Id="PYTHON_EXE" Secure="yes">
|
|
<ComponentSearch Id="PythonExe" Guid="$(var.PythonExeComponentGuid)">
|
|
<FileSearch Name="python.exe" />
|
|
</ComponentSearch>
|
|
</Property>
|
|
|
|
<Condition Message="!(loc.NoPython)">PYTHON_EXE</Condition>
|
|
|
|
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
|
|
<ComponentRef Id="OptionalFeature" />
|
|
</Feature>
|
|
|
|
<?if $(var.Platform)~="x64" ?>
|
|
<CustomAction Id="UpdatePip" BinaryKey="WixCA" DllEntry="CAQuietExec64" Execute="deferred" Return="ignore"/>
|
|
<?else ?>
|
|
<CustomAction Id="UpdatePip" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore"/>
|
|
<?endif ?>
|
|
|
|
<!-- Install/uninstall pip -->
|
|
<CustomAction Id="SetUpdatePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -E -s -m ensurepip -U --default-pip' Execute="immediate" />
|
|
<CustomAction Id="SetRemovePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -E -s -B -m ensurepip._uninstall' Execute="immediate" />
|
|
|
|
<InstallExecuteSequence>
|
|
<Custom Action="SetUpdatePipCommandLine" Before="UpdatePip">(&DefaultFeature=3) AND NOT (!DefaultFeature=3)</Custom>
|
|
<Custom Action="SetRemovePipCommandLine" Before="UpdatePip">(&DefaultFeature=2) AND (!DefaultFeature=3)</Custom>
|
|
|
|
<Custom Action="UpdatePip" Before="InstallFinalize">UpdatePip</Custom>
|
|
</InstallExecuteSequence>
|
|
</Product>
|
|
</Wix>
|
|
|