From 7ecaa8afdddc0199db9da7cd93df7b79696ced5e Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Wed, 13 May 2020 13:23:05 -0400 Subject: [PATCH] Windows: Add VS2019 path discovery to msvs_env.bat (fixes issue #2925) --- tools/msvs_env.bat | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/msvs_env.bat b/tools/msvs_env.bat index ac44e2935..0e797c3d0 100644 --- a/tools/msvs_env.bat +++ b/tools/msvs_env.bat @@ -29,11 +29,13 @@ 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%" - if exist !vcvars! goto found_vcvars + 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 + ) ) )