)
rem Search Visual Studio Community, Professional or above.
+set InstallDir=
for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" %VSVEROPT% -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do (
set InstallDir=%%i
)
-if exist "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" (
- call "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" %*
- goto done
-)
-
-rem Search Visual Studio 2017 Express.
-rem (Visual Studio 2017 Express uses different component IDs.)
-for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" %VSVEROPT% -products Microsoft.VisualStudio.Product.WDExpress -property installationPath`) do (
- set InstallDir=%%i
+if not defined InstallDir (
+ rem Search Visual Studio 2017 Express.
+ rem (Visual Studio 2017 Express uses different component IDs.)
+ for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" %VSVEROPT% -products Microsoft.VisualStudio.Product.WDExpress -property installationPath`) do (
+ set InstallDir=%%i
+ )
)
if exist "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" (
call "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" %*
call
)
-:done
+if defined VCToolsVersion (
+ if "%VSVEROPT%"=="-latest" (
+ echo VCTools %VCToolsVersion% %VSCMD_ARG_TGT_ARCH%
+ for /f "tokens=1,2 delims=." %%I in ("%VCToolsVersion%") do (
+ title VCTools %%I.%%J %VSCMD_ARG_TGT_ARCH%
+ )
+ )
+)
if "%VSWHERE_SET%"=="yes" (
set VSWHERE=
set VSWHERE_SET=
rem option:
rem msvc2015 x64
+set Platform=
+if not exist "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" (
+ echo Error: vcvarsall.bat not found.
+ exit /b 1
+)
call "%VS140COMNTOOLS%..\..\VC\vcvarsall.bat" %*
+if defined VisualStudioVersion (
+ if defined Platform (
+ echo VS 2015 ^(%VisualStudioVersion%^) %Platform%
+ title VS 2015 %Platform%
+ ) else (
+ echo VS 2015 ^(%VisualStudioVersion%^) x86
+ title VS 2015 x86
+ )
+)
set "VSVEROPT=-version [15.0^,16.0^)"
call "%~dp0msvc-latest.bat" %*
set VSVEROPT=
+if defined VCToolsVersion (
+ echo VS 2017 ^(%VCToolsVersion%^) %VSCMD_ARG_TGT_ARCH%
+ title VS 2017 %VSCMD_ARG_TGT_ARCH%
+)
set "VSVEROPT=-version [16.0^,17.0^)"
call "%~dp0msvc-latest.bat" %*
set VSVEROPT=
+if defined VCToolsVersion (
+ echo VS 2019 ^(%VCToolsVersion%^) %VSCMD_ARG_TGT_ARCH%
+ title VS 2019 %VSCMD_ARG_TGT_ARCH%
+)
set "VSVEROPT=-version [17.0^,18.0^)"
call "%~dp0msvc-latest.bat" %*
set VSVEROPT=
+if defined VCToolsVersion (
+ echo VS 2022 ^(%VCToolsVersion%^) %VSCMD_ARG_TGT_ARCH%
+ title VS 2022 %VSCMD_ARG_TGT_ARCH%
+)
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 474,
/**/
473,
/**/