summaryrefslogtreecommitdiffstats
path: root/Tools/msi/pip
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2015-02-06 06:08:48 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2015-02-06 06:08:48 (GMT)
commitbb24087a2cbfb186b540cc71a74ec8c39c1ebe3a (patch)
tree3b586e72b5744c4076a222e8f803a00d17b5f20f /Tools/msi/pip
parent7425f36ee74ccf5bfc2894aca6e6b86815894f98 (diff)
downloadcpython-bb24087a2cbfb186b540cc71a74ec8c39c1ebe3a.zip
cpython-bb24087a2cbfb186b540cc71a74ec8c39c1ebe3a.tar.gz
cpython-bb24087a2cbfb186b540cc71a74ec8c39c1ebe3a.tar.bz2
Issue #23260: Update Windows installer
Diffstat (limited to 'Tools/msi/pip')
-rw-r--r--Tools/msi/pip/pip.wixproj19
-rw-r--r--Tools/msi/pip/pip.wxs41
-rw-r--r--Tools/msi/pip/pip_en-US.wxl6
3 files changed, 66 insertions, 0 deletions
diff --git a/Tools/msi/pip/pip.wixproj b/Tools/msi/pip/pip.wixproj
new file mode 100644
index 0000000..718c02c
--- /dev/null
+++ b/Tools/msi/pip/pip.wixproj
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <ProjectGuid>{91C99298-8E2E-4422-A5AF-CC4FFF9A58D3}</ProjectGuid>
+ <SchemaVersion>2.0</SchemaVersion>
+ <OutputName>pip</OutputName>
+ <OutputType>Package</OutputType>
+ <SuppressIces>ICE71</SuppressIces>
+ </PropertyGroup>
+ <Import Project="..\msi.props" />
+ <ItemGroup>
+ <Compile Include="*.wxs" />
+ </ItemGroup>
+ <ItemGroup>
+ <EmbeddedResource Include="*.wxl" />
+ </ItemGroup>
+
+ <Import Project="..\msi.targets" />
+</Project> \ No newline at end of file
diff --git a/Tools/msi/pip/pip.wxs b/Tools/msi/pip/pip.wxs
new file mode 100644
index 0000000..4c3dc59
--- /dev/null
+++ b/Tools/msi/pip/pip.wxs
@@ -0,0 +1,41 @@
+<?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)">
+ <Component Id="pip" Guid="*" Directory="InstallDirectory">
+ <RegistryValue KeyPath="yes" Root="HKMU" Key="[REGISTRYKEY]\EnsurePipRun" Value="1" Type="integer" />
+ </Component>
+ </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]" -m ensurepip -U --default-pip' Execute="immediate" />
+ <CustomAction Id="SetRemovePipCommandLine" Property="UpdatePip" Value='"[PYTHON_EXE]" -B -m ensurepip._uninstall' Execute="immediate" />
+
+ <InstallExecuteSequence>
+ <Custom Action="SetUpdatePipCommandLine" Before="UpdatePip">(&amp;DefaultFeature=3) AND NOT (!DefaultFeature=3)</Custom>
+ <Custom Action="SetRemovePipCommandLine" Before="UpdatePip">(&amp;DefaultFeature=2) AND (!DefaultFeature=3)</Custom>
+
+ <Custom Action="UpdatePip" Before="InstallFinalize">UpdatePip</Custom>
+ </InstallExecuteSequence>
+ </Product>
+</Wix>
+
diff --git a/Tools/msi/pip/pip_en-US.wxl b/Tools/msi/pip/pip_en-US.wxl
new file mode 100644
index 0000000..cd0d9ed
--- /dev/null
+++ b/Tools/msi/pip/pip_en-US.wxl
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="utf-8"?>
+<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
+ <String Id="Descriptor">pip Bootstrap</String>
+ <String Id="ShortDescriptor">pip</String>
+ <String Id="NoPython">No !(loc.ProductName) installation was detected.</String>
+</WixLocalization>