2013-11-08 21:13:05 +00:00
|
|
|
@echo OFF
|
|
|
|
|
2007-07-16 15:40:11 +00:00
|
|
|
bin\Prebuild.exe /target nant
|
2013-11-08 21:13:05 +00:00
|
|
|
bin\Prebuild.exe /target vs2010
|
|
|
|
|
|
|
|
setlocal ENABLEEXTENSIONS
|
|
|
|
set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0"
|
|
|
|
set VALUE_NAME=MSBuildToolsPath
|
|
|
|
|
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
|
|
|
|
)
|
|
|
|
|
|
|
|
FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul ^| %FINDCMD% "%VALUE_NAME%"`) DO (
|
2013-11-08 21:13:05 +00:00
|
|
|
set ValueName=%%A
|
|
|
|
set ValueType=%%B
|
|
|
|
set ValueValue=%%C
|
|
|
|
)
|
|
|
|
|
|
|
|
if defined ValueName (
|
2013-11-13 00:00:55 +00:00
|
|
|
@echo Found msbuild path registry entry
|
2013-11-08 21:13:05 +00:00
|
|
|
@echo Value Name = %ValueName%
|
|
|
|
@echo Value Type = %ValueType%
|
|
|
|
@echo Value Value = %ValueValue%
|
2013-11-13 00:00:55 +00:00
|
|
|
@echo Creating compile.bat
|
|
|
|
@echo %ValueValue%\msbuild opensim.sln > compile.bat
|
2013-11-08 21:13:05 +00:00
|
|
|
) else (
|
|
|
|
@echo %KEY_NAME%\%VALUE_NAME% not found.
|
2013-11-13 00:00:55 +00:00
|
|
|
@echo Not creating compile.bat
|
2013-11-08 21:13:05 +00:00
|
|
|
)
|