2013-11-08 21:13:05 +00:00
|
|
|
@echo OFF
|
|
|
|
|
2017-08-31 12:42:58 +00:00
|
|
|
bin\Prebuild.exe /target vs2015
|
2013-11-08 21:13:05 +00:00
|
|
|
|
|
|
|
setlocal ENABLEEXTENSIONS
|
|
|
|
set VALUE_NAME=MSBuildToolsPath
|
|
|
|
|
2018-11-27 11:20:39 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
)
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
2013-12-03 07:08:35 +00:00
|
|
|
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
|
|
|
|
rem from Windows. (We must use grep on Cygwin because it overrides the "find" command.)
|
|
|
|
|
|
|
|
for %%X in (grep.exe) do (set FOUNDGREP=%%~$PATH:X)
|
|
|
|
if defined FOUNDGREP (
|
|
|
|
set FINDCMD=grep
|
|
|
|
) else (
|
|
|
|
set FINDCMD=find
|
|
|
|
)
|
|
|
|
|
2018-11-27 13:02:12 +00:00
|
|
|
rem try vs2015
|
2018-11-27 17:31:59 +00:00
|
|
|
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 (
|
2018-11-27 13:02:12 +00:00
|
|
|
set ValueValue=%%C
|
|
|
|
goto :found
|
2013-11-08 21:13:05 +00:00
|
|
|
)
|
|
|
|
|
2018-11-27 13:02:12 +00:00
|
|
|
@echo msbuild for at least VS2015 not found, please install a (Community) edition of VS2017 or VS2015
|
2018-11-27 11:20:39 +00:00
|
|
|
@echo Not creating compile.bat
|
2018-11-27 13:02:12 +00:00
|
|
|
if exist "compile.bat" (
|
|
|
|
del compile.bat
|
|
|
|
)
|
|
|
|
goto :done
|
2018-11-27 11:20:39 +00:00
|
|
|
|
|
|
|
:found
|
|
|
|
@echo Found msbuild at %ValueValue%
|
2013-11-13 00:00:55 +00:00
|
|
|
@echo Creating compile.bat
|
|
|
|
@echo %ValueValue%\msbuild opensim.sln > compile.bat
|
2018-11-27 13:02:12 +00:00
|
|
|
|
|
|
|
:done
|