summaryrefslogtreecommitdiff
path: root/PCbuild
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-02-27 22:30:48 -0800
committerGitHub <noreply@github.com>2018-02-27 22:30:48 -0800
commitcefbd0101d4fd0a258be0c182cf27609ad26c100 (patch)
tree593cec2a7843cf363708e70136932302709638a8 /PCbuild
parentb2df4a006a756a494d33bccf06b44927a9a78297 (diff)
downloadcpython-git-cefbd0101d4fd0a258be0c182cf27609ad26c100.tar.gz
Minor improvements to the Windows build/release process (GH-5935)
(cherry picked from commit 881323db717f9b6ffe30d14104a2925c77f28db7) Co-authored-by: Steve Dower <steve.dower@microsoft.com>
Diffstat (limited to 'PCbuild')
-rw-r--r--PCbuild/find_msbuild.bat15
1 files changed, 7 insertions, 8 deletions
diff --git a/PCbuild/find_msbuild.bat b/PCbuild/find_msbuild.bat
index 2b7413fbcd..1877906e00 100644
--- a/PCbuild/find_msbuild.bat
+++ b/PCbuild/find_msbuild.bat
@@ -29,14 +29,6 @@
@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 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 @(
@@ -44,6 +36,13 @@
)
@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.
+@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
+
@exit /b 1