Advertisement
Sebanisu

4.bat - compile q-gears as is.

Apr 22nd, 2014
351
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 2.54 KB | None | 0 0
  1. rem http://vijay.axham.com/blog/498/building-ogre3d-1-8-1-on-mingw
  2. @echo off
  3. set home=%cd%
  4. set "path=%home%\cmake-2.8.11.2-win32-x86\bin;%path%"
  5.  
  6. @echo Fetch the source code.
  7. set "hg_url=http://hg.code.sf.net/p/q-gears/code"
  8. set "QGEARS_SOURCE_DIR=%home%\q-gears-code"
  9. set "QGEARSSDK_SOURCE_DIR=%QGEARS_SOURCE_DIR%\code"
  10. mkdir "%QGEARS_SOURCE_DIR%"
  11. cd /D %QGEARS_SOURCE_DIR%
  12. hg clone %hg_url%
  13.  
  14. @echo We need to tell Ogre where boost is:
  15. rem set "BOOST_ROOT=%home%"
  16. rem set "BOOST_INCLUDEDIR=%home%\boost_1_54_0"
  17. rem set "BOOST_LIBRARYDIR=%home%\boost_1_54_0\stage\lib"
  18. call %home%\boost_root.bat
  19.  
  20. @echo And where the dependencies are:
  21. rem set "OGRE_DEPENDENCIES_DIR=%home%\build\install\ogredeps"
  22. call %home%\ogredeps_home.bat
  23. call %home%\ogre_home.bat
  24.  
  25. set "BUILD_OUTPUT_DIR=%home%\build\output"
  26. set "BUILD_INSTALL_DIR=%home%\build\install"
  27. set "QGEARS_INSTALL_DIR=%BUILD_INSTALL_DIR%\qgears"
  28. set "QGEARS_OUTPUT_DIR=%BUILD_OUTPUT_DIR%\qgears"
  29. set "CMAKE_BUILD_TYPE=Release"
  30. set "MAKETARGET=MinGW Makefiles"
  31. mkdir "%QGEARS_OUTPUT_DIR%"
  32. mkdir "%QGEARS_INSTALL_DIR%"
  33. cd /D %QGEARS_OUTPUT_DIR%
  34. echo You may need to reboot to for code blocks to find ogre.
  35. echo qgears source is in: %QGEARSSDK_SOURCE_DIR%
  36. echo building with mingw
  37. cmake "%QGEARSSDK_SOURCE_DIR%" -G "%MAKETARGET%" -DCMAKE_BUILD_TYPE:STRING="%CMAKE_BUILD_TYPE%" -DCMAKE_INSTALL_PREFIX:PATH="%QGEARS_INSTALL_DIR%" > %home%\qgears.log
  38. mingw32-make >> %home%\qgears.log
  39. mingw32-make install >> %home%\qgears.log
  40. robocopy %OGRE_HOME%\bin\%CMAKE_BUILD_TYPE% %QGEARS_INSTALL_DIR% /E /IS >> %home%\qgears.log
  41. robocopy %QGEARSSDK_SOURCE_DIR%\output %QGEARS_INSTALL_DIR% /E /IS >> %home%\qgears.log
  42. REM Linux
  43. REM -----
  44. REM CMake should find your boost and ogre files automagically
  45.  
  46. REM Windows
  47. REM -------
  48. REM for CMake to find BOOST and OGRE SDK you should have 2 environment variables
  49. REM BOOST_ROOT pointing to the folder of your boost version
  50. REM and
  51. REM OGRE_HOME set to the path of the Ogre SDK
  52. REM after setting environment variables you might have to restart the applications depending on them
  53. REM to have them recognize the newly set variables
  54.  
  55. REM Requirements
  56. REM ------------
  57. REM OgreSDK 1.8
  58. REM - Ogre::Singleton was changed from 1.7 to 1.8 so we're incompatible with 1.7
  59.  
  60. REM Boost 1.40
  61. REM - should be what ever the Ogre SDK needs, they did build agains 1.51 but cmake script
  62.   REM suggessts that ogre is compatible with boost 1.40 and up
  63.  
  64.  
  65. REM mostly you can follow instructions here http://www.ogre3d.org/tikiwiki/tiki-index.php?page=Prerequisites
  66. cd /D %home%
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement