make.bat: change the way the vs buildtools are detected.
authorRay Molenkamp <github@lazydodo.com>
Tue, 5 Jun 2018 16:38:48 +0000 (10:38 -0600)
committerRay Molenkamp <github@lazydodo.com>
Tue, 5 Jun 2018 16:38:48 +0000 (10:38 -0600)
The recent change also used the buildtools instead of the regular compiler, you now have to explicitly state what you want to use :

2017 - the standard msvc compiler
2017pre - the msvc compiler from the preview installation
2017b - the msvc compiler from the buildtools installation

build_files/windows/detect_msvc2017.cmd
build_files/windows/parse_arguments.cmd

index 90fad8744b51974803c7a018dea4e732350bd46a..060e9f88617abcb2565e2312e26c79e4b2dee132 100644 (file)
@@ -12,7 +12,12 @@ if not exist "%vs_where%" (
                goto FAIL
        )
 )
-for /f "usebackq tokens=1* delims=: " %%i in (`"%vs_where%" -products * -latest %VSWHERE_ARGS% -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64`) do (
+
+if NOT "%verbose%" == "" (
+               echo "%vs_where%" -latest %VSWHERE_ARGS% -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64`
+       )
+
+for /f "usebackq tokens=1* delims=: " %%i in (`"%vs_where%" -latest %VSWHERE_ARGS% -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64`) do (
        if /i "%%i"=="installationPath" set VS_InstallDir=%%j
 )
 
index 2cc0acfd24364bfae91309d2e14048d7b454f322..8a6d743978d8e64e45e425243c1b83a37e3db411 100644 (file)
@@ -53,6 +53,10 @@ if NOT "%1" == "" (
        ) else if "%1" == "2017pre" (
                set BUILD_VS_YEAR=2017
                set VSWHERE_ARGS=-prerelease
+               set BUILD_VS_YEAR=2017
+       ) else if "%1" == "2017b" (
+               set BUILD_VS_YEAR=2017
+               set VSWHERE_ARGS=-products Microsoft.VisualStudio.Product.BuildTools
        ) else if "%1" == "2015" (
                set BUILD_VS_YEAR=2015
        ) else if "%1" == "2013" (