Advertisement
Sebanisu

1.bat

Apr 22nd, 2014
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.67 KB | None | 0 0
  1. @echo off
  2. rem http://vijay.axham.com/blog/498/building-ogre3d-1-8-1-on-mingw
  3. rem http://vijay.axham.com/blog/478/building-boost-binaries-on-mingw
  4. rem http://forums.qhimm.com/index.php?topic=15060.0
  5.  
  6. set home=%cd%
  7. set "path=%home%\cmake-2.8.11.2-win32-x86\bin;%path%"
  8.  
  9. @echo Fetch the source code.
  10. set "BOOST_VERSION=1_54_0"
  11. set "svn_url=https://svn.boost.org/svn/boost/tags/release/Boost_%BOOST_VERSION%/"
  12. set "BOOST_SRC_ROOT=%home%\boost_%BOOST_VERSION%"
  13.  
  14. set "BUILD_OUTPUT_DIR=%home%\build\output"
  15. set "BUILD_INSTALL_DIR=%home%\build\install"
  16. set "BOOST_BUILD_DIR=%BUILD_OUTPUT_DIR%\boost_%BOOST_VERSION%"
  17. set "BOOST_INSTALL_DIR=%BUILD_INSTALL_DIR%\boost_%BOOST_VERSION%"
  18. mkdir "%BOOST_BUILD_DIR%"
  19. mkdir "%BOOST_INSTALL_DIR%"
  20. mkdir "%BOOST_SRC_ROOT%"
  21. svn co %svn_url% "%BOOST_SRC_ROOT%"
  22. cd /D %BOOST_SRC_ROOT%
  23. rem if your source directory gets messed up run
  24. rem svn revert -R
  25. rem it should remove all changes done to the files.
  26.  
  27. @echo building boost
  28. @echo - tagged layout, so that version numbers and toolset are not included in output files
  29. @echo - build-type complete, to get debug and release versions
  30. @echo - I only build certain components because we don't need all, and I get errors trying
  31. @echo   to build some components, so I leave em out
  32. set "generator=mingw"
  33. start /WAIT cmd /c "cd /D %cd% & bootstrap.bat --with-toolset=%generator%"
  34. set "generator=gcc"
  35. .\b2 --layout=tagged toolset=%generator% --build-type=complete --with-system  --with-atomic --with-chrono --with-date_time --with-filesystem --with-test --with-program_options --with-wave --with-thread --prefix=%BOOST_INSTALL_DIR% install
  36. rem if you are missing libraries your source directory might be messed up.
  37. rem set does in current environment. And setx does globally (may need reboot).
  38. @echo set "BOOST_ROOT=%BOOST_INSTALL_DIR%" > %home%\boost_root.bat
  39. @echo set "BOOST_INCLUDEDIR=%BOOST_INSTALL_DIR%\include" >> %home%\boost_root.bat
  40. @echo set "BOOST_LIBRARYDIR=%BOOST_INSTALL_DIR%\lib" >> %home%\boost_root.bat
  41. call %home%\boost_root.bat
  42. @echo set "BOOST_INCLUDE_DIR=%BOOST_INCLUDEDIR%" >> %home%\boost_root.bat
  43. @echo set "BOOST_LIB_DIR=%BOOST_LIBRARYDIR%" >> %home%\boost_root.bat
  44. @echo set "BOOST_LIBARY_DIR=%BOOST_LIBRARYDIR%" >> %home%\boost_root.bat
  45. @echo setx BOOST_ROOT %BOOST_ROOT% >> %home%\boost_root.bat
  46. @echo setx BOOST_INCLUDEDIR %BOOST_INCLUDEDIR% >> %home%\boost_root.bat
  47. @echo setx BOOST_LIBRARYDIR %BOOST_LIBRARYDIR% >> %home%\boost_root.bat
  48. @echo setx BOOST_INCLUDE_DIR %BOOST_INCLUDEDIR% >> %home%\boost_root.bat
  49. @echo setx BOOST_LIB_DIR %BOOST_LIBRARYDIR% >> %home%\boost_root.bat
  50. @echo setx BOOST_LIBARY_DIR %BOOST_LIBRARYDIR% >> %home%\boost_root.bat
  51. cd /D %home%
  52. call %home%\boost_root.bat
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement