gh-112984 Update Windows build and installer for free-threaded builds (GH-113129)

This commit is contained in:
Steve Dower 2024-01-17 21:52:23 +00:00 • committed by GitHub
parent 78fcde039a
commit f56d132deb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
76 changed files with 1437 additions and 245 deletions

View file

@ -22,6 +22,9 @@ if "%~1" EQU "--no-test-marker" (set BUILDTEST=) && shift && goto CheckOpts
if "%~1" EQU "--test-marker" (set BUILDTEST=--test-marker) && shift && goto CheckOpts
if "%~1" EQU "--pack" (set BUILDPACK=1) && shift && goto CheckOpts
if "%~1" EQU "-r" (set REBUILD=-r) && shift && goto CheckOpts
rem %IncludeFreethreaded% is recognised by the MSI build, but not the regular build.
rem We use it to build twice and then build the installer with its extra option
if /I "%~1" EQU "--disable-gil" (set IncludeFreethreaded=true) && shift && goto CheckOpts
if not defined BUILDX86 if not defined BUILDX64 if not defined BUILDARM64 (set BUILDX86=1) && (set BUILDX64=1)
@ -44,6 +47,20 @@ if errorlevel 1 exit /B %ERRORLEVEL%
if defined BUILDARM64 call "%PCBUILD%build.bat" -p ARM64 -e %REBUILD% %BUILDTEST%
if errorlevel 1 exit /B %ERRORLEVEL%
if /I "%IncludeFreethreaded%"=="true" (
rem Cannot "exit /B" inside an if block because %ERRORLEVEL% will be wrong.
rem We just skip everything after the first "errorlevel 1" and then exit after
if defined BUILDX86 call "%PCBUILD%build.bat" -p Win32 -d -e %REBUILD% %BUILDTEST% --disable-gil
if not errorlevel 1 if defined BUILDX86 call "%PCBUILD%build.bat" -p Win32 -e %REBUILD% %BUILDTEST% --disable-gil
if not errorlevel 1 if defined BUILDX64 call "%PCBUILD%build.bat" -p x64 -d -e %REBUILD% %BUILDTEST% --disable-gil
if not errorlevel 1 if defined BUILDX64 call "%PCBUILD%build.bat" -p x64 -e %REBUILD% %BUILDTEST% --disable-gil
if not errorlevel 1 if defined BUILDARM64 call "%PCBUILD%build.bat" -p ARM64 -d -e %REBUILD% %BUILDTEST% --disable-gil
if not errorlevel 1 if defined BUILDARM64 call "%PCBUILD%build.bat" -p ARM64 -e %REBUILD% %BUILDTEST% --disable-gil
)
if errorlevel 1 exit /B %ERRORLEVEL%
if defined BUILDDOC call "%PCBUILD%..\Doc\make.bat" html
if errorlevel 1 exit /B %ERRORLEVEL%

View file

@ -83,6 +83,7 @@
<Checkbox Name="CompileAll" X="185" Y="151" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.PrecompileLabel)</Checkbox>
<Checkbox Name="Include_symbols" X="185" Y="176" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.Include_symbolsLabel)</Checkbox>
<Checkbox Name="Include_debug" X="185" Y="201" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="no">#(loc.Include_debugLabel)</Checkbox>
<Checkbox Name="Include_freethreaded" X="185" Y="226" Width="-11" Height="24" TabStop="yes" FontId="3" HideWhenDisabled="yes">#(loc.Include_freethreadedLabel)</Checkbox>
<Text X="185" Y="256" Width="-11" Height="17" FontId="3">#(loc.CustomLocationLabel)</Text>
<Editbox Name="TargetDir" X="185" Y="277" Width="-101" Height="27" TabStop="yes" FontId="3" FileSystemAutoComplete="yes" />

View file

@ -91,6 +91,7 @@ Select Customize to review current options.</String>
<String Id="PrecompileLabel">&amp;Precompile standard library</String>
<String Id="Include_symbolsLabel">Download debugging &amp;symbols</String>
<String Id="Include_debugLabel">Download debu&amp;g binaries (requires VS 2017 or later)</String>
<String Id="Include_freethreadedLabel">Download &amp;free-threaded binaries (experimental)</String>
<String Id="ProgressHeader">[ActionLikeInstallation] Progress</String>
<String Id="ProgressLabel">[ActionLikeInstalling]:</String>

View file

