Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0533826

Browse files
committed
Issue #27610: Adds PEP 514 metadata to Windows installer
1 parent 95f7b9f commit 0533826

10 files changed

Lines changed: 24 additions & 1 deletion

File tree

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ Tests
6161
Windows
6262
-------
6363

64+
- Issue #27610: Adds PEP 514 metadata to Windows installer
65+
6466
- Issue #27469: Adds a shell extension to the launcher so that drag and drop
6567
works correctly.
6668

Tools/msi/common.wxs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
3+
<Fragment>
4+
<Property Id="ROOTREGISTRYKEY" Value="Software\Python\PythonCore" />
5+
</Fragment>
6+
37
<Fragment>
48
<Property Id="REGISTRYKEY" Value="Software\Python\PythonCore\$(var.ShortVersion)$(var.PyArchExt)$(var.PyTestExt)" />
59
</Fragment>

Tools/msi/common_en-US.wxl_template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@
1414
<String Id="NoDowngrade">A newer version of !(loc.ProductName) is already installed.</String>
1515
<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>
1616
<String Id="NoTargetDir">The TARGETDIR variable must be provided when invoking this installer.</String>
17+
<String Id="ManufacturerSupportUrl">http://www.python.org/</String>
1718
</WixLocalization>

Tools/msi/exe/exe.wixproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
<ItemGroup>
1515
<Compile Include="exe.wxs" />
1616
<Compile Include="exe_files.wxs" />
17+
<Compile Include="exe_reg.wxs" />
1718
</ItemGroup>
1819
<ItemGroup>
1920
<EmbeddedResource Include="*.wxl" />

Tools/msi/exe/exe.wxs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
1111
<ComponentGroupRef Id="exe_python" Primary="yes" />
12+
<ComponentGroupRef Id="exe_reg" Primary="yes" />
1213
<ComponentGroupRef Id="exe_txt" />
1314
<ComponentGroupRef Id="exe_icons" />
1415
<ComponentRef Id="OptionalFeature" />
@@ -24,7 +25,6 @@
2425
WorkingDirectory="InstallDirectory" />
2526
<RemoveFolder Id="Remove_MenuDir" Directory="MenuDir" On="uninstall" />
2627
<RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
27-
<RegistryValue Key="InstallPath\InstallGroup" Type="string" Value="!(loc.ProductName)" KeyPath="yes" />
2828
<RegistryValue Key="InstalledFeatures" Name="Shortcuts" Type="string" Value="$(var.Version)" />
2929
</RegistryKey>
3030
</Component>

Tools/msi/exe/exe_d.wixproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<ItemGroup>
1111
<Compile Include="exe_d.wxs" />
1212
<Compile Include="exe_files.wxs" />
13+
<Compile Include="exe_reg.wxs" />
1314
</ItemGroup>
1415
<ItemGroup>
1516
<EmbeddedResource Include="*.wxl" />

Tools/msi/exe/exe_en-US.wxl_template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
<String Id="ShortDescriptor">executable</String>
55
<String Id="ShortcutName">Python {{ShortVersion}} ({{Bitness}})</String>
66
<String Id="ShortcutDescription">Launches the !(loc.ProductName) interpreter.</String>
7+
<String Id="SupportUrl">http://www.python.org/</String>
78
</WixLocalization>

Tools/msi/exe/exe_files.wxs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
</Component>
2929
<Component Id="pythonw.exe" Directory="InstallDirectory" Guid="$(var.PythonwExeComponentGuid)">
3030
<File Name="pythonw.exe" KeyPath="yes" />
31+
<RegistryKey Root="HKMU" Key="[REGISTRYKEY]">
32+
<RegistryValue Key="InstallPath" Name="WindowedExecutablePath" Type="string" Value="[#pythonw.exe]" KeyPath="no" />
33+
</RegistryKey>
3134
</Component>
3235
<Component Id="vcruntime140.dll" Directory="InstallDirectory" Guid="*">
3336
<File Name="vcruntime140.dll" Source="!(bindpath.redist)vcruntime140.dll" KeyPath="yes" />

Tools/msi/exe/exe_pdb.wixproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<ItemGroup>
1111
<Compile Include="exe_pdb.wxs" />
1212
<Compile Include="exe_files.wxs" />
13+
<Compile Include="exe_reg.wxs" />
1314
</ItemGroup>
1415
<ItemGroup>
1516
<EmbeddedResource Include="*.wxl" />

Tools/msi/msi.props

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@
6969
<PropertyGroup>
7070
<Bitness>32-bit</Bitness>
7171
<Bitness Condition="$(Platform) == 'x64'">64-bit</Bitness>
72+
<PlatformArchitecture>32bit</PlatformArchitecture>
73+
<PlatformArchitecture Condition="$(Platform) == 'x64'">64bit</PlatformArchitecture>
7274
<DefineConstants>
7375
$(DefineConstants);
7476
Version=$(InstallerVersion);
@@ -79,6 +81,7 @@
7981
UpgradeMinimumVersion=$(MajorVersionNumber).$(MinorVersionNumber).0.0;
8082
NextMajorVersionNumber=$(MajorVersionNumber).$([msbuild]::Add($(MinorVersionNumber), 1)).0.0;
8183
Bitness=$(Bitness);
84+
PlatformArchitecture=$(PlatformArchitecture);
8285
PyDebugExt=$(PyDebugExt);
8386
PyArchExt=$(PyArchExt);
8487
PyTestExt=$(PyTestExt);
@@ -155,6 +158,12 @@
155158
<_Uuid Include="RemoveLib2to3PickleComponentGuid">
156159
<Uri>lib2to3/pickles</Uri>
157160
</_Uuid>
161+
<_Uuid Include="CommonPythonRegComponentGuid">
162+
<Uri>registry</Uri>
163+
</_Uuid>
164+
<_Uuid Include="PythonRegComponentGuid">
165+
<Uri>registry/$(OutputName)</Uri>
166+
</_Uuid>
158167
</ItemGroup>
159168
<Target Name="_GenerateGuids" AfterTargets="PrepareForBuild" Condition="$(TargetName) != 'launcher'">
160169
<PropertyGroup>

0 commit comments

Comments
 (0)