2 @REM Windows batch file to
find the Visual Studio
set up script
4 @REM Copyright
(c
) 2013-2014, ARM Limited. All rights reserved.
6 @REM SPDX
-License
-Identifier
: BSD
-2-Clause
-Patent
13 if /I
"%1"=="VS2017" goto VS2017Vars
14 if /I
"%1"=="VS2015" goto VS2015Vars
15 if /I
"%1"=="VS2013" goto VS2013Vars
16 if /I
"%1"=="VS2012" goto VS2012Vars
19 for /f
"usebackq tokens=1* delims=: " %%i in
(`
%*`
) do (
20 if /i
"%%i"=="installationPath" call "%%j\VC\Auxiliary\Build\vcvars32.bat"
25 @rem
Do nothing
if already found
, otherwise
call vsvars32.bat
if there
26 if defined VCINSTALLDIR
goto :EOF
27 set GET_VSVARS_BAT_CHECK_DIR
=%*
28 set GET_VSVARS_BAT_CHECK_DIR
=%GET_VSVARS_BAT_CHECK_DIR
:"=%
29 if exist "%GET_VSVARS_BAT_CHECK_DIR%\vsvars
32.bat
" call "%GET_VSVARS_BAT_CHECK_DIR%\vsvars
32.bat
"
38 REM NOTE: This file will find the most recent Visual Studio installation
39 REM apparent from the environment.
40 REM To use an older version, modify your environment set up.
41 REM (Or invoke the relevant vsvars32 file beforehand).
44 if defined VCINSTALLDIR goto :done
46 if exist "%ProgramFiles
(x86
)%\Microsoft Visual Studio\Installer
\vswhere.exe
" (
47 if exist "%ProgramFiles
(x86
)%\Microsoft Visual Studio
\2017\BuildTools
" (
48 call :set_vsvars "%ProgramFiles
(x86
)%\Microsoft Visual Studio\Installer
\vswhere.exe
" -products Microsoft.VisualStudio.Product.BuildTools
50 call :set_vsvars "%ProgramFiles
(x86
)%\Microsoft Visual Studio\Installer
\vswhere.exe
"
53 if exist "%ProgramFiles%\Microsoft Visual Studio\Installer
\vswhere.exe
" (
54 if exist "%ProgramFiles%\Microsoft Visual Studio
\2017\BuildTools
" (
55 call :set_vsvars "%ProgramFiles%\Microsoft Visual Studio\Installer
\vswhere.exe
" -products Microsoft.VisualStudio.Product.BuildTools
57 call :set_vsvars "%ProgramFiles%\Microsoft Visual Studio\Installer
\vswhere.exe
"
60 if /I "%1"=="VS2017
" goto ToolNotInstall
63 if defined VS140COMNTOOLS (call :read_vsvars "%VS140COMNTOOLS%") else (if /I "%1"=="VS2015
" goto ToolNotInstall)
66 if defined VS120COMNTOOLS ( call :read_vsvars "%VS120COMNTOOLS%") else (if /I "%1"=="VS2013
" goto ToolNotInstall)
69 if defined VS110COMNTOOLS (call :read_vsvars "%VS110COMNTOOLS%") else (if /I "%1"=="VS2012
" goto ToolNotInstall)
71 if defined VS100COMNTOOLS call :read_vsvars "%VS100COMNTOOLS%"
72 if defined VS90COMNTOOLS call :read_vsvars "%VS90COMNTOOLS%"
73 if defined VS80COMNTOOLS call :read_vsvars "%VS80COMNTOOLS%"
74 if defined VS71COMNTOOLS call :read_vsvars "%VS71COMNTOOLS%"
77 set GET_VSVARS_BAT_CHECK_DIR=