Skip to main content

History: Building CEGUI

Source of version: 20

Copy to clipboard
            {maketoc}

!!General
Since the ((Cthugha|Ogre 1.7)) version, {LEX()}CEGUI{LEX} 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 [http://www.ogre3d.org/download/|the Ogre download section] and [http://www.cegui.org.uk/wiki/index.php/Downloads|the CEGUI download section].
__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.

The recommended approach however is to build CEGUI against the Ogre version you want to use.

Here are all the links you will need:
*For the __source code__ it's recommended to get the [https://crayzedsgui.svn.sourceforge.net/svnroot/crayzedsgui/cegui_mk2/branches/v0-7|latest stable branch] from SVN (link leads to CEGUI 0.7 version which is the latest version right now). You can also just download it packed from [http://crayzedsgui.svn.sourceforge.net/viewvc/crayzedsgui/cegui_mk2/branches/v0-7.tar.gz?view=tar|here]
''Note'': If the branch version's source code seems to be unstable or not working at all, you can try the [http://sourceforge.net/projects/crayzedsgui/files/CEGUI%20Mk-2/snapshot|latest stable snapshot] which will most definitely be stable and working.
*__Additionally __to the source code you will need [http://sourceforge.net/projects/crayzedsgui/files/|dependencies suiting your compiler]. Download them for your CEGUI version and unpack the "dependencies" folder into your CEGUI main folder, so that it will co-exist next to the folders "bin", "cegui","datafiles" etc.

*Otherwise, if you find the info here unsufficient, you might wanna check this link on [http://www.cegui.org.uk/wiki/index.php/HOWTO:_Obtain_the_library_source_from_subversion|how to obtain libray source for CEGUI] in the CEGUI wiki. Or you can just use the source code from any release package, which you can find in the CEGUI download section (link above).


!!Step-by-step guide
# 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).
# 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.
# 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.
# 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):
+ {CODE(wrap="1",colors="lua")}OGRE_PATHS = { "../OGRE", "include/OGRE", "lib" }
OIS_PATHS = { "../OGRE", "include/OIS", "lib" }{CODE}
+ %note% __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:
+ {CODE(wrap="1", colors="lua")}CEGUI_EXTRA_PATHS = { 
{ "../OGRE/boost_1_42", "", "lib", "CEGUIOgreRenderer" }
 }{CODE}
# 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. (The next step will also explain how to proceed with other compilers.)
# This should create __CEGUI.sln__ in the premake folder; open it.
+ %note% __Note:__ If you are working Visual Studio 2010, use it to open the generated 2008 project. You will be asked if you want to convert it to a 2010 project, which should work without producing any errors.
+ %note% __Note:__ If you're using MinGW, you can try the experimental CEGUI version; if that doesn't work (and you're using the Code::Blocks IDE), you ''might'' be able to import the Visual Studio solution (File > Import project > MS Visual Studio solution...).
# If you have the Ogre lib files separated into Debug and Release folders, 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.
# Also, if you have the Ogre include files separated into OGRE and OIS folders, you will have to change the path in the __C++__ settings of the project so they will point to the __include/OGRE__
# __Build__ the __CEGUIOgreRenderer__ in Debug and Release mode.
# Now that you have built the .dll files and .lib files for CEGUI by yourself, you only have to change the linker settings of your project so that the needed .lib files and their folder paths are included there. Also you might want to include the dll's into a folder where your executable application will find them (for example just the folder your executable starts from). Finally remember to set the CEGUI __include__ directory (for example "..\..\CEGUI\cegui\include\cegui") inside your C++ project settings.


If everything worked out, you now have CEGUI up and running!

!!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...
In case you need help building Ogre, I'd recommend reading for example [http://blog.tidalware.com/2009/08/building-ogre-with-visual-studio/|this short guide].

Also you might want to check the [http://www.cegui.org.uk/wiki/index.php/Building_CEGUI_for_Ogre_/_OgreRenderer|CEGUI wiki version of this site] in case you find the information here outdated.
---
Alias: (alias(Building_CEGUI))

        

History

Information Version
Wed 12 of Feb, 2014 15:38 GMT-0000 Ident 29
Wed 12 of Feb, 2014 15:37 GMT-0000 Ident 28
Mon 06 of Jan, 2014 20:39 GMT-0000 Ident 27
Wed 16 of Oct, 2013 01:03 GMT-0000 Ident 26
Wed 16 of Oct, 2013 00:55 GMT-0000 Ident 25
Wed 16 of Oct, 2013 00:54 GMT-0000 Ident 24
Wed 16 of Oct, 2013 00:50 GMT-0000 Ident 23
Tue 31 of Jan, 2012 22:56 GMT-0000 NateWr Added a warning that the boost folder name changes with the version for idiots like me. 22
Wed 14 of Sep, 2011 11:11 GMT-0000 Flateno Added that you must build the CEGUIBase, CEGUIExpatParser and CEGUIFalagardWRBase projects. 21
Sun 31 of Jul, 2011 23:45 GMT-0000 jacmoe 20
Fri 06 of Aug, 2010 10:41 GMT-0000 Jahren 19
Fri 09 of Jul, 2010 11:54 GMT-0000 capnjj fixed link to "this short guide" to building OGRE with Visual Studio 18
Wed 07 of Jul, 2010 15:34 GMT-0000 JustBoo 17
Tue 15 of Jun, 2010 21:02 GMT-0000 Ident 16
Tue 15 of Jun, 2010 20:58 GMT-0000 Ident 15
Mon 14 of Jun, 2010 22:52 GMT-0000 jacmoe 14
Mon 14 of Jun, 2010 22:51 GMT-0000 jacmoe 13
Mon 14 of Jun, 2010 22:51 GMT-0000 jacmoe 12
Mon 14 of Jun, 2010 22:50 GMT-0000 jacmoe 11
Mon 14 of Jun, 2010 22:45 GMT-0000 jacmoe 10
Mon 14 of Jun, 2010 22:27 GMT-0000 Ident 9
Mon 14 of Jun, 2010 21:45 GMT-0000 Ident 8
Mon 24 of May, 2010 20:57 GMT-0000 jacmoe 7
Thu 29 of Apr, 2010 14:51 GMT-0000 jacmoe 6
Thu 29 of Apr, 2010 14:50 GMT-0000 jacmoe 5
  • «
  • 1 (current)
  • 2