Windows: Add VS2019 path discovery to msvs_env.bat (fixes issue #2925)

This commit is contained in:
Marshall Greenblatt 2020-05-13 13:23:05 -04:00
parent 8c996d2efd
commit 7ecaa8afdd
1 changed files with 6 additions and 4 deletions

View File

@ -29,12 +29,14 @@ set vcvars="%CEF_VCVARS%"
if %vcvars% == "none" goto found_vcvars
if exist %vcvars% goto found_vcvars
:: Search for the default VS2017 installation path.
:: Search for the default VS installation path.
for %%x in ("%PROGRAMFILES(X86)%" "%PROGRAMFILES%") do (
for %%y in (Professional Enterprise Community BuildTools) do (
set vcvars="%%~x\Microsoft Visual Studio\2017\%%y\VC\Auxiliary\Build\%vcvarsbat%"
for %%y in (2019 2017) do (
for %%z in (Professional Enterprise Community BuildTools) do (
set vcvars="%%~x\Microsoft Visual Studio\%%y\%%z\VC\Auxiliary\Build\%vcvarsbat%"
if exist !vcvars! goto found_vcvars
)
)
)
echo ERROR: Failed to find vcvars