runprebuild48.bat 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. @echo OFF
  2. bin\Prebuild.exe /target vs2019 /file prebuild48.xml
  3. setlocal ENABLEEXTENSIONS
  4. set VALUE_NAME=MSBuildToolsPath
  5. if "%PROCESSOR_ARCHITECTURE%"=="x86" set PROGRAMS=%ProgramFiles%
  6. if defined ProgramFiles(x86) set PROGRAMS=%ProgramFiles(x86)%
  7. set PROGRAMS64 = %PROGRAMS%
  8. if defined ProgramFiles set PROGRAMS64=%ProgramFiles%
  9. rem Try to find VS2019/22
  10. for %%e in (Community Enterprise Professional) do (
  11. if exist "%PROGRAMS64%\Microsoft Visual Studio\2022\%%e\MSBuild\Current\Bin\MSBuild.exe" (
  12. set ValueValue="%PROGRAMS64%\Microsoft Visual Studio\2022\%%e\MSBuild\Current\Bin\MSBuild"
  13. goto :found
  14. )
  15. if exist "%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\MSBuild.exe" (
  16. set ValueValue="%PROGRAMS%\Microsoft Visual Studio\2019\%%e\MSBuild\Current\Bin\MSBuild"
  17. goto :found
  18. )
  19. )
  20. @echo msbuild for at least VS2019 not found, please install a (Community) edition of VS2019
  21. @echo Not creating compile.bat
  22. if exist "compile.bat" (
  23. del compile.bat
  24. )
  25. goto :done
  26. :found
  27. @echo Found msbuild at %ValueValue%
  28. @echo Creating compile.bat
  29. rem To compile in debug mode
  30. @echo %ValueValue% opensim.sln > compile.bat
  31. rem To compile in release mode comment line (add rem to start) above and uncomment next (remove rem)
  32. rem @echo %ValueValue% /p:Configuration=Release opensim.sln > compile.bat
  33. :done
  34. if exist "bin\addin-db-002" (
  35. del /F/Q/S bin\addin-db-002 > NUL
  36. rmdir /Q/S bin\addin-db-002
  37. )