<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://cegui.org.uk/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vax456</id>
		<title>CEGUI Wiki - Crazy Eddie's GUI System (Open Source) - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://cegui.org.uk/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Vax456"/>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/Special:Contributions/Vax456"/>
		<updated>2026-10-11T08:30:29Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.24.1</generator>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4778</id>
		<title>Building from source</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4778"/>
				<updated>2012-03-27T22:47:53Z</updated>
		
		<summary type="html">&lt;p&gt;Vax456: /* Dependencies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{VersionBadge|0.8}}&lt;br /&gt;
{{notice|message=This article is a work in progress and thus incomplete}}&lt;br /&gt;
&lt;br /&gt;
=Obtaining the source=&lt;br /&gt;
{{Note|If you'd rather use precompiled SDKs, please follow [[Downloads]].}}&lt;br /&gt;
==Stable Releases==&lt;br /&gt;
Source code from the stable mercurial branches is released at various points in time and made available as source code packages. These packages can be found on the [[Downloads]] page.&lt;br /&gt;
&lt;br /&gt;
==Mercurial==&lt;br /&gt;
The source code is kept in mercurial repositories at sourceforge.net. There are code repositories for the main CEGUI libraries as well as for other related items.&lt;br /&gt;
&lt;br /&gt;
A mercurial client (GUI or &amp;lt;abbr title=&amp;quot;Command-line Interface&amp;quot;&amp;gt;CLI&amp;lt;/abbr&amp;gt;) is required to access the mercurial repositories and download code. The command necessary to obtain a copy of the code is 'clone':&lt;br /&gt;
 hg clone SOURCE DESTINATION&lt;br /&gt;
where ''source'' is the URL of the repository to clone and ''destination'' is the local directory. To download a copy of CEGUI and place it in the ''cegui-source'' directory, you might use the following command:&lt;br /&gt;
 hg clone http://crayzedsgui.hg.sourceforge.net/hgroot/crayzedsgui/cegui_mk2 cegui-source&lt;br /&gt;
&lt;br /&gt;
Once you have this, the cloned repository is updated to the default (latest, unstable) code, so you most likely will want to switch to a stable branch instead, like this:&lt;br /&gt;
 hg update -C v0-8&lt;br /&gt;
{{Warning|Be aware that the -C option here will discard any local file changes without additional warning}}&lt;br /&gt;
&lt;br /&gt;
===Repositories===&lt;br /&gt;
The available repositories can be found [http://crayzedsgui.hg.sourceforge.net/hgweb/crayzedsgui/ here] where you can also browse their code from your web browser. A couple of examples:&lt;br /&gt;
* Core CEGUI libraries - [http://crayzedsgui.hg.sourceforge.net/hgweb/crayzedsgui/cegui_mk2 cegui_mk2]&lt;br /&gt;
 hg clone http://crayzedsgui.hg.sourceforge.net/hgroot/crayzedsgui/cegui_mk2 cegui-source&lt;br /&gt;
* CEED unified editor - [http://crayzedsgui.hg.sourceforge.net/hgweb/crayzedsgui/CEED CEED]&lt;br /&gt;
 hg clone http://crayzedsgui.hg.sourceforge.net/hgroot/crayzedsgui/CEED&lt;br /&gt;
&lt;br /&gt;
{{Note|The difference between the ''hg clone'' URLs and the web-interface URLs is ''hgroot'' vs ''hgweb''}}&lt;br /&gt;
&lt;br /&gt;
=Building=&lt;br /&gt;
CEGUI uses [http://www.cmake.org/ CMake] as a build system. CMake is cross-platform and open source so it's available on many platforms. There are binaries available for Windows, Mac and Linux, although on Linux your distribution will most probably have a CMake package ready. Make sure you install it before continuing.&lt;br /&gt;
{{Note|CMake does not build the code directly, it generates native makefiles and workspaces that can be used in the compiler environment of your choice.}}&lt;br /&gt;
Thanks to CMake and CEGUI's modular design, configuring and building CEGUI is a breeze.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume you have a ''cegui'' directory somewhere on your system so that all CEGUI related projects reside in it.&lt;br /&gt;
 cegui              (root working directory)&lt;br /&gt;
 cegui/cegui_mk2    (core CEGUI)&lt;br /&gt;
 cegui/CEED         (editor)&lt;br /&gt;
 cegui/...          (something else)&lt;br /&gt;
&lt;br /&gt;
==CEGUI==&lt;br /&gt;
This section will focus on building the core CEGUI libraries, which is all you need to use CEGUI in a project. Most people will also want [[Building from source#CEED|CEED]], the unified editor for CEGUI, but it is not required.&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
CEGUI can be built without any dependencies to outside libraries. However, typical configurations require [http://en.wikipedia.org/wiki/FreeType FreeType], a rendering module, an XML parser, and an image codec. CEGUI already provides support for several external libraries thanks to its modular design:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Supported Libraries&lt;br /&gt;
|-&lt;br /&gt;
| Bi-Directional Language&lt;br /&gt;
| MiniBIDI, FriBIDI&lt;br /&gt;
|-&lt;br /&gt;
| Font&lt;br /&gt;
| FreeType&lt;br /&gt;
|-&lt;br /&gt;
| Image Codec&lt;br /&gt;
| DevIL, FreeImage, OGRE, SILLY&lt;br /&gt;
|-&lt;br /&gt;
| Memory Management&lt;br /&gt;
| OGRE, nedmalloc&lt;br /&gt;
|-&lt;br /&gt;
| Regular Expression&lt;br /&gt;
| PCRE&lt;br /&gt;
|-&lt;br /&gt;
| Rendering&lt;br /&gt;
| Direct3D, Irrlicht, OGRE, OpenGL&lt;br /&gt;
|-&lt;br /&gt;
| Resource Providers&lt;br /&gt;
| Default (standard cross-platform file-access), minizip, OGRE&lt;br /&gt;
|-&lt;br /&gt;
| Scripting&lt;br /&gt;
| Lua, Python&lt;br /&gt;
|-&lt;br /&gt;
| XML&lt;br /&gt;
| Expat, LibXML2, RapidXml, TinyXML, Xerces-C++&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
CMake will automatically detect which external libraries exist on your system and will build CEGUI accordingly so make sure you install any external libraries you want to use before proceeding.&lt;br /&gt;
{{Todo|Does the above ^ work on Windows and Mac?}}&lt;br /&gt;
{{Note|You can turn off individual CEGUI modules from building (even if you have the required libraries installed) by changing the default [[Building from source#Build Options|Build Options]].}}&lt;br /&gt;
&lt;br /&gt;
===Directories===&lt;br /&gt;
If you're following the directory structure outlined above, you should have something like:&lt;br /&gt;
 cegui                          (root working directory)&lt;br /&gt;
 cegui/cegui_mk2                (core CEGUI)&lt;br /&gt;
Create the directory ''cegui/cegui_mk2/build'' and clone the ''cegui_mk2'' repository inside cegui/cegui_mk2 with the name ''source''. Example:&lt;br /&gt;
{{CLI|~/cegui|mkdir cegui_mk2/build}}&lt;br /&gt;
{{CLI|~/cegui|hg clone http://crayzedsgui.hg.sourceforge.net/hgroot/crayzedsgui/cegui_mk2 cegui_mk2/source}}&lt;br /&gt;
The result should be:&lt;br /&gt;
 cegui/cegui_mk2                (core CEGUI)&lt;br /&gt;
 cegui/cegui_mk2/build          (will build here)&lt;br /&gt;
 cegui/cegui_mk2/source         (the mercurial repository copy)&lt;br /&gt;
&lt;br /&gt;
{{Todo|Add instructions on where to extract the stable source packages (when available) so that we maintain a common directory structure}}&lt;br /&gt;
&lt;br /&gt;
===Build Options===&lt;br /&gt;
There are several build options (or variables) supported by the CEGUI build system. To view them, you can use the command like or CMake GUI.&lt;br /&gt;
&lt;br /&gt;
====Using the command line====&lt;br /&gt;
Enter the ''build'' directory and issue the following cmake command:&lt;br /&gt;
 {{CLI|~/cegui/cegui_mk2|cd build}}&lt;br /&gt;
 {{CLI|~/cegui/cegui_mk2/build|cmake -LH ../source}}&lt;br /&gt;
{{Note|On systems that default to python3 (like Arch Linux) you have to tell it to use python2 like this:}}&lt;br /&gt;
 {{CLI|~/cegui/cegui_mk2/build|2=cmake -LH -DPYTHON_EXECUTABLE=/usr/bin/python2 ../source}}&lt;br /&gt;
CMake will run, it will look for the build systems available on your platform, will look for dependencies and then will print a list of variables, along with their description. For example:&lt;br /&gt;
 // Select whether bi-directional text is enabled and which library should be used:&lt;br /&gt;
     0: Disabled.&lt;br /&gt;
     1: Use integrated minibidi library.&lt;br /&gt;
     2: Use external fribidi library.&lt;br /&gt;
 CEGUI_BIDI_SUPPORT:STRING=0&lt;br /&gt;
 // Specifies whether to use embedded GLEW when external library was found&lt;br /&gt;
 CEGUI_BUILD_EMBEDDED_GLEW:BOOL=OFF&lt;br /&gt;
&lt;br /&gt;
====Using CMake GUI====&lt;br /&gt;
Start cmake-gui, select our ''source'' and ''build'' directories and click the ''Configure'' button. The available options will be listed in the main window. You can hover the mouse over an option and CMake will show a tooltip with a more detailed description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|Changing the options and building is explained below, in [[#Building|Building]].}}&lt;br /&gt;
&lt;br /&gt;
===Building===&lt;br /&gt;
====Configuring and Generating makefiles====&lt;br /&gt;
The first step is to use CMake to configure the build and generate native makefiles. Without making any configuration changes, the command would be:&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/build|cmake ../source}}&lt;br /&gt;
The same can be done using the CMake GUI. Select the ''source'' and ''build'' directories, click configure and finally click generate.&lt;br /&gt;
&lt;br /&gt;
The build options can be changed via the GUI or via the CLI. If, for example, we want to turn off the slotted installation option and the python bindings we would run cmake like this:&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/build|2=cmake ../source -DCEGUI_SLOTTED_INSTALLATION:BOOL=OFF -DCEGUI_BUILD_PYTHON_MODULES:BOOL=OFF}}&lt;br /&gt;
{{Note|The python bindings are required by [[#CEED|CEED]] so don't disable them if you plan to use it.}}&lt;br /&gt;
&lt;br /&gt;
Another noteworthy option is the installation path, which is where CEGUI will be installed if you plan to install it via ''make install''. Change the value of the CMAKE_INSTALL_PREFIX configuration variable to set it. Example:&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/build|2=cmake ../source &amp;lt;other options here&amp;gt; -DCMAKE_INSTALL_PREFIX:PATH=/opt}}&lt;br /&gt;
so it will be installed in /opt/CEGUI (or /opt/CEGUI-0.8 if you use slotted installation).&lt;br /&gt;
&lt;br /&gt;
====Make====&lt;br /&gt;
The second (and last required) step is using the generated native makefiles to build it. This is specific to your build environment; you may need to open the generated solution with MSVC or Xcode, or simply issue the ''make'' command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabs&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;GNU Make&amp;quot;&amp;gt;&lt;br /&gt;
* You can speed ''make'' up significantly if you have a multi-core CPU by adding the ''-jN'' parameter, when N is the number of CPU cores on your machine.&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/build|make -j4}}&lt;br /&gt;
* Optionally, run ''make install'' to install the binaries and the shared datafiles on your system.&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;MSVC&amp;quot;&amp;gt;&lt;br /&gt;
{{Todo|MSVC notes}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Xcode&amp;quot;&amp;gt;&lt;br /&gt;
{{Todo|Xcode notes}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running the samples===&lt;br /&gt;
Now that the build has finished, you can run the sample applications to check your build. The binaries should be in the ''bin'' directory:&lt;br /&gt;
 cegui/cegui_mk2/build/bin&lt;br /&gt;
&lt;br /&gt;
The samples may fail to run initially because they can't find the required data files.&lt;br /&gt;
According to ''&amp;quot;cegui/cegui_mk2/source/Samples/common/include/CEGUISamplesConfig.h.in&amp;quot;'', the samples will look for the datafiles on ''&amp;quot;../datafiles&amp;quot;'' on Windows and on ''${CMAKE_INSTALL_PREFIX}/${CEGUI_DATA_INSTALL_DIR}'' on other platforms.&lt;br /&gt;
&lt;br /&gt;
It is possible to change this path without rebuilding, using the environment variable ''CEGUI_SAMPLE_DATAPATH''.&lt;br /&gt;
&amp;lt;tabs&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Linux&amp;quot;&amp;gt;&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/build|2=CEGUI_SAMPLE_DATAPATH=../source/datafiles bin/CEGUIDemo8-0.8}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Windows&amp;quot;&amp;gt;&lt;br /&gt;
{{CLI|C:\Users\User\cegui\cegui_mk2\build|2=SET CEGUI_SAMPLE_DATAPATH=&amp;quot;C:\Users\User\cegui\cegui_mk2\source\datafiles&amp;quot;}}&lt;br /&gt;
{{CLI|C:\Users\User\cegui\cegui_mk2\build|2=bin/CEGUIDemo8-0.8.exe}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Documentation===&lt;br /&gt;
{{Note|The documentation for stable releases can be found online [http://www.cegui.org.uk/docs/current here]}}&lt;br /&gt;
&lt;br /&gt;
The documentation is written in doxygen format so you need [http://www.doxygen.org/ Doxygen] to build it. If you want to generate the nice class diagrams too, you need to install [http://graphviz.org/ Graphviz].&lt;br /&gt;
&lt;br /&gt;
Building the docs with the default options is easy:&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/build|cd ../source/doc/doxygen}}&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/source/doc/doxygen|doxygen}}&lt;br /&gt;
&lt;br /&gt;
This will create a directory named ''html'' with plenty of files, just open ''index.html''.&lt;br /&gt;
&lt;br /&gt;
If you'd rather change some of doxygen's options, you can edit the file ''source/doc/doxygen/doxyfile'' or, alternatively, use ''doxywizard'' (GUI).&lt;br /&gt;
To change doxygen's output directory, one might do something like this:&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/source/doc/doxygen|mkdir ../../../build/doc}}&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/source/doc/doxygen|nano doxyfile           or use your editor of choice to edit ''doxyfile''}}&lt;br /&gt;
&lt;br /&gt;
Find the line &lt;br /&gt;
 OUTPUT_DIRECTORY = &lt;br /&gt;
and change it to&lt;br /&gt;
 OUTPUT_DIRECTORY = ../../../build/doc&lt;br /&gt;
&lt;br /&gt;
Now run doxygen and it will create the html docs in ''build/doc''.&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
CEED is the new CEGUI unified editor. It can edit layouts and imagesets, supports projects and multiple open file tabs, visual and source editing, preview and more. Please see [[CEED]] for a detailed description.&lt;br /&gt;
&lt;br /&gt;
CEED is written in [http://www.python.org/ Python] so there's no need to build it; all that's required is Python2 and it's dependencies.&lt;br /&gt;
&lt;br /&gt;
{{Note|If you'd rather use a stable package that includes dependencies, please follow [[Downloads]]}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
CEED requires a Python 2 interpreter, version 2.6 or higher.&lt;br /&gt;
Apart from [[PyCEGUI]] (the CEGUI Python bindings), it depends on the following libraries:&lt;br /&gt;
* PyOpenGL&lt;br /&gt;
* Qt4, PySide (+ PySide Tools)&lt;br /&gt;
* Boost.Python&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabs&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Windows&amp;quot;&amp;gt;&lt;br /&gt;
{{Todo|Windows dependencies notes}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Mac&amp;quot;&amp;gt;&lt;br /&gt;
{{Todo|Mac dependencies notes}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Arch Linux&amp;quot;&amp;gt;&lt;br /&gt;
You need at least python2, boost, python-opengl, pyside (AUR), pyside-tools (AUR).&lt;br /&gt;
{{Note|The packages from AUR may have been included in the ''[community]'' repository by now so check there first.}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Debian&amp;quot;&amp;gt;&lt;br /&gt;
;Wheezy&lt;br /&gt;
&lt;br /&gt;
PySide is part of Sid at the moment, so you have to add its repository address to your /etc/apt/sources.list and then:&lt;br /&gt;
&lt;br /&gt;
{{CLI||sudo apt-get update}}&lt;br /&gt;
{{CLI||sudo apt-get install cmake python-opengl pyside-tools boost-python}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Fedora&amp;quot;&amp;gt;&lt;br /&gt;
You need boost-devel, python-devel, python-opengl, python-pyside, pyside-tools.&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Gentoo&amp;quot;&amp;gt;&lt;br /&gt;
You can use these supplied ebuilds:[https://bitbucket.org/ChrisTrenkamp/gentoo-ogre3d-tools]. Copy these ebuilds to your local overlay[http://en.gentoo-wiki.com/wiki/Overlay#Local_Overlays], add the necessary options to your package.keywords and package.use files, and run '''''emerge -av dev-util/ceed'''''&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Update this section when CEED/CEGUI 0.8 is released}}&lt;br /&gt;
If you're following the directory structure outlined in [[#Building|Building]], you should have something like:&lt;br /&gt;
 cegui                          (root working directory)&lt;br /&gt;
 cegui/CEED                     (CEED repository copy)&lt;br /&gt;
&lt;br /&gt;
{{Todo|Add instructions on where to extract the stable source packages (when available) so that we maintain a common directory structure}}&lt;br /&gt;
&lt;br /&gt;
Running the main ''ceed-gui'' application could be as simple as:&lt;br /&gt;
{{CLI|~/cegui/CEED|2=PYTHONPATH=.:$PYTHONPATH python2 bin/ceed-gui}}&lt;br /&gt;
&lt;br /&gt;
If you don't have PyCEGUI installed system-wide but built it in ''cegui/cegui_mk2/build'', you can run ''ceed-gui'' like this:&lt;br /&gt;
{{CLI|~/cegui/CEED|2=PYTHONPATH=../cegui_mk2/build/lib:.:$PYTHONPATH python2 bin/ceed-gui}}&lt;br /&gt;
&lt;br /&gt;
====Running from Mercurial====&lt;br /&gt;
If you've cloned the CEED mercurial repository, you will most likely get the following error when you try to run ''ceed-gui'':&lt;br /&gt;
 ImportError: No module named mainwindow&lt;br /&gt;
This is because the compiled .ui files are not part of the repository. Edit the file ''ceed/version.py'' with your favorite text editor and change the value of '''CEED_developerMode''' from '''False''' to '''True'''.&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
If you encounter a problem that's not listed here, please make a post on the appropriate forum: [http://www.cegui.org.uk/phpBB2/viewforum.php?f=10 CEGUI], [http://www.cegui.org.uk/phpBB2/viewforum.php?f=15 CEED].&lt;br /&gt;
&lt;br /&gt;
For comments about this article, you may use it's discussion page.&lt;br /&gt;
&lt;br /&gt;
=Related articles=&lt;br /&gt;
* [[Eclipse and CEGUI]]&lt;br /&gt;
* [[Contribution|Contributing to the development of CEGUI]]&lt;br /&gt;
&lt;br /&gt;
[[Category:HowTo]]&lt;/div&gt;</summary>
		<author><name>Vax456</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4724</id>
		<title>Building from source</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4724"/>
				<updated>2011-12-28T02:31:52Z</updated>
		
		<summary type="html">&lt;p&gt;Vax456: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{VersionBadge|0.8}}&lt;br /&gt;
{{notice|message=This article is a work in progress and thus incomplete}}&lt;br /&gt;
&lt;br /&gt;
=Obtaining the source=&lt;br /&gt;
{{Note|If you'd rather use precompiled SDKs, please follow [[Downloads]].}}&lt;br /&gt;
==Stable Releases==&lt;br /&gt;
Source code from the stable mercurial branches is released at various points in time and made available as source code packages. These packages can be found on the [[Downloads]] page.&lt;br /&gt;
&lt;br /&gt;
==Mercurial==&lt;br /&gt;
The source code is kept in mercurial repositories at sourceforge.net. There are code repositories for the main CEGUI libraries as well as for other related items.&lt;br /&gt;
&lt;br /&gt;
A mercurial client (GUI or &amp;lt;abbr title=&amp;quot;Command-line Interface&amp;quot;&amp;gt;CLI&amp;lt;/abbr&amp;gt;) is required to access the mercurial repositories and download code. The command necessary to obtain a copy of the code is 'clone':&lt;br /&gt;
 hg clone SOURCE DESTINATION&lt;br /&gt;
where ''source'' is the URL of the repository to clone and ''destination'' is the local directory. To download a copy of CEGUI and place it in the ''cegui-source'' directory, you might use the following command:&lt;br /&gt;
 hg clone http://crayzedsgui.hg.sourceforge.net/hgroot/crayzedsgui/cegui_mk2 cegui-source&lt;br /&gt;
&lt;br /&gt;
Once you have this, the cloned repository is updated to the default (latest, unstable) code, so you most likely will want to switch to a stable branch instead, like this:&lt;br /&gt;
 hg update -C v0-8&lt;br /&gt;
{{Warning|Be aware that the -C option here will discard any local file changes without additional warning}}&lt;br /&gt;
&lt;br /&gt;
===Repositories===&lt;br /&gt;
The available repositories can be found [http://crayzedsgui.hg.sourceforge.net/hgweb/crayzedsgui/ here] where you can also browse their code from your web browser. A couple of examples:&lt;br /&gt;
* Core CEGUI libraries - [http://crayzedsgui.hg.sourceforge.net/hgweb/crayzedsgui/cegui_mk2 cegui_mk2]&lt;br /&gt;
 hg clone http://crayzedsgui.hg.sourceforge.net/hgroot/crayzedsgui/cegui_mk2 cegui-source&lt;br /&gt;
* CEED unified editor - [http://crayzedsgui.hg.sourceforge.net/hgweb/crayzedsgui/CEED CEED]&lt;br /&gt;
 hg clone http://crayzedsgui.hg.sourceforge.net/hgroot/crayzedsgui/CEED&lt;br /&gt;
&lt;br /&gt;
{{Note|The difference between the ''hg clone'' URLs and the web-interface URLs is ''hgroot'' vs ''hgweb''}}&lt;br /&gt;
&lt;br /&gt;
=Building=&lt;br /&gt;
CEGUI uses [http://www.cmake.org/ CMake] as a build system. CMake is cross-platform and open source so it's available on many platforms. There are binaries available for Windows, Mac and Linux, although on Linux your distribution will most probably have a CMake package ready. Make sure you install it before continuing.&lt;br /&gt;
{{Note|CMake does not build the code directly, it generates native makefiles and workspaces that can be used in the compiler environment of your choice.}}&lt;br /&gt;
Thanks to CMake and CEGUI's modular design, configuring and building CEGUI is a breeze.&lt;br /&gt;
&lt;br /&gt;
The following instructions assume you have a ''cegui'' directory somewhere on your system so that all CEGUI related projects reside in it.&lt;br /&gt;
 cegui              (root working directory)&lt;br /&gt;
 cegui/cegui_mk2    (core CEGUI)&lt;br /&gt;
 cegui/CEED         (editor)&lt;br /&gt;
 cegui/...          (something else)&lt;br /&gt;
&lt;br /&gt;
==CEGUI==&lt;br /&gt;
This section will focus on building the core CEGUI libraries, which is all you need to use CEGUI in a project. Most people will also want [[Building from source#CEED|CEED]], the unified editor for CEGUI, but it is not required.&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
CEGUI can be built without any dependencies to outside libraries. However, typical configurations require [http://en.wikipedia.org/wiki/FreeType FreeType], a rendering module, an XML parser, and an image codec. CEGUI already provides support for several external libraries thanks to its modular design:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Feature&lt;br /&gt;
! Supported Libraries&lt;br /&gt;
|-&lt;br /&gt;
| Bi-Directional Language&lt;br /&gt;
| MiniBIDI, FriBIDI&lt;br /&gt;
|-&lt;br /&gt;
| Font&lt;br /&gt;
| FreeType&lt;br /&gt;
|-&lt;br /&gt;
| Image Codec&lt;br /&gt;
| DevIL, FreeImage, OGRE, SILLY&lt;br /&gt;
|-&lt;br /&gt;
| Memory Management&lt;br /&gt;
| OGRE, nedmalloc&lt;br /&gt;
|-&lt;br /&gt;
| Regular Expression&lt;br /&gt;
| PCRE&lt;br /&gt;
|-&lt;br /&gt;
| Rendering&lt;br /&gt;
| Direct3D, Irrlicht, OGRE, OpenGL&lt;br /&gt;
|-&lt;br /&gt;
| Resource Providers&lt;br /&gt;
| Default (standard cross-platform file-access), minizip, OGRE&lt;br /&gt;
|-&lt;br /&gt;
| Scripting&lt;br /&gt;
| Lua, Python&lt;br /&gt;
|-&lt;br /&gt;
| XML&lt;br /&gt;
| Expat, LibXML2, RapidXml, TinyXML, Xerces-C++&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
CMake will automatically detect which external libraries exist on your system and will build CEGUI accordingly so make sure you install any external libraries you want to use before proceeding.&lt;br /&gt;
{{Todo|Does the above ^ work on Windows and Mac?}}&lt;br /&gt;
{{Note|You can turn off individual CEGUI modules from building (even if you have the required libraries installed) by changing the default [[Building from source#Build Options|Build Options]].}}&lt;br /&gt;
&lt;br /&gt;
===Directories===&lt;br /&gt;
If you're following the directory structure outlined above, you should have something like:&lt;br /&gt;
 cegui                          (root working directory)&lt;br /&gt;
 cegui/cegui_mk2                (core CEGUI)&lt;br /&gt;
Create the directory ''cegui/cegui_mk2/build'' and clone the ''cegui_mk2'' repository inside cegui/cegui_mk2 with the name ''source''. Example:&lt;br /&gt;
{{CLI|~/cegui|mkdir cegui_mk2/build}}&lt;br /&gt;
{{CLI|~/cegui|hg clone http://crayzedsgui.hg.sourceforge.net/hgroot/crayzedsgui/cegui_mk2 cegui_mk2/source}}&lt;br /&gt;
The result should be:&lt;br /&gt;
 cegui/cegui_mk2                (core CEGUI)&lt;br /&gt;
 cegui/cegui_mk2/build          (will build here)&lt;br /&gt;
 cegui/cegui_mk2/source         (the mercurial repository copy)&lt;br /&gt;
&lt;br /&gt;
{{Todo|Add instructions on where to extract the stable source packages (when available) so that we maintain a common directory structure}}&lt;br /&gt;
&lt;br /&gt;
===Build Options===&lt;br /&gt;
There are several build options (or variables) supported by the CEGUI build system. To view them, you can use the command like or CMake GUI.&lt;br /&gt;
&lt;br /&gt;
====Using the command line====&lt;br /&gt;
Enter the ''build'' directory and issue the following cmake command:&lt;br /&gt;
 {{CLI|~/cegui/cegui_mk2|cd build}}&lt;br /&gt;
 {{CLI|~/cegui/cegui_mk2/build|cmake -LH ../source}}&lt;br /&gt;
{{Note|On systems that default to python3 (like Arch Linux) you have to tell it to use python2 like this:}}&lt;br /&gt;
 {{CLI|~/cegui/cegui_mk2/build|2=cmake -LH -DPYTHON_EXECUTABLE=/usr/bin/python2 ../source}}&lt;br /&gt;
CMake will run, it will look for the build systems available on your platform, will look for dependencies and then will print a list of variables, along with their description. For example:&lt;br /&gt;
 // Select whether bi-directional text is enabled and which library should be used:&lt;br /&gt;
     0: Disabled.&lt;br /&gt;
     1: Use integrated minibidi library.&lt;br /&gt;
     2: Use external fribidi library.&lt;br /&gt;
 CEGUI_BIDI_SUPPORT:STRING=0&lt;br /&gt;
 // Specifies whether to use embedded GLEW when external library was found&lt;br /&gt;
 CEGUI_BUILD_EMBEDDED_GLEW:BOOL=OFF&lt;br /&gt;
&lt;br /&gt;
====Using CMake GUI====&lt;br /&gt;
Start cmake-gui, select our ''source'' and ''build'' directories and click the ''Configure'' button. The available options will be listed in the main window. You can hover the mouse over an option and CMake will show a tooltip with a more detailed description.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{Note|Changing the options and building is explained below, in [[#Building|Building]].}}&lt;br /&gt;
&lt;br /&gt;
===Building===&lt;br /&gt;
====Configuring and Generating makefiles====&lt;br /&gt;
The first step is to use CMake to configure the build and generate native makefiles. Without making any configuration changes, the command would be:&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/build|cmake ../source}}&lt;br /&gt;
The same can be done using the CMake GUI. Select the ''source'' and ''build'' directories, click configure and finally click generate.&lt;br /&gt;
&lt;br /&gt;
The build options can be changed via the GUI or via the CLI. If, for example, we want to turn off the slotted installation option and the python bindings we would run cmake like this:&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/build|2=cmake ../source -DCEGUI_SLOTTED_INSTALLATION:BOOL=OFF -DCEGUI_BUILD_PYTHON_MODULES:BOOL=OFF}}&lt;br /&gt;
{{Note|The python bindings are required by [[#CEED|CEED]] so don't disable them if you plan to use it.}}&lt;br /&gt;
&lt;br /&gt;
Another noteworthy option is the installation path, which is where CEGUI will be installed if you plan to install it via ''make install''. Change the value of the CMAKE_INSTALL_PREFIX configuration variable to set it. Example:&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/build|2=cmake ../source &amp;lt;other options here&amp;gt; -DCMAKE_INSTALL_PREFIX:PATH=/opt}}&lt;br /&gt;
so it will be installed in /opt/CEGUI (or /opt/CEGUI-0.8 if you use slotted installation).&lt;br /&gt;
&lt;br /&gt;
====Make====&lt;br /&gt;
The second (and last required) step is using the generated native makefiles to build it. This is specific to your build environment; you may need to open the generated solution with MSVC or Xcode, or simply issue the ''make'' command.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabs&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;GNU Make&amp;quot;&amp;gt;&lt;br /&gt;
* You can speed ''make'' up significantly if you have a multi-core CPU by adding the ''-jN'' parameter, when N is the number of CPU cores on your machine.&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/build|make -j4}}&lt;br /&gt;
* Optionally, run ''make install'' to install the binaries and the shared datafiles on your system.&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;MSVC&amp;quot;&amp;gt;&lt;br /&gt;
{{Todo|MSVC notes}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Xcode&amp;quot;&amp;gt;&lt;br /&gt;
{{Todo|Xcode notes}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running the samples===&lt;br /&gt;
Now that the build has finished, you can run the sample applications to check your build. The binaries should be in the ''bin'' directory:&lt;br /&gt;
 cegui/cegui_mk2/build/bin&lt;br /&gt;
&lt;br /&gt;
The samples may fail to run initially because they can't find the required data files.&lt;br /&gt;
According to ''&amp;quot;cegui/cegui_mk2/source/Samples/common/include/CEGUISamplesConfig.h.in&amp;quot;'', the samples will look for the datafiles on ''&amp;quot;../datafiles&amp;quot;'' on Windows and on ''${CMAKE_INSTALL_PREFIX}/${CEGUI_DATA_INSTALL_DIR}'' on other platforms.&lt;br /&gt;
&lt;br /&gt;
It is possible to change this path without rebuilding, using the environment variable ''CEGUI_SAMPLE_DATAPATH''.&lt;br /&gt;
&amp;lt;tabs&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Linux&amp;quot;&amp;gt;&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/build|2=CEGUI_SAMPLE_DATAPATH=../source/datafiles bin/CEGUIDemo8-0.8}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Windows&amp;quot;&amp;gt;&lt;br /&gt;
{{CLI|C:\Users\User\cegui\cegui_mk2\build|2=SET CEGUI_SAMPLE_DATAPATH=&amp;quot;C:\Users\User\cegui\cegui_mk2\source\datafiles&amp;quot;}}&lt;br /&gt;
{{CLI|C:\Users\User\cegui\cegui_mk2\build|2=bin/CEGUIDemo8-0.8.exe}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Documentation===&lt;br /&gt;
{{Note|The documentation for stable releases can be found online [http://www.cegui.org.uk/docs/current here]}}&lt;br /&gt;
&lt;br /&gt;
The documentation is written in doxygen format so you need [http://www.doxygen.org/ Doxygen] to build it. If you want to generate the nice class diagrams too, you need to install [http://graphviz.org/ Graphviz].&lt;br /&gt;
&lt;br /&gt;
Building the docs with the default options is easy:&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/build|cd ../source/doc/doxygen}}&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/source/doc/doxygen|doxygen}}&lt;br /&gt;
&lt;br /&gt;
This will create a directory named ''html'' with plenty of files, just open ''index.html''.&lt;br /&gt;
&lt;br /&gt;
If you'd rather change some of doxygen's options, you can edit the file ''source/doc/doxygen/doxyfile'' or, alternatively, use ''doxywizard'' (GUI).&lt;br /&gt;
To change doxygen's output directory, one might do something like this:&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/source/doc/doxygen|mkdir ../../../build/doc}}&lt;br /&gt;
{{CLI|~/cegui/cegui_mk2/source/doc/doxygen|nano doxyfile           or use your editor of choice to edit ''doxyfile''}}&lt;br /&gt;
&lt;br /&gt;
Find the line &lt;br /&gt;
 OUTPUT_DIRECTORY = &lt;br /&gt;
and change it to&lt;br /&gt;
 OUTPUT_DIRECTORY = ../../../build/doc&lt;br /&gt;
&lt;br /&gt;
Now run doxygen and it will create the html docs in ''build/doc''.&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
CEED is the new CEGUI unified editor. It can edit layouts and imagesets, supports projects and multiple open file tabs, visual and source editing, preview and more. Please see [[CEED]] for a detailed description.&lt;br /&gt;
&lt;br /&gt;
CEED is written in [http://www.python.org/ Python] so there's no need to build it; all that's required is Python2 and it's dependencies.&lt;br /&gt;
&lt;br /&gt;
{{Note|If you'd rather use a stable package that includes dependencies, please follow [[Downloads]]}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
CEED requires a Python 2 interpreter, version 2.6 or higher.&lt;br /&gt;
Apart from [[PyCEGUI]] (the CEGUI Python bindings), it depends on the following libraries:&lt;br /&gt;
* PyOpenGL&lt;br /&gt;
* Qt4, PySide (+ PySide Tools)&lt;br /&gt;
* Boost.Python&lt;br /&gt;
&lt;br /&gt;
&amp;lt;tabs&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Windows&amp;quot;&amp;gt;&lt;br /&gt;
{{Todo|Windows dependencies notes}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Mac&amp;quot;&amp;gt;&lt;br /&gt;
{{Todo|Mac dependencies notes}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Arch Linux&amp;quot;&amp;gt;&lt;br /&gt;
You need at least python2, boost, python-opengl, pyside (AUR), pyside-tools (AUR).&lt;br /&gt;
{{Note|The packages from AUR may have been included in the ''[community]'' repository by now so check there first.}}&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Debian&amp;quot;&amp;gt;&lt;br /&gt;
;Wheezy&lt;br /&gt;
&lt;br /&gt;
PySide is part of Sid at the moment, so you have to add its repository address to your /etc/apt/sources.list and then:&lt;br /&gt;
&lt;br /&gt;
{{CLI||sudo apt-get update}}&lt;br /&gt;
{{CLI||sudo apt-get install cmake python-opengl pyside-tools boost-python}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Fedora&amp;quot;&amp;gt;&lt;br /&gt;
You need boost-devel, python-devel, python-opengl, python-pyside, pyside-tools.&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;tab title=&amp;quot;Gentoo&amp;quot;&amp;gt;&lt;br /&gt;
You can use these supplied ebuilds:[https://bitbucket.org/ChrisTrenkamp/cegui-repo]. Copy these ebuilds to your local overlay[http://en.gentoo-wiki.com/wiki/Overlay#Local_Overlays], add the necessary options to your package.keywords and package.use files, and run '''''emerge -av dev-util/ceed'''''&lt;br /&gt;
&amp;lt;/tab&amp;gt;&lt;br /&gt;
&amp;lt;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Update this section when CEED/CEGUI 0.8 is released}}&lt;br /&gt;
If you're following the directory structure outlined in [[#Building|Building]], you should have something like:&lt;br /&gt;
 cegui                          (root working directory)&lt;br /&gt;
 cegui/CEED                     (CEED repository copy)&lt;br /&gt;
&lt;br /&gt;
{{Todo|Add instructions on where to extract the stable source packages (when available) so that we maintain a common directory structure}}&lt;br /&gt;
&lt;br /&gt;
Running the main ''ceed-gui'' application could be as simple as:&lt;br /&gt;
{{CLI|~/cegui/CEED|2=PYTHONPATH=.:$PYTHONPATH python2 bin/ceed-gui}}&lt;br /&gt;
&lt;br /&gt;
If you don't have PyCEGUI installed system-wide but built it in ''cegui/cegui_mk2/build'', you can run ''ceed-gui'' like this:&lt;br /&gt;
{{CLI|~/cegui/CEED|2=PYTHONPATH=../cegui_mk2/build/lib:.:$PYTHONPATH python2 bin/ceed-gui}}&lt;br /&gt;
&lt;br /&gt;
====Running from Mercurial====&lt;br /&gt;
If you've cloned the CEED mercurial repository, you will most likely get the following error when you try to run ''ceed-gui'':&lt;br /&gt;
 ImportError: No module named mainwindow&lt;br /&gt;
This is because the compiled .ui files are not part of the repository. Edit the file ''ceed/version.py'' with your favorite text editor and change the value of '''CEED_developerMode''' from '''False''' to '''True'''.&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
If you encounter a problem that's not listed here, please make a post on the appropriate forum: [http://www.cegui.org.uk/phpBB2/viewforum.php?f=10 CEGUI], [http://www.cegui.org.uk/phpBB2/viewforum.php?f=15 CEED].&lt;br /&gt;
&lt;br /&gt;
For comments about this article, you may use it's discussion page.&lt;br /&gt;
&lt;br /&gt;
=Related articles=&lt;br /&gt;
* [[Eclipse and CEGUI]]&lt;br /&gt;
* [[Contribution|Contributing to the development of CEGUI]]&lt;br /&gt;
&lt;br /&gt;
[[Category:HowTo]]&lt;/div&gt;</summary>
		<author><name>Vax456</name></author>	</entry>

	</feed>