diff options
author | Jeremy Kloth <jeremy.kloth@gmail.com> | 2018-12-10 20:31:37 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2018-12-10 20:31:37 (GMT) |
commit | f04cc5fc0d2f644cccb57543aae487ee30091924 (patch) | |
tree | e04ca66062d71d0c6370180e42c3c88e947ad1c4 | |
parent | 3acf30de90936fe3714bb62873e2523c0440e652 (diff) | |
download | cpython-f04cc5fc0d2f644cccb57543aae487ee30091924.zip cpython-f04cc5fc0d2f644cccb57543aae487ee30091924.tar.gz cpython-f04cc5fc0d2f644cccb57543aae487ee30091924.tar.bz2 |
[3.6] bpo-35433: Properly detect installed SDK versions (GH-11009)
-rw-r--r-- | PCbuild/build.bat | 3 | ||||
-rw-r--r-- | PCbuild/python.props | 18 |
2 files changed, 14 insertions, 7 deletions
diff --git a/PCbuild/build.bat b/PCbuild/build.bat index 5828b51..0df64ee 100644 --- a/PCbuild/build.bat +++ b/PCbuild/build.bat @@ -141,4 +141,5 @@ goto :eof :Version rem Display the current build version information -%MSBUILD% "%dir%python.props" /t:ShowVersionInfo /v:m /nologo %1 %2 %3 %4 %5 %6 %7 %8 %9 +call "%dir%find_msbuild.bat" %MSBUILD% +if not ERRORLEVEL 1 %MSBUILD% "%dir%pythoncore.vcxproj" /t:ShowVersionInfo /v:m /nologo %1 %2 %3 %4 %5 %6 %7 %8 %9 diff --git a/PCbuild/python.props b/PCbuild/python.props index 570f7fa..b29669b 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -74,12 +74,17 @@ possible version). Since we limit WINVER to Windows 7 anyway, it doesn't really matter which WinSDK version we use. --> - <_RegistryVersion>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)</_RegistryVersion> - <_RegistryVersion Condition="$(_RegistryVersion) == ''">$(Registry:HKEY_LOCAL_MACHINE\WOW6432Node\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)</_RegistryVersion> - <DefaultWindowsSDKVersion>10.0.15063.0</DefaultWindowsSDKVersion> - <DefaultWindowsSDKVersion Condition="$(_RegistryVersion) == '10.0.14393'">10.0.14393.0</DefaultWindowsSDKVersion> - <DefaultWindowsSDKVersion Condition="$(_RegistryVersion) == '10.0.10586'">10.0.10586.0</DefaultWindowsSDKVersion> - <DefaultWindowsSDKVersion Condition="$(_RegistryVersion) == '10.0.10240'">10.0.10240.0</DefaultWindowsSDKVersion> + <_KitsRoot>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@InstallationFolder)</_KitsRoot> + <_KitsRoot Condition="$(_KitsRoot) == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@InstallationFolder)</_KitsRoot> + + <!-- The minimum allowed SDK version to use for building --> + <DefaultWindowsSDKVersion>10.0.10586.0</DefaultWindowsSDKVersion> + <DefaultWindowsSDKVersion Condition="Exists('$(_KitsRoot)\Platforms\UAP\10.0.14393.0')">10.0.14393.0</DefaultWindowsSDKVersion> + <DefaultWindowsSDKVersion Condition="Exists('$(_KitsRoot)\Platforms\UAP\10.0.15063.0')">10.0.15063.0</DefaultWindowsSDKVersion> + </PropertyGroup> + + <PropertyGroup Condition="$(WindowsTargetPlatformVersion) == ''"> + <WindowsTargetPlatformVersion>$(DefaultWindowsSDKVersion)</WindowsTargetPlatformVersion> </PropertyGroup> <PropertyGroup Condition="'$(OverrideVersion)' == ''"> @@ -187,5 +192,6 @@ <Message Importance="high" Text="Field3Value: $(Field3Value)" /> <Message Importance="high" Text="SysWinVer: $(SysWinVer)" /> <Message Importance="high" Text="PyDllName: $(PyDllName)" /> + <Message Importance="high" Text="WindowsSdkVersion: $(TargetPlatformVersion)" /> </Target> </Project> |