You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
2.3 KiB

  1. @ECHO OFF
  2. REM Usage: [buildbase.bat ..\vs2013\mysolution.sln 12]
  3. SET solution=%1
  4. SET version=%2
  5. SET log=build_%version%.log
  6. SET tools=Microsoft Visual Studio %version%.0\VC\vcvarsall.bat
  7. SET environment="%programfiles(x86)%\%tools%"
  8. IF NOT EXIST %environment% SET environment="%programfiles%\%tools%"
  9. IF NOT EXIST %environment% GOTO no_tools
  10. ECHO Building: %solution%
  11. CALL %environment% x86 > nul
  12. ECHO Platform=x86
  13. ECHO Configuration=DynDebug
  14. msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=Win32 %solution% > %log%
  15. IF errorlevel 1 GOTO error
  16. ECHO Configuration=DynRelease
  17. msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=Win32 %solution% >> %log%
  18. IF errorlevel 1 GOTO error
  19. ECHO Configuration=LtcgDebug
  20. msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=Win32 %solution% >> %log%
  21. IF errorlevel 1 GOTO error
  22. ECHO Configuration=LtcgRelease
  23. msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=Win32 %solution% >> %log%
  24. IF errorlevel 1 GOTO error
  25. ECHO Configuration=StaticDebug
  26. msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=Win32 %solution% >> %log%
  27. IF errorlevel 1 GOTO error
  28. ECHO Configuration=StaticRelease
  29. msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=Win32 %solution% >> %log%
  30. IF errorlevel 1 GOTO error
  31. CALL %environment% x86_amd64 > nul
  32. ECHO Platform=x64
  33. ECHO Configuration=DynDebug
  34. msbuild /m /v:n /p:Configuration=DynDebug /p:Platform=x64 %solution% > %log%
  35. IF errorlevel 1 GOTO error
  36. ECHO Configuration=DynRelease
  37. msbuild /m /v:n /p:Configuration=DynRelease /p:Platform=x64 %solution% >> %log%
  38. IF errorlevel 1 GOTO error
  39. ECHO Configuration=LtcgDebug
  40. msbuild /m /v:n /p:Configuration=LtcgDebug /p:Platform=x64 %solution% >> %log%
  41. IF errorlevel 1 GOTO error
  42. ECHO Configuration=LtcgRelease
  43. msbuild /m /v:n /p:Configuration=LtcgRelease /p:Platform=x64 %solution% >> %log%
  44. IF errorlevel 1 GOTO error
  45. ECHO Configuration=StaticDebug
  46. msbuild /m /v:n /p:Configuration=StaticDebug /p:Platform=x64 %solution% >> %log%
  47. IF errorlevel 1 GOTO error
  48. ECHO Configuration=StaticRelease
  49. msbuild /m /v:n /p:Configuration=StaticRelease /p:Platform=x64 %solution% >> %log%
  50. IF errorlevel 1 GOTO error
  51. ECHO Complete: %solution%
  52. GOTO end
  53. :error
  54. ECHO *** ERROR, build terminated early, see: %log%
  55. GOTO end
  56. :no_tools
  57. ECHO *** ERROR, build tools not found: %tools%
  58. :end