@ -72,6 +72,7 @@
<Package Include="..\tcltk\tcltk*.wixproj" />
<Package Include="..\test\test*.wixproj" />
<Package Include="..\ucrt\ucrt*.wixproj" Condition="$(Platform) != 'ARM64'" />
<Package Include="..\freethreaded\freethreaded*.wixproj" Condition="$(IncludeFreethreaded) == 'true'" />
</ItemGroup>
<PropertyGroup>

View file

@ -82,6 +82,13 @@
<?endif ?>
<Variable Name="Include_symbols" Value="0" bal:Overridable="yes" />
<Variable Name="Include_debug" Value="0" bal:Overridable="yes" />
<?if $(var.IncludeFreethreaded)~="true" ?>
<Variable Name="Include_freethreaded" Value="0" bal:Overridable="yes" />
<Variable Name="Include_freethreadedState" Value="enabled" />
<?else ?>
<Variable Name="Include_freethreaded" Value="0" />
<Variable Name="Include_freethreadedState" Value="disable" />
<?endif ?>
<Variable Name="LauncherOnly" Value="0" bal:Overridable="yes" />
<Variable Name="DetectedLauncher" Value="0" />
@ -104,6 +111,9 @@
<PackageGroupRef Id="exe" />
<PackageGroupRef Id="dev" />
<PackageGroupRef Id="lib" />
<?if $(var.IncludeFreethreaded)~="true" ?>
<PackageGroupRef Id="freethreaded" />
<?endif ?>
<PackageGroupRef Id="test" />
<PackageGroupRef Id="doc" />
<PackageGroupRef Id="tcltk" />

View file

@ -0,0 +1,62 @@
<?xml version="1.0"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<PackageGroup Id="freethreaded">
<MsiPackage Id="freethreaded_AllUsers"
SourceFile="freethreaded.msi"
Compressed="no"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and (Include_freethreaded) and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="freethreaded_AllUsers_pdb"
SourceFile="freethreaded_pdb.msi"
Compressed="no"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and (Include_freethreaded) and Include_symbols and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="freethreaded_AllUsers_d"
SourceFile="freethreaded_d.msi"
Compressed="no"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="yes"
InstallCondition="InstallAllUsers and (Include_freethreaded) and Include_debug and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="freethreaded_JustForMe"
SourceFile="freethreaded.msi"
Compressed="no"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and (Include_freethreaded) and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="freethreaded_JustForMe_pdb"
SourceFile="freethreaded_pdb.msi"
Compressed="no"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and (Include_freethreaded) and Include_symbols and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
<MsiPackage Id="freethreaded_JustForMe_d"
SourceFile="freethreaded_d.msi"
Compressed="no"
DownloadUrl="$(var.DownloadUrl)"
ForcePerMachine="no"
InstallCondition="not InstallAllUsers and (Include_freethreaded) and Include_debug and not LauncherOnly">
<MsiProperty Name="TARGETDIR" Value="[TargetDir]" />
<MsiProperty Name="OPTIONALFEATURESREGISTRYKEY" Value="[OptionalFeaturesRegistryKey]" />
</MsiPackage>
</PackageGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{1B4502D5-B627-4F50-ABEA-4CC5A8E88265}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>freethreaded</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="freethreaded.wxs" />
<Compile Include="freethreaded_files.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
<WxlTemplate Include="*.wxl_template" />
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,18 @@
<?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="500" Compressed="yes" InstallScope="perUser" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<PropertyRef Id="REGISTRYKEY" />
<Feature Id="DefaultFeature" AllowAdvertise="no" Title="!(loc.Title)" Description="!(loc.Description)">
<ComponentGroupRef Id="freethreaded_reg" Primary="yes" />
<ComponentGroupRef Id="freethreaded_exe" />
<ComponentGroupRef Id="freethreaded_lib_files" />
<ComponentGroupRef Id="freethreaded_lib_extensions" />
<ComponentRef Id="OptionalFeature" />
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{D3677DCF-098A-4398-9FA5-8E74AC37E0DF}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>freethreaded_d</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="freethreaded_d.wxs" />
<Compile Include="freethreaded_files.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
<WxlTemplate Include="*.wxl_template" />
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.Title_d)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="500" Compressed="yes" InstallScope="perUser" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<Feature Id="DebugBinaries" AllowAdvertise="no" Title="!(loc.Title_d)" Description="!(loc.Description_d)">
<ComponentGroupRef Id="freethreaded_dll_d" />
<ComponentGroupRef Id="freethreaded_exe_d" />
<ComponentGroupRef Id="freethreaded_lib_extensions_d" />
<ComponentRef Id="OptionalFeature" />
</Feature>
</Product>
</Wix>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<WixLocalization Culture="en-us" xmlns="http://schemas.microsoft.com/wix/2006/localization">
<String Id="Descriptor">Freethreaded Interpreter</String>
<String Id="ShortDescriptor">freethreaded</String>
<String Id="ShortcutName">Python {{ShortVersion}} ({{Bitness}}, freethreaded)</String>
<String Id="ShortcutDescription">Launches the !(loc.ProductName) freethreaded interpreter.</String>
<String Id="SupportUrl">https://www.python.org/</String>
</WixLocalization>

