Difference between revisions of "Building CEGUI for Ogre / OgreRenderer"
(→Step-by-step guide) |
|||
Line 16: | Line 16: | ||
* 3. In your CEGUI folder there should be a folder called "'''projects'''" with a subfolder called "'''premake'''". It is recommended to use the [https://sourceforge.net/projects/crayzedsgui/files/CEGUI%20Mk-2/premake/premake-3.7-custom.zip/download custom premake version of CEGUI]. Otherwise you can get version 3.6 or 3.7 of premake. Once you have premake extract the '''premake.exe''' file into the said folder. | * 3. In your CEGUI folder there should be a folder called "'''projects'''" with a subfolder called "'''premake'''". It is recommended to use the [https://sourceforge.net/projects/crayzedsgui/files/CEGUI%20Mk-2/premake/premake-3.7-custom.zip/download custom premake version of CEGUI]. Otherwise you can get version 3.6 or 3.7 of premake. Once you have premake extract the '''premake.exe''' file into the said folder. | ||
− | * 4. Open '''config.lua''' in the premake folder and edit the Ogre and OIS paths accordingly, so they will point to | + | * 4. Open '''config.lua''' in the premake folder and edit the Ogre and OIS paths accordingly, so that they will point to the dependency files. In my case for example the 2 lines look like this (having the OGRE and CEGUI main folders on the same level): |
<pre> | <pre> | ||
− | OGRE_PATHS = { " | + | OGRE_PATHS = { "../OGRE", "include/OGRE", "lib" } |
− | OIS_PATHS = { " | + | OIS_PATHS = { "../OGRE", "include/OIS", "lib" } |
</pre> | </pre> | ||
'''Note:''' Remember to use forward slashes here! Just copying the paths from the Windows explorer will give you backward slashes. Replace them! | '''Note:''' Remember to use forward slashes here! Just copying the paths from the Windows explorer will give you backward slashes. Replace them! | ||
− | Next, set all Renderers you do not need to "false", in this case we will only need ''OGRE_RENDERER''. You can also set all samples to false, except maybe ''SAMPLES_OGRE'' if you want | + | Next, set all Renderers you do not need to "false", in this case we will only need ''OGRE_RENDERER''. You can also set all samples to false, except maybe ''SAMPLES_OGRE'' if you want to compile those. |
− | * 5. Next, we create our Visual Studio Projects - Execute '''build_vs2008.bat''' to create a Visual Studio 2008 project or execute any other .bat file for your respective | + | '''Important:''' Since Ogre 1.7 the "boost" library is a new dependency of OGRE. If you are unsure if your Ogre version needs boost, you might want to check if there is a boost folder in your Ogre main folder. In case your Ogre version makes use of boost, you will additionally add boost to the extra paths of CEGUIOgreRenderer, in my case it looks like this: |
+ | <pre> | ||
+ | CEGUI_EXTRA_PATHS = { | ||
+ | { "../OGRE/boost_1_42", "", "lib", "CEGUIOgreRenderer" } | ||
+ | } | ||
+ | </pre> | ||
+ | |||
+ | * 5. Next, we create our Visual Studio Projects - Execute '''build_vs2008.bat''' to create a Visual Studio 2008 project or execute any other .bat file for your respective compiler version. | ||
* 6. This should create '''CEGUI.sln''' in the premake folder. Open it. | * 6. This should create '''CEGUI.sln''' in the premake folder. Open it. | ||
− | * 7. If you have the Ogre lib files seperated into a Debug and Release folder, you will have to change the path in the Linker settings of the project so they will point to the '''lib/Debug''' or '''lib/Release''' folder for each configuration respectively. | + | * 7. If you have the Ogre lib files seperated into a Debug and Release folder, you will have to change the path in the '''Linker''' settings of the project so they will point to the '''lib/Debug''' or '''lib/Release''' folder for each configuration respectively. |
* 8. '''Build''' the '''CEGUIOgreRenderer''' in Debug and Release mode, copy the CEGUIBase and CEGUIOgreRenderer .dll and .lib files as well as the CEGUI include folder and there you go, you're done! | * 8. '''Build''' the '''CEGUIOgreRenderer''' in Debug and Release mode, copy the CEGUIBase and CEGUIOgreRenderer .dll and .lib files as well as the CEGUI include folder and there you go, you're done! |
Revision as of 18:22, 14 June 2010
General
Since the Ogre 1.7 version, CEGUI is not an Ogre dependency anymore using its own basic interface for its samples now, instead of CEGUI.
This means that from now on, you have to build CEGUI for your Ogre project yourself, in case you want to use the latest Ogre or CEGUI versions. Otherwise, you can grab the latest precompiled dependencies from the Ogre download section and the CEGUI download section.
For CEGUI the upper download link may not contain all needed files for this procedure. In this case use this link to download CEGUI.
Be careful: The current [04/14/10] precompiled Win32 Ogre (1.7.0) and CEGUI (0.7.1) releases are not compatible. Either compile Ogre or CEGUI yourself to solve this problem.
Step-by-step guide
- 1. Get the appropriate CEGUI version from the CEGUI download page or get the very latest CEGUI version from the SVN repository (see links and info above).
- 2. Get the latest Ogre version. If you are compiling it yourself, you will need to build it first to get Ogre's .lib and .dll files ready for CEGUI.
- 3. In your CEGUI folder there should be a folder called "projects" with a subfolder called "premake". It is recommended to use the custom premake version of CEGUI. Otherwise you can get version 3.6 or 3.7 of premake. Once you have premake extract the premake.exe file into the said folder.
- 4. Open config.lua in the premake folder and edit the Ogre and OIS paths accordingly, so that they will point to the dependency files. In my case for example the 2 lines look like this (having the OGRE and CEGUI main folders on the same level):
OGRE_PATHS = { "../OGRE", "include/OGRE", "lib" } OIS_PATHS = { "../OGRE", "include/OIS", "lib" }
Note: Remember to use forward slashes here! Just copying the paths from the Windows explorer will give you backward slashes. Replace them!
Next, set all Renderers you do not need to "false", in this case we will only need OGRE_RENDERER. You can also set all samples to false, except maybe SAMPLES_OGRE if you want to compile those.
Important: Since Ogre 1.7 the "boost" library is a new dependency of OGRE. If you are unsure if your Ogre version needs boost, you might want to check if there is a boost folder in your Ogre main folder. In case your Ogre version makes use of boost, you will additionally add boost to the extra paths of CEGUIOgreRenderer, in my case it looks like this:
CEGUI_EXTRA_PATHS = { { "../OGRE/boost_1_42", "", "lib", "CEGUIOgreRenderer" } }
- 5. Next, we create our Visual Studio Projects - Execute build_vs2008.bat to create a Visual Studio 2008 project or execute any other .bat file for your respective compiler version.
- 6. This should create CEGUI.sln in the premake folder. Open it.
- 7. If you have the Ogre lib files seperated into a Debug and Release folder, you will have to change the path in the Linker settings of the project so they will point to the lib/Debug or lib/Release folder for each configuration respectively.
- 8. Build the CEGUIOgreRenderer in Debug and Release mode, copy the CEGUIBase and CEGUIOgreRenderer .dll and .lib files as well as the CEGUI include folder and there you go, you're done!
Questions
For any suggestions and questions send a PM to me (Ident) or just ask in the forums and someone else will help you for sure... When you need help building Ogre, I fully recommend reading this short guide.
For the Ogre-wiki version of this article you can also check this link: http://www.ogre3d.org/wiki/index.php/Building_CEGUI