[Python-checkins] cpython: Issue #27610: Adds PEP 514 metadata to Windows installer

steve.dower python-checkins at python.org
Sun Jul 24 21:07:14 EDT 2016


https://hg.python.org/cpython/rev/c6ce1958cebb
changeset:   102439:c6ce1958cebb
parent:      102437:dca143512f6e
user:        Steve Dower <steve.dower at microsoft.com>
date:        Sun Jul 24 18:04:29 2016 -0700
summary:
  Issue #27610: Adds PEP 514 metadata to Windows installer

files:
  Misc/NEWS                            |  2 ++
  Tools/msi/common.wxs                 |  4 ++++
  Tools/msi/common_en-US.wxl_template  |  1 +
  Tools/msi/exe/exe.wixproj            |  1 +
  Tools/msi/exe/exe.wxs                |  2 +-
  Tools/msi/exe/exe_d.wixproj          |  1 +
  Tools/msi/exe/exe_en-US.wxl_template |  1 +
  Tools/msi/exe/exe_files.wxs          |  3 +++
  Tools/msi/exe/exe_pdb.wixproj        |  1 +
  Tools/msi/msi.props                  |  9 +++++++++
  10 files changed, 24 insertions(+), 1 deletions(-)


diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -61,6 +61,8 @@
 Windows
 -------
 
+- Issue #27610: Adds PEP 514 metadata to Windows installer
+
 - Issue #27469: Adds a shell extension to the launcher so that drag and drop
   works correctly.
 
diff --git a/Tools/msi/common.wxs b/Tools/msi/common.wxs
--- a/Tools/msi/common.wxs
+++ b/Tools/msi/common.wxs
@@ -1,6 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
     <Fragment>
+        <Property Id="ROOTREGISTRYKEY" Value="Software\Python\PythonCore" />
+    </Fragment>
+    
+    <Fragment>
         <Property Id="REGISTRYKEY" Value="Software\Python\PythonCore\$(var.ShortVersion)$(var.PyArchExt)$(var.PyTestExt)" />
     </Fragment>
     
diff --git a/Tools/msi/common_en-US.wxl_template b/Tools/msi/common_en-US.wxl_template
--- a/Tools/msi/common_en-US.wxl_template
+++ b/Tools/msi/common_en-US.wxl_template
@@ -14,4 +14,5 @@
     <String Id="NoDowngrade">A newer version of !(loc.ProductName) is already installed.</String>
     <String Id="IncorrectCore">An incorrect version of a prerequisite package is installed. Please uninstall any other versions of !(loc.ProductName) and try installing this again.</String>
     <String Id="NoTargetDir">The TARGETDIR variable must be provided when invoking this installer.</String>
+    <String Id="ManufacturerSupportUrl">http://www.python.org/</String>
 </WixLocalization>
diff --git a/Tools/msi/exe/exe.wixproj b/Tools/msi/exe/exe.wixproj
--- a/Tools/msi/exe/exe.wixproj
+++ b/Tools/msi/exe/exe.wixproj
@@ -14,6 +14,7 @@
     <ItemGroup>
         <Compile Include="exe.wxs" />
         <Compile Include="exe_files.wxs" />
+        <Compile Include="exe_reg.wxs" />
     </ItemGroup>
     <ItemGroup>
         <EmbeddedResource Include="*.wxl" />
diff --git a/Tools/msi/exe/exe.wxs b/Tools/msi/exe/exe.wxs
--- a/Tools/msi/exe/exe.wxs
+++ b/Tools/msi/exe/exe.wxs
@@ -9,6 +9,7 @@
         
         <Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
             <ComponentGroupRef Id="exe_python" Primary="yes" />
+            <ComponentGroupRef Id="exe_reg" Primary="yes" />
             <ComponentGroupRef Id="exe_txt" />
             <ComponentGroupRef Id="exe_icons" />
             <ComponentRef Id="OptionalFeature" />
@@ -24,7 +25,6 @@
                           WorkingDirectory="InstallDirectory" />
                 <RemoveFolder Id="Remove_MenuDir" Directory="MenuDir" On="uninstall" />
                 <RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
-                    <RegistryValue Key="InstallPath\InstallGroup" Type="string" Value="!(loc.ProductName)" KeyPath="yes" />
                     <RegistryValue Key="InstalledFeatures" Name="Shortcuts" Type="string" Value="$(var.Version)" />
                 </RegistryKey>
             </Component>
