aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rwxr-xr-xrunprebuild.bat11
1 files changed, 8 insertions, 3 deletions
diff --git a/runprebuild.bat b/runprebuild.bat
index e2b6832..3ee1648 100755
--- a/runprebuild.bat
+++ b/runprebuild.bat
@@ -5,22 +5,27 @@ bin\Prebuild.exe /target vs2015
5setlocal ENABLEEXTENSIONS 5setlocal ENABLEEXTENSIONS
6set VALUE_NAME=MSBuildToolsPath 6set VALUE_NAME=MSBuildToolsPath
7 7
8rem Try to find VS2019
9for %%e in (Enterprise Professional Community) do (
10 if exist "%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\MSBuild.exe" (
11
12 set ValueValue="%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\"
13 goto :found
14 )
15)
8 16
9rem try find vs2017 17rem try find vs2017
10if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMS=%ProgramFiles% 18if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMS=%ProgramFiles%
11if defined ProgramFiles(x86) set PROGRAMS=%ProgramFiles(x86)% 19if defined ProgramFiles(x86) set PROGRAMS=%ProgramFiles(x86)%
12 20
13for %%e in (Enterprise Professional Community) do ( 21for %%e in (Enterprise Professional Community) do (
14
15 if exist "%PROGRAMS%\Microsoft Visual Studio\2017\%%e\MSBuild\15.0\Bin\MSBuild.exe" ( 22 if exist "%PROGRAMS%\Microsoft Visual Studio\2017\%%e\MSBuild\15.0\Bin\MSBuild.exe" (
16 23
17 set ValueValue="%PROGRAMS%\Microsoft Visual Studio\2017\%%e\MSBuild\15.0\Bin\" 24 set ValueValue="%PROGRAMS%\Microsoft Visual Studio\2017\%%e\MSBuild\15.0\Bin\"
18 goto :found 25 goto :found
19 ) 26 )
20
21) 27)
22 28
23
24rem We have to use grep or find to locate the correct line, because reg query spits 29rem We have to use grep or find to locate the correct line, because reg query spits
25rem out 4 lines before Windows 7 but 2 lines after Windows 7. 30rem out 4 lines before Windows 7 but 2 lines after Windows 7.
26rem We use grep if it's on the path; otherwise we use the built-in find command 31rem We use grep if it's on the path; otherwise we use the built-in find command