diff options
-rwxr-xr-x | runprebuild.bat | 11 |
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 | |||
5 | setlocal ENABLEEXTENSIONS | 5 | setlocal ENABLEEXTENSIONS |
6 | set VALUE_NAME=MSBuildToolsPath | 6 | set VALUE_NAME=MSBuildToolsPath |
7 | 7 | ||
8 | rem Try to find VS2019 | ||
9 | for %%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 | ||
9 | rem try find vs2017 | 17 | rem try find vs2017 |
10 | if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMS=%ProgramFiles% | 18 | if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMS=%ProgramFiles% |
11 | if defined ProgramFiles(x86) set PROGRAMS=%ProgramFiles(x86)% | 19 | if defined ProgramFiles(x86) set PROGRAMS=%ProgramFiles(x86)% |
12 | 20 | ||
13 | for %%e in (Enterprise Professional Community) do ( | 21 | for %%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 | |||
24 | rem We have to use grep or find to locate the correct line, because reg query spits | 29 | rem We have to use grep or find to locate the correct line, because reg query spits |
25 | rem out 4 lines before Windows 7 but 2 lines after Windows 7. | 30 | rem out 4 lines before Windows 7 but 2 lines after Windows 7. |
26 | rem We use grep if it's on the path; otherwise we use the built-in find command | 31 | rem We use grep if it's on the path; otherwise we use the built-in find command |