diff options
author | Steve Dower <steve.dower@microsoft.com> | 2018-12-11 02:52:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-11 02:52:57 (GMT) |
commit | 0cd6391fd890368ea1743dac50c366b42f2fd126 (patch) | |
tree | 1e2d8fd6c85a08477d3eb4082badd9a50386e63e /PCbuild/find_msbuild.bat | |
parent | 1c3de541e64f75046b20cdd27bada1557e550bcd (diff) | |
download | cpython-0cd6391fd890368ea1743dac50c366b42f2fd126.zip cpython-0cd6391fd890368ea1743dac50c366b42f2fd126.tar.gz cpython-0cd6391fd890368ea1743dac50c366b42f2fd126.tar.bz2 |
bpo-34977: Add Windows App Store package (GH-11027)
Also adds the PC/layout script for generating layouts on Windows.
Diffstat (limited to 'PCbuild/find_msbuild.bat')
-rw-r--r-- | PCbuild/find_msbuild.bat | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/PCbuild/find_msbuild.bat b/PCbuild/find_msbuild.bat index 57512a0..a2810f0 100644 --- a/PCbuild/find_msbuild.bat +++ b/PCbuild/find_msbuild.bat @@ -29,6 +29,16 @@ @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 and later provide vswhere.exe, which can be used +@if not exist "%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" goto :skip_vswhere +@set _Py_MSBuild_Root= +@for /F "tokens=*" %%i in ('"%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" -property installationPath -latest') DO @(set _Py_MSBuild_Root=%%i\MSBuild) +@if not defined _Py_MSBuild_Root goto :skip_vswhere +@for %%j in (Current 15.0) DO @if exist "%_Py_MSBuild_Root%\%%j\Bin\msbuild.exe" (set MSBUILD="%_Py_MSBuild_Root%\%%j\Bin\msbuild.exe") +@set _Py_MSBuild_Root= +@if defined MSBUILD @if exist %MSBUILD% (set _Py_MSBuild_Source=Visual Studio installation) & goto :found +:skip_vswhere + @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 @( |