View file

@ -0,0 +1,175 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Fragment>
<Property Id="FREETHREADED_REGISTRYKEY" Value="Software\Python\PythonCore\$(var.ShortVersion)t$(var.PyArchExt)$(var.PyTestExt)" />
<ComponentGroup Id="freethreaded_reg">
<Component Id="PythonRegistration" Directory="InstallDirectory" Guid="$(var.PythonRegComponentGuid)">
<RegistryKey Root="HKMU" Key="[FREETHREADED_REGISTRYKEY]">
<RegistryValue Name="DisplayName" Type="string" Value="!(loc.ShortcutName)" KeyPath="yes" />
<RegistryValue Name="SupportUrl" Type="string" Value="!(loc.SupportUrl)" KeyPath="no" />
<RegistryValue Name="Version" Type="string" Value="$(var.LongVersion)" KeyPath="no" />
<RegistryValue Name="SysVersion" Type="string" Value="$(var.ShortVersion)" KeyPath="no" />
<RegistryValue Name="SysArchitecture" Type="string" Value="$(var.PlatformArchitecture)" KeyPath="no" />
</RegistryKey>
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<DirectoryRef Id="Lib">
<Directory Id="Lib_venv__freethreaded" Name="venv">
<Directory Id="Lib_venv_scripts__freethreaded" Name="scripts">
<Directory Id="Lib_venv_scripts_nt__freethreaded" Name="nt" />
</Directory>
</Directory>
</DirectoryRef>
</Fragment>
<Fragment>
<PropertyRef Id="FREETHREADED_REGISTRYKEY" />
<ComponentGroup Id="freethreaded_exe">
<Component Id="freethreaded_python.exe" Directory="InstallDirectory" Guid="$(var.FreethreadedPythonExeComponentGuid)">
<File Name="python$(var.ShortVersion)t.exe" KeyPath="yes" />
<RegistryKey Root="HKMU" Key="[FREETHREADED_REGISTRYKEY]">
<RegistryValue Key="InstallPath" Type="string" Value="[InstallDirectory]" KeyPath="no" />
<RegistryValue Key="InstallPath" Name="ExecutablePath" Type="string" Value="[#python$(var.ShortVersion)t.exe]" KeyPath="no" />
</RegistryKey>
</Component>
<Component Id="freethreaded_pythonw.exe" Directory="InstallDirectory" Guid="$(var.FreethreadedPythonwExeComponentGuid)">
<File Name="pythonw$(var.ShortVersion)t.exe" KeyPath="yes" />
<RegistryKey Root="HKMU" Key="[FREETHREADED_REGISTRYKEY]">
<RegistryValue Key="InstallPath" Name="WindowedExecutablePath" Type="string" Value="[#pythonw$(var.ShortVersion)t.exe]" KeyPath="no" />
</RegistryKey>
</Component>
<Component Id="freethreaded_python_stable.dll" Directory="InstallDirectory" Guid="*">
<File Id="freethreaded_python_stable.dll" Name="python$(var.MajorVersionNumber)t.dll" KeyPath="yes" />
</Component>
<Component Id="freethreaded_python.dll" Directory="InstallDirectory" Guid="*">
<File Id="freethreaded_python.dll" Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber)t.dll" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="freethreaded_symbols">
<Component Id="freethreaded_python_dll.pdb" Directory="InstallDirectory" Guid="*">
<File Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber)t.pdb" KeyPath="yes" />
</Component>
<Component Id="freethreaded_python.pdb" Directory="InstallDirectory" Guid="*">
<File Name="python$(var.ShortVersion)t.pdb" />
</Component>
<Component Id="freethreaded_pythonw.pdb" Directory="InstallDirectory" Guid="*">
<File Name="pythonw$(var.ShortVersion)t.pdb" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="freethreaded_dll_d">
<Component Id="freethreaded_python_stable_d.dll" Directory="InstallDirectory" Guid="*">
<File Id="freethreaded_python_stable_d.dll" Name="python$(var.MajorVersionNumber)t_d.dll" KeyPath="yes" />
</Component>
<Component Id="freethreaded_python_d.dll" Directory="InstallDirectory" Guid="*">
<File Id="freethreaded_python_d.dll" Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber)_d.dll" KeyPath="yes" />
<File Id="freethreaded_python_d.pdb" Name="python$(var.MajorVersionNumber)$(var.MinorVersionNumber)_d.pdb" KeyPath="no" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="freethreaded_exe_d">
<Component Id="freethreaded_python_d.exe" Directory="InstallDirectory" Guid="*">
<File Name="python$(var.ShortVersion)t_d.exe" />
</Component>
<Component Id="freethreaded_python_d.pdb" Directory="InstallDirectory" Guid="*">
<File Name="python$(var.ShortVersion)t_d.pdb" />
</Component>
<Component Id="freethreaded_pythonw_d.exe" Directory="InstallDirectory" Guid="*">
<File Name="pythonw$(var.ShortVersion)t_d.exe" />
</Component>
<Component Id="freethreaded_pythonw_d.pdb" Directory="InstallDirectory" Guid="*">
<File Name="pythonw$(var.ShortVersion)t_d.pdb" />
</Component>
</ComponentGroup>
</Fragment>
<?define exts=pyexpat;select;unicodedata;winsound;_bz2;_elementtree;_socket;_ssl;_ctypes;_hashlib;_multiprocessing;_lzma;_decimal;_overlapped;_sqlite3;_asyncio;_queue;_uuid;_wmi;_zoneinfo;_testcapi;_ctypes_test;_testbuffer;_testimportmultiple;_testmultiphase;_testsinglephase;_testconsole;_testinternalcapi;_testclinic;_testclinic_limited ?>
<Fragment>
<DirectoryRef Id="Lib_venv_scripts_nt__freethreaded" />
<ComponentGroup Id="freethreaded_lib_extensions">
<?foreach ext in $(var.exts)?>
<Component Id="freethreaded_$(var.ext).pyd" Directory="DLLs" Guid="*">
<File Name="$(var.ext)$(var.FreethreadedPydTag).pyd" KeyPath="yes" />
</Component>
<?endforeach ?>
<Component Id="venvlaunchert.exe" Directory="Lib_venv_scripts_nt__freethreaded" Guid="*">
<File Name="venvlaunchert.exe" KeyPath="yes" />
</Component>
<Component Id="venvwlaunchert.exe" Directory="Lib_venv_scripts_nt__freethreaded" Guid="*">
<File Name="venvwlaunchert.exe" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<DirectoryRef Id="Lib_venv_scripts_nt__freethreaded" />
<ComponentGroup Id="freethreaded_lib_extensions_symbols">
<?foreach ext in $(var.exts)?>
<Component Id="freethreaded_$(var.ext).pdb" Directory="DLLs" Guid="*">
<File Name="$(var.ext)$(var.FreethreadedPydTag).pdb" />
</Component>
<?endforeach ?>
<Component Id="venvlaunchert.pdb" Directory="Lib_venv_scripts_nt__freethreaded" Guid="*">
<File Name="venvlaunchert.pdb" KeyPath="yes" />
</Component>
<Component Id="venvwlaunchert.pdb" Directory="Lib_venv_scripts_nt__freethreaded" Guid="*">
<File Name="venvwlaunchert.pdb" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<ComponentGroup Id="freethreaded_lib_extensions_d">
<?foreach ext in $(var.exts)?>
<Component Id="freethreaded_$(var.ext)_d.pyd" Directory="DLLs" Guid="*">
<File Name="$(var.ext)_d$(var.FreethreadedPydTag).pyd" />
</Component>
<Component Id="freethreaded_$(var.ext)_d.pdb" Directory="DLLs" Guid="*">
<File Name="$(var.ext)_d$(var.FreethreadedPydTag).pdb" />
</Component>
<?endforeach ?>
<Component Id="venvlauncher_d.exe" Directory="Lib_venv_scripts_nt__freethreaded" Guid="*">
<File Name="python_d.exe" Source="venvlauncher_d.exe" KeyPath="yes" />
</Component>
<Component Id="venvwlauncher_d.exe" Directory="Lib_venv_scripts_nt__freethreaded" Guid="*">
<File Name="pythonw_d.exe" Source="venvwlauncher_d.exe" KeyPath="yes" />
</Component>
<Component Id="venvlaunchert_d.pdb" Directory="Lib_venv_scripts_nt__freethreaded" Guid="*">
<File Name="venvlaunchert_d.pdb" KeyPath="yes" />
</Component>
<Component Id="venvwlaunchert_d.pdb" Directory="Lib_venv_scripts_nt__freethreaded" Guid="*">
<File Name="venvwlaunchert_d.pdb" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
<Fragment>
<PropertyRef Id="FREETHREADED_REGISTRYKEY" />
<ComponentGroup Id="freethreaded_lib_files">
<Component Id="PythonPathRegistry" Directory="Lib" Guid="*">
<RegistryKey Root="HKMU" Key="[FREETHREADED_REGISTRYKEY]">
<RegistryValue Key="PythonPath" Type="string" Value="[Lib];[DLLs]" />
</RegistryKey>
</Component>
</ComponentGroup>
</Fragment>
</Wix>

