diff options
Diffstat (limited to 'runprebuild.bat')
-rwxr-xr-x | runprebuild.bat | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/runprebuild.bat b/runprebuild.bat index e2b6832..0bee6f5 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 | |||
9 | rem try find vs2017 | ||
10 | if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMS=%ProgramFiles% | 8 | if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMS=%ProgramFiles% |
11 | if defined ProgramFiles(x86) set PROGRAMS=%ProgramFiles(x86)% | 9 | if defined ProgramFiles(x86) set PROGRAMS=%ProgramFiles(x86)% |
12 | 10 | ||
11 | rem Try to find VS2019 | ||
13 | for %%e in (Enterprise Professional Community) do ( | 12 | for %%e in (Enterprise Professional Community) do ( |
13 | if exist "%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\MSBuild.exe" ( | ||
14 | |||
15 | set ValueValue="%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\MSBuild" | ||
16 | goto :found | ||
17 | ) | ||
18 | ) | ||
14 | 19 | ||
20 | rem try find vs2017 | ||
21 | for %%e in (Enterprise Professional Community) do ( | ||
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\MSBuild" |
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 |
@@ -35,7 +40,7 @@ if defined FOUNDGREP ( | |||
35 | 40 | ||
36 | rem try vs2015 | 41 | rem try vs2015 |
37 | FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v %VALUE_NAME% 2^>nul ^| %FINDCMD% "%VALUE_NAME%"`) DO ( | 42 | FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\14.0" /v %VALUE_NAME% 2^>nul ^| %FINDCMD% "%VALUE_NAME%"`) DO ( |
38 | set ValueValue=%%C | 43 | set ValueValue=%%C\msbuild |
39 | goto :found | 44 | goto :found |
40 | ) | 45 | ) |
41 | 46 | ||
@@ -49,6 +54,8 @@ goto :done | |||
49 | :found | 54 | :found |
50 | @echo Found msbuild at %ValueValue% | 55 | @echo Found msbuild at %ValueValue% |
51 | @echo Creating compile.bat | 56 | @echo Creating compile.bat |
52 | @echo %ValueValue%\msbuild opensim.sln > compile.bat | 57 | rem To compile in debug mode |
53 | 58 | @echo %ValueValue% opensim.sln > compile.bat | |
59 | rem To compile in release mode comment line (add rem to start) above and uncomment next (remove rem) | ||
60 | rem @echo %ValueValue% /P:Config=Release opensim.sln > compile.bat | ||
54 | :done \ No newline at end of file | 61 | :done \ No newline at end of file |