From 42414bfa551d8039bd5fb4ae9c7054c4bb67d599 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Thu, 4 Apr 2019 15:07:15 +0100 Subject: [PATCH] mantis 8512: add proposed detection of VS2019 to runprebuild (both this and vs2019 untested by me --- runprebuild.bat | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/runprebuild.bat b/runprebuild.bat index e2b68326b5..3ee1648c63 100755 --- a/runprebuild.bat +++ b/runprebuild.bat @@ -5,22 +5,27 @@ bin\Prebuild.exe /target vs2015 setlocal ENABLEEXTENSIONS set VALUE_NAME=MSBuildToolsPath +rem Try to find VS2019 +for %%e in (Enterprise Professional Community) do ( + if exist "%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\MSBuild.exe" ( + + set ValueValue="%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\" + goto :found + ) +) rem try find vs2017 if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMS=%ProgramFiles% if defined ProgramFiles(x86) set PROGRAMS=%ProgramFiles(x86)% for %%e in (Enterprise Professional Community) do ( - if exist "%PROGRAMS%\Microsoft Visual Studio\2017\%%e\MSBuild\15.0\Bin\MSBuild.exe" ( set ValueValue="%PROGRAMS%\Microsoft Visual Studio\2017\%%e\MSBuild\15.0\Bin\" goto :found ) - ) - rem We have to use grep or find to locate the correct line, because reg query spits rem out 4 lines before Windows 7 but 2 lines after Windows 7. rem We use grep if it's on the path; otherwise we use the built-in find command