View file

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{E98E7539-64E7-4DCE-AACD-01E3ADE40EFD}</ProjectGuid>
<SchemaVersion>2.0</SchemaVersion>
<OutputName>freethreaded_pdb</OutputName>
<OutputType>Package</OutputType>
</PropertyGroup>
<Import Project="..\msi.props" />
<ItemGroup>
<Compile Include="freethreaded_pdb.wxs" />
<Compile Include="freethreaded_files.wxs" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="*.wxl" />
<WxlTemplate Include="*.wxl_template" />
</ItemGroup>
<Import Project="..\msi.targets" />
</Project>

View file

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="*" Language="!(loc.LCID)" Name="!(loc.TitlePdb)" Version="$(var.Version)" Manufacturer="!(loc.Manufacturer)" UpgradeCode="$(var.UpgradeCode)">
<Package InstallerVersion="500" Compressed="yes" InstallScope="perUser" />
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
<PropertyRef Id="UpgradeTable" />
<Feature Id="Symbols" AllowAdvertise="no" Title="!(loc.TitlePdb)" Description="!(loc.DescriptionPdb)">
<ComponentGroupRef Id="freethreaded_symbols" />
<ComponentGroupRef Id="freethreaded_lib_extensions_symbols" />
<ComponentRef Id="OptionalFeature" />
</Feature>
</Product>
</Wix>

