Advertisement
Sebanisu

3.bat

Apr 22nd, 2014
253
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 1.96 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://forums.qhimm.com/index.php?topic=15060.0
  4.  
  5. set home=%cd%
  6. set "path=%home%\cmake-2.8.11.2-win32-x86\bin;%path%"
  7.  
  8. @echo Fetch the source code.
  9. set "hg_url=ssh://hg@bitbucket.org/sinbad/ogre -u v1-8"
  10. set "OGRE_SOURCE_DIR=%home%\ogre\v1-8"
  11. mkdir "%OGRE_SOURCE_DIR%"
  12. cd /D %OGRE_SOURCE_DIR%
  13. hg clone %hg_url%
  14. cd /D %home%
  15. set "OGRESDK_SOURCE_DIR=%OGRE_SOURCE_DIR%\ogre"
  16.  
  17. @echo We need to tell Ogre where boost is:
  18. rem set "BOOST_ROOT=%home%"
  19. rem set "BOOST_INCLUDEDIR=%home%\boost_1_54_0"
  20. rem set "BOOST_LIBRARYDIR=%home%\boost_1_54_0\stage\lib"
  21. call %home%\boost_root.bat
  22.  
  23. @echo And where the dependencies are:
  24. rem set "OGRE_DEPENDENCIES_DIR=%home%\build\install\ogredeps"
  25. call %home%\ogredeps_home.bat
  26.  
  27. @echo Set up some environment vars for build and install locations:
  28. set "BUILD_OUTPUT_DIR=%home%\build\output"
  29. set "OGRE_OUTPUT_DIR=%BUILD_OUTPUT_DIR%\ogre\v1-8"
  30. set "OGRESDK_OUTPUT_DIR=%OGRE_OUTPUT_DIR%\ogre"
  31. set "BUILD_INSTALL_DIR=%home%\build\install"
  32. set "OGRESDK_INSTALL_DIR=%BUILD_INSTALL_DIR%\ogre"
  33. mkdir "%OGRESDK_OUTPUT_DIR%"
  34. cd /D %OGRESDK_OUTPUT_DIR%
  35.  
  36. @echo if you’re using MinGW without MSYS:
  37. echo :Start of Log: > %home%\ogre.log
  38. set "CMAKE_BUILD_TYPE=Debug"
  39. :afterbuildtype
  40. cmake "%OGRESDK_SOURCE_DIR%" -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE:STRING="%CMAKE_BUILD_TYPE%" >> %home%\ogre.log
  41. rem -j makes things go faster but uses 100% cpu
  42. mingw32-make >> %home%\ogre.log
  43. mkdir "%BUILD_INSTALL_DIR%"
  44. mingw32-make install >> %home%\ogre.log
  45. rem move /Y sdk "%OGRESDK_INSTALL_DIR%"
  46. robocopy sdk "%OGRESDK_INSTALL_DIR%" /E /IS /MOVE
  47. if not %CMAKE_BUILD_TYPE% == Release (
  48.     set "CMAKE_BUILD_TYPE=Release"
  49.     goto afterbuildtype
  50. )
  51. cd /D %home%
  52. @echo set "OGRE_HOME=%OGRESDK_INSTALL_DIR%" > %home%\ogre_home.bat
  53. @echo setx OGRE_HOME %OGRESDK_INSTALL_DIR% >> %home%\ogre_home.bat
  54. call %home%\ogre_home.bat
  55. echo You may need to reboot to for code blocks to find ogre.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement