From 32daaf57d98434c5a121cfc22d0459c2c9841cfc Mon Sep 17 00:00:00 2001 From: Jeremy Kloth Date: Sun, 9 Dec 2018 20:59:32 -0700 Subject: [PATCH] bpo-35433: Properly detect installed SDK versions (GH-11009) --- PCbuild/build.bat | 3 ++- PCbuild/python.props | 15 +++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/PCbuild/build.bat b/PCbuild/build.bat index 5828b518b11aa99..0df64ee6e14329b 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 570f7fa883458a5..97a0d22aed0ef41 100644 --- a/PCbuild/python.props +++ b/PCbuild/python.props @@ -76,10 +76,16 @@ --> <_RegistryVersion>$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) <_RegistryVersion Condition="$(_RegistryVersion) == ''">$(Registry:HKEY_LOCAL_MACHINE\WOW6432Node\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion) - 10.0.15063.0 - 10.0.14393.0 - 10.0.10586.0 - 10.0.10240.0 + + <_RegistryVersion Condition="$(_RegistryVersion) != '' and !$(_RegistryVersion.EndsWith('.0'))">$(_RegistryVersion).0 + + + 10.0.10586.0 + $(_RegistryVersion) + + + + $(DefaultWindowsSDKVersion) @@ -187,5 +193,6 @@ +