Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 1 | <?xml version="1.0" encoding="utf-8"?> |
Steve Dower | 21a92f8 | 2019-06-14 08:29:20 -0700 | [diff] [blame] | 2 | <Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 3 | <PropertyGroup> |
Steve Dower | 21a92f8 | 2019-06-14 08:29:20 -0700 | [diff] [blame] | 4 | <__Python_Props_Imported>true</__Python_Props_Imported> |
Steve Dower | bb24087 | 2015-02-05 22:08:48 -0800 | [diff] [blame] | 5 | <Platform Condition="'$(Platform)' == ''">Win32</Platform> |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 6 | <Configuration Condition="'$(Configuration)' == ''">Release</Configuration> |
| 7 | <!-- |
| 8 | Use the latest available version of Visual Studio to build. To override |
| 9 | this and build with an earlier version, pass "/p:PlatformToolset=v100" |
| 10 | (for example) when building. |
Zachary Ware | 4c5ad94 | 2016-01-29 19:08:55 -0600 | [diff] [blame] | 11 | |
| 12 | We set BasePlatformToolset for ICC's benefit, it's otherwise ignored. |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 13 | --> |
Paul Monson | 04856c2 | 2019-06-11 15:03:17 -0700 | [diff] [blame] | 14 | <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and ('$(MSBuildToolsVersion)' == '16.0' or '$(VisualStudioVersion)' == '16.0')">v142</BasePlatformToolset> |
Steve Dower | 5fcd5e6 | 2017-09-06 10:01:38 -0700 | [diff] [blame] | 15 | <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and ('$(MSBuildToolsVersion)' == '15.0' or '$(VisualStudioVersion)' == '15.0')">v141</BasePlatformToolset> |
Zachary Ware | 4c5ad94 | 2016-01-29 19:08:55 -0600 | [diff] [blame] | 16 | <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath14)' != ''">v140</BasePlatformToolset> |
| 17 | <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath12)' != ''">v120</BasePlatformToolset> |
| 18 | <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath11)' != ''">v110</BasePlatformToolset> |
| 19 | <BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath10)' != ''">v100</BasePlatformToolset> |
| 20 | |
| 21 | <PlatformToolset Condition="'$(PlatformToolset)' == ''">$(BasePlatformToolset)</PlatformToolset> |
| 22 | <ICCBuild>false</ICCBuild> |
| 23 | <ICCBuild Condition="$(PlatformToolset.StartsWith(`Intel C++ Compiler`))">true</ICCBuild> |
| 24 | |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 25 | <!-- |
| 26 | Convincing MSVC/MSBuild to prefer our platform names is too difficult, |
| 27 | so we define our own constant ArchName and use wherever we need it. |
| 28 | --> |
| 29 | <ArchName Condition="'$(ArchName)' == '' and $(Platform) == 'x64'">amd64</ArchName> |
Paul Monson | 8a1657b | 2019-02-14 08:31:30 -0800 | [diff] [blame] | 30 | <ArchName Condition="'$(ArchName)' == '' and $(Platform) == 'ARM'">arm32</ArchName> |
Paul Monson | fb7e750 | 2019-05-15 15:38:55 -0700 | [diff] [blame] | 31 | <ArchName Condition="'$(ArchName)' == '' and $(Platform) == 'ARM64'">arm64</ArchName> |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 32 | <ArchName Condition="'$(ArchName)' == ''">win32</ArchName> |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 33 | |
| 34 | <!-- Root directory of the repository --> |
| 35 | <PySourcePath Condition="'$(PySourcePath)' == ''">$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)\..\))</PySourcePath> |
| 36 | <PySourcePath Condition="!HasTrailingSlash($(PySourcePath))">$(PySourcePath)\</PySourcePath> |
| 37 | |
| 38 | <!-- Directory where build outputs are put --> |
Stefan Grönke | f1502d0 | 2017-09-25 18:58:10 +0200 | [diff] [blame] | 39 | <BuildPath32 Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCbuild\win32\</BuildPath32> |
Steve Dower | 6fd76bc | 2016-07-16 16:13:19 -0700 | [diff] [blame] | 40 | <BuildPath32 Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\win32\</BuildPath32> |
Stefan Grönke | f1502d0 | 2017-09-25 18:58:10 +0200 | [diff] [blame] | 41 | <BuildPath64 Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCbuild\amd64\</BuildPath64> |
Steve Dower | 6fd76bc | 2016-07-16 16:13:19 -0700 | [diff] [blame] | 42 | <BuildPath64 Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\amd64\</BuildPath64> |
Paul Monson | 8a1657b | 2019-02-14 08:31:30 -0800 | [diff] [blame] | 43 | <BuildPathArm32 Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCbuild\arm32\</BuildPathArm32> |
| 44 | <BuildPathArm32 Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\arm32\</BuildPathArm32> |
Paul Monson | f96e7fd | 2019-05-17 10:07:24 -0700 | [diff] [blame] | 45 | <BuildPathArm64 Condition="'$(Py_OutDir)' == ''">$(PySourcePath)PCbuild\arm64\</BuildPathArm64> |
| 46 | <BuildPathArm64 Condition="'$(Py_OutDir)' != ''">$(Py_OutDir)\arm64\</BuildPathArm64> |
Steve Dower | 6fd76bc | 2016-07-16 16:13:19 -0700 | [diff] [blame] | 47 | <BuildPath Condition="'$(ArchName)' == 'win32'">$(BuildPath32)</BuildPath> |
| 48 | <BuildPath Condition="'$(ArchName)' == 'amd64'">$(BuildPath64)</BuildPath> |
Paul Monson | 8a1657b | 2019-02-14 08:31:30 -0800 | [diff] [blame] | 49 | <BuildPath Condition="'$(ArchName)' == 'arm32'">$(BuildPathArm32)</BuildPath> |
Paul Monson | f96e7fd | 2019-05-17 10:07:24 -0700 | [diff] [blame] | 50 | <BuildPath Condition="'$(ArchName)' == 'arm64'">$(BuildPathArm64)</BuildPath> |
Stefan Grönke | f1502d0 | 2017-09-25 18:58:10 +0200 | [diff] [blame] | 51 | <BuildPath Condition="'$(BuildPath)' == ''">$(PySourcePath)PCbuild\$(ArchName)\</BuildPath> |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 52 | <BuildPath Condition="!HasTrailingSlash($(BuildPath))">$(BuildPath)\</BuildPath> |
Steve Dower | 5fcd5e6 | 2017-09-06 10:01:38 -0700 | [diff] [blame] | 53 | <BuildPath Condition="$(Configuration) == 'PGInstrument'">$(BuildPath)instrumented\</BuildPath> |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 54 | |
| 55 | <!-- Directories of external projects. tcltk is handled in tcltk.props --> |
Steve Dower | 01423cb | 2018-02-17 18:59:03 -0800 | [diff] [blame] | 56 | <ExternalsDir>$(EXTERNALS_DIR)</ExternalsDir> |
| 57 | <ExternalsDir Condition="$(ExternalsDir) == ''">$([System.IO.Path]::GetFullPath(`$(PySourcePath)externals`))</ExternalsDir> |
| 58 | <ExternalsDir Condition="!HasTrailingSlash($(ExternalsDir))">$(ExternalsDir)\</ExternalsDir> |
Erlend Egeberg Aasland | dd74c01 | 2021-01-05 23:01:56 +0100 | [diff] [blame] | 59 | <sqlite3Dir>$(ExternalsDir)sqlite-3.34.0.0\</sqlite3Dir> |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 60 | <bz2Dir>$(ExternalsDir)bzip2-1.0.6\</bz2Dir> |
Zachary Ware | 16c18a3 | 2016-09-11 21:18:07 -0500 | [diff] [blame] | 61 | <lzmaDir>$(ExternalsDir)xz-5.2.2\</lzmaDir> |
Paul Monson | 32119e1 | 2019-03-29 16:30:10 -0700 | [diff] [blame] | 62 | <libffiDir>$(ExternalsDir)libffi\</libffiDir> |
| 63 | <libffiOutDir>$(ExternalsDir)libffi\$(ArchName)\</libffiOutDir> |
| 64 | <libffiIncludeDir>$(libffiOutDir)include</libffiIncludeDir> |
Steve Dower | afb7144 | 2021-01-05 21:35:01 +0000 | [diff] [blame] | 65 | <opensslDir>$(ExternalsDir)openssl-1.1.1i\</opensslDir> |
| 66 | <opensslOutDir>$(ExternalsDir)openssl-bin-1.1.1i\$(ArchName)\</opensslOutDir> |
Steve Dower | 68d663c | 2017-07-17 11:15:48 +0200 | [diff] [blame] | 67 | <opensslIncludeDir>$(opensslOutDir)include</opensslIncludeDir> |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 68 | <nasmDir>$(ExternalsDir)\nasm-2.11.06\</nasmDir> |
Zachary Ware | d01db1c | 2017-09-06 17:29:37 -0700 | [diff] [blame] | 69 | <zlibDir>$(ExternalsDir)\zlib-1.2.11\</zlibDir> |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 70 | |
| 71 | <!-- Suffix for all binaries when building for debug --> |
| 72 | <PyDebugExt Condition="'$(PyDebugExt)' == '' and $(Configuration) == 'Debug'">_d</PyDebugExt> |
| 73 | |
Steve Dower | 940f6a8 | 2015-10-31 12:17:11 -0700 | [diff] [blame] | 74 | <!-- Suffix for versions/keys when building with test markers --> |
| 75 | <PyTestExt Condition="$(UseTestMarker) == 'true'">-test</PyTestExt> |
| 76 | |
| 77 | <!-- Suffix for versions/keys when building for particular platforms --> |
| 78 | <PyArchExt Condition="'$(ArchName)' == 'win32'">-32</PyArchExt> |
Paul Monson | 8a1657b | 2019-02-14 08:31:30 -0800 | [diff] [blame] | 79 | <PyArchExt Condition="'$(ArchName)' == 'arm32'">-arm32</PyArchExt> |
Paul Monson | f96e7fd | 2019-05-17 10:07:24 -0700 | [diff] [blame] | 80 | <PyArchExt Condition="'$(ArchName)' == 'arm64'">-arm64</PyArchExt> |
Steve Dower | 940f6a8 | 2015-10-31 12:17:11 -0700 | [diff] [blame] | 81 | |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 82 | <!-- Full path of the resulting python.exe binary --> |
| 83 | <PythonExe Condition="'$(PythonExe)' == ''">$(BuildPath)python$(PyDebugExt).exe</PythonExe> |
Steve Dower | 12f1c72 | 2019-06-19 13:07:23 -0700 | [diff] [blame] | 84 | |
| 85 | <!-- Include Tkinter by default --> |
| 86 | <IncludeTkinter Condition="'$(IncludeTkinter)' == ''">true</IncludeTkinter> |
Steve Dower | 4943749 | 2015-07-08 20:18:44 -0700 | [diff] [blame] | 87 | </PropertyGroup> |
| 88 | |
Paul Monson | 8a1657b | 2019-02-14 08:31:30 -0800 | [diff] [blame] | 89 | <PropertyGroup Condition="'$(Platform)'=='ARM'" Label="ArmConfiguration"> |
| 90 | <WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport> |
| 91 | </PropertyGroup> |
| 92 | |
Paul Monson | f96e7fd | 2019-05-17 10:07:24 -0700 | [diff] [blame] | 93 | <PropertyGroup Condition="'$(Platform)'=='ARM64'" Label="Arm64Configuration"> |
| 94 | <WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport> |
| 95 | </PropertyGroup> |
| 96 | |
Steve Dower | 9b33bf5 | 2017-05-23 16:25:25 -0700 | [diff] [blame] | 97 | <PropertyGroup Condition="$(DefaultWindowsSDKVersion) == ''"> |
| 98 | <!-- |
| 99 | Attempt to select the latest installed WinSDK. If we don't find any, then we will |
| 100 | let the MSBuild targets determine which one it wants to use (typically the earliest |
| 101 | possible version). Since we limit WINVER to Windows 7 anyway, it doesn't really |
| 102 | matter which WinSDK version we use. |
| 103 | --> |
Steve Dower | 30f4fa4 | 2017-11-06 12:52:09 -0800 | [diff] [blame] | 104 | <_RegistryVersion>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)</_RegistryVersion> |
Isuru Fernando | aedc273 | 2019-03-21 12:52:57 -0500 | [diff] [blame] | 105 | <_RegistryVersion Condition="$(_RegistryVersion) == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)</_RegistryVersion> |
Jeremy Kloth | f46eccd | 2018-12-09 20:59:32 -0700 | [diff] [blame] | 106 | <!-- Sometimes the version in the registry has to .0 suffix, and sometimes it doesn't. Check and add it --> |
| 107 | <_RegistryVersion Condition="$(_RegistryVersion) != '' and !$(_RegistryVersion.EndsWith('.0'))">$(_RegistryVersion).0</_RegistryVersion> |
| 108 | |
| 109 | <!-- The minimum allowed SDK version to use for building --> |
| 110 | <DefaultWindowsSDKVersion>10.0.10586.0</DefaultWindowsSDKVersion> |
| 111 | <DefaultWindowsSDKVersion Condition="$([System.Version]::Parse($(_RegistryVersion))) > $([System.Version]::Parse($(DefaultWindowsSDKVersion)))">$(_RegistryVersion)</DefaultWindowsSDKVersion> |
Steve Dower | 9b33bf5 | 2017-05-23 16:25:25 -0700 | [diff] [blame] | 112 | </PropertyGroup> |
| 113 | |
Jeremy Kloth | f46eccd | 2018-12-09 20:59:32 -0700 | [diff] [blame] | 114 | <PropertyGroup Condition="$(WindowsTargetPlatformVersion) == ''"> |
| 115 | <WindowsTargetPlatformVersion>$(DefaultWindowsSDKVersion)</WindowsTargetPlatformVersion> |
| 116 | </PropertyGroup> |
| 117 | |
Steve Dower | 4943749 | 2015-07-08 20:18:44 -0700 | [diff] [blame] | 118 | <PropertyGroup Condition="'$(OverrideVersion)' == ''"> |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 119 | <!-- |
| 120 | Read version information from Include\patchlevel.h. The following properties are set: |
| 121 | |
| 122 | MajorVersionNumber - the '3' in '3.5.2a1' |
| 123 | MinorVersionNumber - the '5' in '3.5.2a1' |
| 124 | MicroVersionNumber - the '2' in '3.5.2a1' |
| 125 | ReleaseSerial - the '1' in '3.5.2a1' |
| 126 | ReleaseLevelName - the 'a1' in '3.5.2a1' |
| 127 | PythonVersionNumber - '3.5.2' for '3.5.2a1' |
| 128 | PythonVersion - '3.5.2a1' |
| 129 | PythonVersionHex - 0x030502a1 for '3.5.2a1' |
| 130 | ReleaseLevelNumber - 10 for alpha, 11 for beta, 12 for RC (gamma), and 15 for final |
| 131 | Field3Value - 2101 for '3.5.2a1' (== 1000*2 + 10*10 ('a') + 1) |
| 132 | --> |
| 133 | <_PatchLevelContent>$([System.IO.File]::ReadAllText(`$(PySourcePath)Include\patchlevel.h`))</_PatchLevelContent> |
| 134 | <MajorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MAJOR_VERSION\s+(\d+)`).Groups[1].Value)</MajorVersionNumber> |
| 135 | <MinorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MINOR_VERSION\s+(\d+)`).Groups[1].Value)</MinorVersionNumber> |
| 136 | <MicroVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_MICRO_VERSION\s+(\d+)`).Groups[1].Value)</MicroVersionNumber> |
| 137 | <_ReleaseLevel>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_RELEASE_LEVEL\s+PY_RELEASE_LEVEL_(\w+)`).Groups[1].Value)</_ReleaseLevel> |
| 138 | <ReleaseSerial>$([System.Text.RegularExpressions.Regex]::Match($(_PatchLevelContent), `define\s+PY_RELEASE_SERIAL\s+(\d+)`).Groups[1].Value)</ReleaseSerial> |
| 139 | <ReleaseLevelNumber>15</ReleaseLevelNumber> |
| 140 | <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'ALPHA'">10</ReleaseLevelNumber> |
| 141 | <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'BETA'">11</ReleaseLevelNumber> |
| 142 | <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'GAMMA'">12</ReleaseLevelNumber> |
| 143 | <ReleaseLevelName Condition="$(_ReleaseLevel) == 'ALPHA'">a$(ReleaseSerial)</ReleaseLevelName> |
| 144 | <ReleaseLevelName Condition="$(_ReleaseLevel) == 'BETA'">b$(ReleaseSerial)</ReleaseLevelName> |
| 145 | <ReleaseLevelName Condition="$(_ReleaseLevel) == 'GAMMA'">rc$(ReleaseSerial)</ReleaseLevelName> |
Steve Dower | 4943749 | 2015-07-08 20:18:44 -0700 | [diff] [blame] | 146 | </PropertyGroup> |
| 147 | |
| 148 | <PropertyGroup Condition="'$(OverrideVersion)' != ''"> |
| 149 | <!-- |
| 150 | Override the version number when building by specifying OverrideVersion. |
| 151 | For example: |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 152 | |
Stefan Grönke | f1502d0 | 2017-09-25 18:58:10 +0200 | [diff] [blame] | 153 | PCbuild\build.bat "/p:OverrideVersion=3.5.2a1" |
Steve Dower | 4943749 | 2015-07-08 20:18:44 -0700 | [diff] [blame] | 154 | |
| 155 | Use the -V option to check your version is valid: |
| 156 | |
Stefan Grönke | f1502d0 | 2017-09-25 18:58:10 +0200 | [diff] [blame] | 157 | PCbuild\build.bat -V "/p:OverrideVersion=3.5.2a1" |
Steve Dower | 4943749 | 2015-07-08 20:18:44 -0700 | [diff] [blame] | 158 | PythonVersionNumber: 3.5.2 |
| 159 | PythonVersion: 3.5.2a1 |
| 160 | PythonVersionHex: 0x030502A1 |
| 161 | Field3Value: 2101 |
| 162 | |
| 163 | Note that this only affects the version numbers embedded in resources and |
| 164 | installers, but not sys.version. |
| 165 | --> |
| 166 | <MajorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[1].Value)</MajorVersionNumber> |
| 167 | <MinorVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[2].Value)</MinorVersionNumber> |
| 168 | <MicroVersionNumber>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[3].Value)</MicroVersionNumber> |
| 169 | <ReleaseLevelName>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[4].Value)</ReleaseLevelName> |
| 170 | <_ReleaseLevel>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[5].Value)</_ReleaseLevel> |
| 171 | <ReleaseSerial>$([System.Text.RegularExpressions.Regex]::Match($(OverrideVersion), `(\d+)\.(\d+)\.(\d+)((a|b|rc)(\d))?`).Groups[6].Value)</ReleaseSerial> |
| 172 | <ReleaseSerial Condition="'$(ReleaseSerial)' == ''">0</ReleaseSerial> |
| 173 | <ReleaseLevelNumber>15</ReleaseLevelNumber> |
| 174 | <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'a'">10</ReleaseLevelNumber> |
| 175 | <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'b'">11</ReleaseLevelNumber> |
| 176 | <ReleaseLevelNumber Condition="$(_ReleaseLevel) == 'rc'">12</ReleaseLevelNumber> |
| 177 | </PropertyGroup> |
| 178 | |
| 179 | <PropertyGroup> |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 180 | <PythonVersionNumber>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)</PythonVersionNumber> |
| 181 | <PythonVersion>$(MajorVersionNumber).$(MinorVersionNumber).$(MicroVersionNumber)$(ReleaseLevelName)</PythonVersion> |
| 182 | <PythonVersionHex>$([msbuild]::BitwiseOr( |
| 183 | $([msbuild]::Multiply($(MajorVersionNumber), 16777216)), |
| 184 | $([msbuild]::BitwiseOr( |
| 185 | $([msbuild]::Multiply($(MinorVersionNumber), 65536)), |
| 186 | $([msbuild]::BitwiseOr( |
| 187 | $([msbuild]::Multiply($(MicroVersionNumber), 256)), |
| 188 | $([msbuild]::BitwiseOr( |
| 189 | $([msbuild]::Multiply($(ReleaseLevelNumber), 16)), |
| 190 | $(ReleaseSerial) |
| 191 | )) |
| 192 | )) |
| 193 | )) |
| 194 | ))</PythonVersionHex> |
| 195 | <Field3Value>$([msbuild]::Add( |
| 196 | $(ReleaseSerial), |
| 197 | $([msbuild]::Add( |
| 198 | $([msbuild]::Multiply($(ReleaseLevelNumber), 10)), |
| 199 | $([msbuild]::Multiply($(MicroVersionNumber), 1000)) |
| 200 | )) |
| 201 | ))</Field3Value> |
Steve Dower | 940f6a8 | 2015-10-31 12:17:11 -0700 | [diff] [blame] | 202 | <Field3Value Condition="$(UseTestMarker) == 'true'">$([msbuild]::Add($(Field3Value), 9000))</Field3Value> |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 203 | |
| 204 | <!-- The name of the resulting pythonXY.dll (without the extension) --> |
| 205 | <PyDllName>python$(MajorVersionNumber)$(MinorVersionNumber)$(PyDebugExt)</PyDllName> |
Steve Dower | dcbaa1b | 2020-07-06 17:32:00 +0100 | [diff] [blame] | 206 | <!-- The name of the resulting pythonX.dll (without the extension) --> |
| 207 | <Py3DllName>python3$(PyDebugExt)</Py3DllName> |
Steve Dower | 03a144b | 2014-12-15 20:45:23 -0800 | [diff] [blame] | 208 | |
| 209 | <!-- The version and platform tag to include in .pyd filenames --> |
Steve Dower | 940f6a8 | 2015-10-31 12:17:11 -0700 | [diff] [blame] | 210 | <PydTag Condition="$(ArchName) == 'win32'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win32</PydTag> |
Paul Monson | 8a1657b | 2019-02-14 08:31:30 -0800 | [diff] [blame] | 211 | <PydTag Condition="$(ArchName) == 'arm32'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win_arm32</PydTag> |
Paul Monson | f96e7fd | 2019-05-17 10:07:24 -0700 | [diff] [blame] | 212 | <PydTag Condition="$(ArchName) == 'arm64'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win_arm64</PydTag> |
Steve Dower | 940f6a8 | 2015-10-31 12:17:11 -0700 | [diff] [blame] | 213 | <PydTag Condition="$(ArchName) == 'amd64'">.cp$(MajorVersionNumber)$(MinorVersionNumber)-win_amd64</PydTag> |
Steve Dower | 2587952 | 2015-01-15 09:10:16 -0800 | [diff] [blame] | 214 | |
| 215 | <!-- The version number for sys.winver --> |
Steve Dower | 940f6a8 | 2015-10-31 12:17:11 -0700 | [diff] [blame] | 216 | <SysWinVer>$(MajorVersionNumber).$(MinorVersionNumber)$(PyArchExt)$(PyTestExt)</SysWinVer> |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 217 | </PropertyGroup> |
| 218 | |
| 219 | <!-- Displays the calculated version info --> |
| 220 | <Target Name="ShowVersionInfo"> |
| 221 | <Message Importance="high" Text="PythonVersionNumber: $(PythonVersionNumber)" /> |
| 222 | <Message Importance="high" Text="PythonVersion: $(PythonVersion)" /> |
Steve Dower | 4943749 | 2015-07-08 20:18:44 -0700 | [diff] [blame] | 223 | <Message Importance="high" Text="PythonVersionHex: 0x$([System.UInt32]::Parse($(PythonVersionHex)).ToString(`X08`))" /> |
Steve Dower | 21a92f8 | 2019-06-14 08:29:20 -0700 | [diff] [blame] | 224 | <Message Importance="high" Text="PythonVersionUnique: $(MajorVersionNumber).$(MinorVersionNumber).$(Field3Value)" /> |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 225 | <Message Importance="high" Text="Field3Value: $(Field3Value)" /> |
Steve Dower | 940f6a8 | 2015-10-31 12:17:11 -0700 | [diff] [blame] | 226 | <Message Importance="high" Text="SysWinVer: $(SysWinVer)" /> |
| 227 | <Message Importance="high" Text="PyDllName: $(PyDllName)" /> |
Jeremy Kloth | f46eccd | 2018-12-09 20:59:32 -0700 | [diff] [blame] | 228 | <Message Importance="high" Text="WindowsSdkVersion: $(TargetPlatformVersion)" /> |
Steve Dower | 65e4cb1 | 2014-11-22 12:54:57 -0800 | [diff] [blame] | 229 | </Target> |
| 230 | </Project> |