diff options
author | Steve Dower <steve.dower@microsoft.com> | 2017-07-17 09:15:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-17 09:15:48 (GMT) |
commit | 68d663cf85d1ac5eaf83482eed39c0a6f8093601 (patch) | |
tree | fe26ff995655c31aca2d5c0f7bc4f8048cca5cc4 /PCbuild/find_msbuild.bat | |
parent | 49f6449ef4b81537c19b82329caaf60596c516c2 (diff) | |
download | cpython-68d663cf85d1ac5eaf83482eed39c0a6f8093601.zip cpython-68d663cf85d1ac5eaf83482eed39c0a6f8093601.tar.gz cpython-68d663cf85d1ac5eaf83482eed39c0a6f8093601.tar.bz2 |
[bpo-30916] Pre-build OpenSSL and Tcl/Tk for Windows (#2688)
Updates ssl and tkinter projects to use pre-built externals
Diffstat (limited to 'PCbuild/find_msbuild.bat')
-rw-r--r-- | PCbuild/find_msbuild.bat | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/PCbuild/find_msbuild.bat b/PCbuild/find_msbuild.bat index 1877906..2b7413f 100644 --- a/PCbuild/find_msbuild.bat +++ b/PCbuild/find_msbuild.bat @@ -29,20 +29,21 @@ @where msbuild > "%TEMP%\msbuild.loc" 2> nul && set /P MSBUILD= < "%TEMP%\msbuild.loc" & del "%TEMP%\msbuild.loc" @if exist "%MSBUILD%" set MSBUILD="%MSBUILD%" & (set _Py_MSBuild_Source=PATH) & goto :found -@rem VS 2017 sets exactly one install as the "main" install, so we may find MSBuild in there. -@reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v 15.0 /reg:32 >nul 2>nul -@if NOT ERRORLEVEL 1 @for /F "tokens=1,2*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v 15.0 /reg:32') DO @( - @if "%%i"=="15.0" @if exist "%%k\MSBuild\15.0\Bin\msbuild.exe" @(set MSBUILD="%%k\MSBuild\15.0\Bin\msbuild.exe") -) -@if exist %MSBUILD% (set _Py_MSBuild_Source=Visual Studio 2017 registry) & goto :found - @rem VS 2015 and earlier register MSBuild separately, so we can find it. +@rem Prefer MSBuild 14.0 over MSBuild 15.0, since the latter may not be able to find a VC14 install. @reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v MSBuildToolsPath /reg:32 >nul 2>nul @if NOT ERRORLEVEL 1 @for /F "tokens=1,2*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v MSBuildToolsPath /reg:32') DO @( @if "%%i"=="MSBuildToolsPath" @if exist "%%k\msbuild.exe" @(set MSBUILD="%%k\msbuild.exe") ) @if exist %MSBUILD% (set _Py_MSBuild_Source=registry) & goto :found +@rem VS 2017 sets exactly one install as the "main" install, so we may find MSBuild in there. +@reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v 15.0 /reg:32 >nul 2>nul +@if NOT ERRORLEVEL 1 @for /F "tokens=1,2*" %%i in ('reg query "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\SxS\VS7" /v 15.0 /reg:32') DO @( + @if "%%i"=="15.0" @if exist "%%k\MSBuild\15.0\Bin\msbuild.exe" @(set MSBUILD="%%k\MSBuild\15.0\Bin\msbuild.exe") +) +@if exist %MSBUILD% (set _Py_MSBuild_Source=Visual Studio 2017 registry) & goto :found + @exit /b 1 |