View file

@ -26,10 +26,10 @@
<File Name="libffi-8.dll" KeyPath="yes" />
</Component>
<Component Id="venvlauncher.exe" Directory="Lib_venv_scripts_nt" Guid="*">
<File Name="python.exe" Source="venvlauncher.exe" KeyPath="yes" />
<File Name="venvlauncher.exe" KeyPath="yes" />
</Component>
<Component Id="venvwlauncher.exe" Directory="Lib_venv_scripts_nt" Guid="*">
<File Name="pythonw.exe" Source="venvwlauncher.exe" KeyPath="yes" />
<File Name="venvwlauncher.exe" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
@ -63,10 +63,10 @@
<File Name="libssl$(var.ssltag).pdb" KeyPath="yes" />
</Component>
<Component Id="venvlauncher.pdb" Directory="Lib_venv_scripts_nt__pdbs" Guid="*">
<File Name="python.pdb" Source="venvlauncher.pdb" KeyPath="yes" />
<File Name="venvlauncher.pdb" KeyPath="yes" />
</Component>
<Component Id="venvwlauncher.pdb" Directory="Lib_venv_scripts_nt__pdbs" Guid="*">
<File Name="pythonw.pdb" Source="venvwlauncher.pdb" KeyPath="yes" />
<File Name="venvwlauncher.pdb" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>
@ -100,10 +100,10 @@
<File Name="sqlite3_d.pdb" KeyPath="yes" />
</Component>
<Component Id="venvlauncher_d.exe" Directory="Lib_venv_scripts_nt__d" Guid="*">
<File Name="python_d.exe" Source="venvlauncher_d.exe" KeyPath="yes" />
<File Name="venvlauncher_d.exe" KeyPath="yes" />
</Component>
<Component Id="venvwlauncher_d.exe" Directory="Lib_venv_scripts_nt__d" Guid="*">
<File Name="pythonw_d.exe" Source="venvwlauncher_d.exe" KeyPath="yes" />
<File Name="venvwlauncher_d.exe" KeyPath="yes" />
</Component>
</ComponentGroup>
</Fragment>

View file