diff --git a/Tools/msi/exe/exe_d.wixproj b/Tools/msi/exe/exe_d.wixproj
--- a/Tools/msi/exe/exe_d.wixproj
+++ b/Tools/msi/exe/exe_d.wixproj
@@ -10,6 +10,7 @@
     <ItemGroup>
         <Compile Include="exe_d.wxs" />
         <Compile Include="exe_files.wxs" />
+        <Compile Include="exe_reg.wxs" />
     </ItemGroup>
     <ItemGroup>
         <EmbeddedResource Include="*.wxl" />
diff --git a/Tools/msi/exe/exe_en-US.wxl_template b/Tools/msi/exe/exe_en-US.wxl_template
--- a/Tools/msi/exe/exe_en-US.wxl_template
+++ b/Tools/msi/exe/exe_en-US.wxl_template
@@ -4,4 +4,5 @@
     <String Id="ShortDescriptor">executable</String>
     <String Id="ShortcutName">Python {{ShortVersion}} ({{Bitness}})</String>
     <String Id="ShortcutDescription">Launches the !(loc.ProductName) interpreter.</String>
+    <String Id="SupportUrl">http://www.python.org/</String>
 </WixLocalization>
diff --git a/Tools/msi/exe/exe_files.wxs b/Tools/msi/exe/exe_files.wxs
--- a/Tools/msi/exe/exe_files.wxs
+++ b/Tools/msi/exe/exe_files.wxs
@@ -28,6 +28,9 @@
             </Component>
             <Component Id="pythonw.exe" Directory="InstallDirectory" Guid="$(var.PythonwExeComponentGuid)">
                 <File Name="pythonw.exe" KeyPath="yes" />
+                <RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
+                    <RegistryValue Key="InstallPath" Name="WindowedExecutablePath" Type="string" Value="[#pythonw.exe]" KeyPath="no" />
+                </RegistryKey>
             </Component>
             <Component Id="vcruntime140.dll" Directory="InstallDirectory" Guid="*">
                 <File Name="vcruntime140.dll" Source="!(bindpath.redist)vcruntime140.dll" KeyPath="yes" />
diff --git a/Tools/msi/exe/exe_pdb.wixproj b/Tools/msi/exe/exe_pdb.wixproj
--- a/Tools/msi/exe/exe_pdb.wixproj
+++ b/Tools/msi/exe/exe_pdb.wixproj
@@ -10,6 +10,7 @@
     <ItemGroup>
         <Compile Include="exe_pdb.wxs" />
         <Compile Include="exe_files.wxs" />
+        <Compile Include="exe_reg.wxs" />
     </ItemGroup>
     <ItemGroup>
         <EmbeddedResource Include="*.wxl" />
diff --git a/Tools/msi/msi.props b/Tools/msi/msi.props
--- a/Tools/msi/msi.props
+++ b/Tools/msi/msi.props
@@ -69,6 +69,8 @@
     <PropertyGroup>
         <Bitness>32-bit</Bitness>
         <Bitness Condition="$(Platform) == 'x64'">64-bit</Bitness>
+        <PlatformArchitecture>32bit</PlatformArchitecture>
+        <PlatformArchitecture Condition="$(Platform) == 'x64'">64bit</PlatformArchitecture>
         <DefineConstants>
             $(DefineConstants);
             Version=$(InstallerVersion);
@@ -79,6 +81,7 @@
             UpgradeMinimumVersion=$(MajorVersionNumber).$(MinorVersionNumber).0.0;
             NextMajorVersionNumber=$(MajorVersionNumber).$([msbuild]::Add($(MinorVersionNumber), 1)).0.0;
             Bitness=$(Bitness);
+            PlatformArchitecture=$(PlatformArchitecture);
             PyDebugExt=$(PyDebugExt);
             PyArchExt=$(PyArchExt);
             PyTestExt=$(PyTestExt);
@@ -155,6 +158,12 @@
         <_Uuid Include="RemoveLib2to3PickleComponentGuid">
             <Uri>lib2to3/pickles</Uri>
         </_Uuid>
+        <_Uuid Include="CommonPythonRegComponentGuid">
+            <Uri>registry</Uri>
+        </_Uuid>
+        <_Uuid Include="PythonRegComponentGuid">
+            <Uri>registry/$(OutputName)</Uri>
+        </_Uuid>
     </ItemGroup>
     <Target Name="_GenerateGuids" AfterTargets="PrepareForBuild" Condition="$(TargetName) != 'launcher'">
         <PropertyGroup>

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list