1
0

runprebuild.bat 1.0 KB

123456789101112131415161718192021222324252627282930
  1. @echo OFF
  2. bin\Prebuild.exe /target nant
  3. bin\Prebuild.exe /target vs2010
  4. setlocal ENABLEEXTENSIONS
  5. set KEY_NAME="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSBuild\ToolsVersions\4.0"
  6. set VALUE_NAME=MSBuildToolsPath
  7. rem We have to use find here as req query spits out 4 lines before Windows 7
  8. rem But 2 lines after Windows 7. Unfortunately, this screws up cygwin
  9. rem as it uses its own find command. This could be fixed but it could be
  10. rem complex to find the location of find on all windows systems
  11. FOR /F "usebackq tokens=1-3" %%A IN (`REG QUERY %KEY_NAME% /v %VALUE_NAME% 2^>nul ^| FIND "%VALUE_NAME%"`) DO (
  12. set ValueName=%%A
  13. set ValueType=%%B
  14. set ValueValue=%%C
  15. )
  16. if defined ValueName (
  17. @echo Found msbuild path registry entry
  18. @echo Value Name = %ValueName%
  19. @echo Value Type = %ValueType%
  20. @echo Value Value = %ValueValue%
  21. @echo Creating compile.bat
  22. @echo %ValueValue%\msbuild opensim.sln > compile.bat
  23. ) else (
  24. @echo %KEY_NAME%\%VALUE_NAME% not found.
  25. @echo Not creating compile.bat
  26. )