@ -24,14 +24,14 @@
This URI is used to generate the various GUIDs used by the installer.
Installers built with the same URI will upgrade each other or block
when attempting to downgrade.
By default, this is the local computer name, which will produce
installers that do not interfere with other installers. Products
that intend to bundle Python should rebuild these modules with their
own URI to avoid conflicting with the official releases.
The official releases use "https://www.python.org/$(ArchName)"
This is not the same as the DownloadUrl property used in the bundle
projects.
-->
@ -39,7 +39,7 @@
<ReleaseUri Condition="!$(ReleaseUri.EndsWith(`/`))">$(ReleaseUri)/</ReleaseUri>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)common.wxs" />
<WxlTemplate Include="$(MSBuildThisFileDirectory)\*.wxl_template" Condition="$(IgnoreCommonWxlTemplates) != 'true'" />
@ -63,13 +63,17 @@
<InstallerVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(Field3Value).0</InstallerVersion>
</PropertyGroup>
<PropertyGroup>
<IncludeFreethreaded Condition="$(IncludeFreethreaded) != 'true'">false</IncludeFreethreaded>
</PropertyGroup>
<PropertyGroup Condition="!$(BuildForRelease)">
<RevisionNumber Condition="'$(RevisionNumber)' == ''">$([System.Math]::Floor($([System.DateTime]::Now.Subtract($([System.DateTime]::new(2001, 1, 1))).TotalDays)))</RevisionNumber>
<PythonVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)dev$(RevisionNumber)</PythonVersion>
<InstallerVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(RevisionNumber).0</InstallerVersion>
</PropertyGroup>
<PropertyGroup>
<Bitness>32-bit</Bitness>
<Bitness Condition="$(Platform) == 'x64'">64-bit</Bitness>
@ -91,9 +95,12 @@
PyDebugExt=$(PyDebugExt);
PyArchExt=$(PyArchExt);
PyTestExt=$(PyTestExt);
PydTag=$(PydTag);
FreethreadedPydTag=$(FreethreadedPydTag);
OptionalFeatureName=$(OutputName);
ssltag=$(OpenSSLDLLSuffix);
Suffix32=$(PyArchExt);
IncludeFreethreaded=$(IncludeFreethreaded);
</DefineConstants>
<DefineConstants Condition="'$(CRTRedist)' != ''">
$(DefineConstants);CRTRedist=$(CRTRedist);
@ -139,7 +146,7 @@
<Error Text="Platform '$(Platform)' is not supported. Use 'x86', 'x64' or 'ARM64'."
Condition="$(Platform) != 'x86' and $(Platform) != 'x64' and $(Platform) != 'ARM64'" />
</Target>
<ItemGroup>
<_Uuid Include="CoreUpgradeCode">
<Uri>upgradecode</Uri>
@ -162,6 +169,12 @@
<_Uuid Include="PythonRegComponentGuid">
<Uri>registry/$(OutputName)</Uri>
</_Uuid>
<_Uuid Include="FreethreadedPythonExeComponentGuid" Condition="$(IncludeFreethreaded)">
<Uri>freethreaded/python.exe</Uri>
</_Uuid>
<_Uuid Include="FreethreadedPythonwExeComponentGuid" Condition="$(IncludeFreethreaded)">
<Uri>freethreaded/pythonw.exe</Uri>
</_Uuid>
</ItemGroup>
<Target Name="_GenerateGuids"
AfterTargets="PrepareForBuild"
@ -171,15 +184,15 @@
<_Uuids>@(_Uuid->'("%(Identity)", "$(MajorVersionNumber).$(MinorVersionNumber)/%(Uri)")',',')</_Uuids>
<_GenerateCommand>import uuid; print('\n'.join('{}={}'.format(i, uuid.uuid5(uuid.UUID('c8d9733e-a70c-43ff-ab0c-e26456f11083'), '$(ReleaseUri.Replace(`{arch}`, `$(ArchName)`))' + j)) for i,j in [$(_Uuids.Replace(`"`,`'`))]))</_GenerateCommand>
</PropertyGroup>
<Exec Command='$(PythonForBuild) -c "$(_GenerateCommand)" &gt; "$(IntermediateOutputPath)$(OutputName)guids.txt"'
WorkingDirectory="$(MSBuildThisFileDirectory)"
IgnoreExitCode="false" />
<ReadLinesFromFile File="$(IntermediateOutputPath)$(OutputName)guids.txt">
<Output TaskParameter="Lines" ItemName="_UuidValue" />
</ReadLinesFromFile>
<PropertyGroup>
<DefineConstants>$(DefineConstants);@(_UuidValue,';');</DefineConstants>
</PropertyGroup>