<?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=Pav</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=Pav"/>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/Special:Contributions/Pav"/>
		<updated>2026-04-13T23:04:42Z</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=4723</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=4723"/>
				<updated>2011-12-18T02:06:52Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: Added Category:HowTo&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;/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>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4722</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=4722"/>
				<updated>2011-12-18T01:58:12Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Dependencies */ Make PyCEGUI a link&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;/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;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4721</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=4721"/>
				<updated>2011-12-18T01:55:11Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Documentation */ Typo&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;/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;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Talk:Building_from_source&amp;diff=4720</id>
		<title>Talk:Building from source</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Talk:Building_from_source&amp;diff=4720"/>
				<updated>2011-12-18T01:48:52Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: Request for help finishing the article&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is an attempt to document everything needed to build and run CEGUI 0.8 and CEED. I've chosen to include everything in one page so that general information about the whole CEGUI project is available (without duplication) but mostly because I use a common directory structure so that both projects fit into place and run (it could have been a series but I, personally, think this is better).&lt;br /&gt;
&lt;br /&gt;
* Needs review&lt;br /&gt;
* Help eliminate TODOs, especially Windows &amp;amp; Mac related instructions&lt;br /&gt;
* Remove the notice about the article being incomplete&lt;br /&gt;
* Comments? Suggestions?&lt;br /&gt;
[[User:Pav|Pav]] 01:48, 18 December 2011 (UTC)&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4719</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=4719"/>
				<updated>2011-12-18T01:31:28Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Building */ Remove todo about directory structure - it's fine&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'' which 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;/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;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Contribution&amp;diff=4718</id>
		<title>Contribution</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Contribution&amp;diff=4718"/>
				<updated>2011-12-18T01:26:47Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: Add links to general guidelines and coding standards&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The article describes how you can contribute to a CEGUI project with the help of [http://bitbucket.org BitBucket].&lt;br /&gt;
&lt;br /&gt;
We prefer your contribution through BitBucket, because it simplifies the development process for both you and us. If your contribution needs a bit more tuning, we just say so and you make another commit to your BitBucket repository. After we are satisfied with the quality of the fixes, we simply pull them from you repository. And since your repository is located under your nickname, we will know you can be trusted. So it's a win-win for everybody.&lt;br /&gt;
&lt;br /&gt;
If you prefer video tutorials, you can [http://www.youtube.com/watch?v=ZjFOvLGnAiU watch this tutorial].&lt;br /&gt;
&lt;br /&gt;
While this is a practical guide, you should also read [http://www.cegui.org.uk/docs/current/devel.html the general guidelines] and the [http://www.cegui.org.uk/docs/current/code_standards.html Coding Standards] from the CEGUI Developer Documentation.&lt;br /&gt;
&lt;br /&gt;
'''Note''': This tutorial describes contribution to [[CEED]] (CEGUI Editor) as a user '''kornerr''' as an example.&lt;br /&gt;
&lt;br /&gt;
== Import CEED repository to BitBucket ==&lt;br /&gt;
&lt;br /&gt;
Go to [https://bitbucket.org/repo/import Repositories -&amp;gt; import repository].&lt;br /&gt;
&lt;br /&gt;
Input the following:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
| Source&lt;br /&gt;
| Mercurial repository&lt;br /&gt;
|-&lt;br /&gt;
| URL&lt;br /&gt;
| http://crayzedsgui.hg.sourceforge.net/hgroot/crayzedsgui/CEED&lt;br /&gt;
|-&lt;br /&gt;
| Requires authorization&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| Name&lt;br /&gt;
| CEED&lt;br /&gt;
|-&lt;br /&gt;
| Private&lt;br /&gt;
| No&lt;br /&gt;
|-&lt;br /&gt;
| Language&lt;br /&gt;
| Python (CEGUI itself is C++)&lt;br /&gt;
|-&lt;br /&gt;
| Description&lt;br /&gt;
| CEED contribution&lt;br /&gt;
|-&lt;br /&gt;
| Website&lt;br /&gt;
| Leave blank&lt;br /&gt;
|-&lt;br /&gt;
| Wiki&lt;br /&gt;
| Leave blank&lt;br /&gt;
|-&lt;br /&gt;
| Issue tracking&lt;br /&gt;
| Leave blank&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Press '''Import'''.&lt;br /&gt;
&lt;br /&gt;
BitBucket will import the repository:&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_contrib_import_repo.png]]&lt;br /&gt;
&lt;br /&gt;
Wait a bit, and you're done:&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed contrib import repo done.png]]&lt;br /&gt;
&lt;br /&gt;
== Clone from BitBucket to your machine ==&lt;br /&gt;
 cd ~&lt;br /&gt;
 hg clone https://bitbucket.org/kornerr/ceed&lt;br /&gt;
&lt;br /&gt;
This will clone CEED repository from BitBucket to your home directory.&lt;br /&gt;
&lt;br /&gt;
== Make changes, commit, and push ==&lt;br /&gt;
&lt;br /&gt;
Make changes. Mine were:&lt;br /&gt;
 diff --git a/compatibility/looknfeel/cegui.py b/compatibility/looknfeel/cegui.py&lt;br /&gt;
 --- a/compatibility/looknfeel/cegui.py&lt;br /&gt;
 +++ b/compatibility/looknfeel/cegui.py&lt;br /&gt;
 @@ -95,6 +95,9 @@&lt;br /&gt;
          log = &amp;quot;&amp;quot;&lt;br /&gt;
          &lt;br /&gt;
          root = ElementTree.fromstring(data)&lt;br /&gt;
 +        # Fix for Python &amp;lt; 2.7.&lt;br /&gt;
 +        if not hasattr(root, &amp;quot;iter&amp;quot;):&lt;br /&gt;
 +            root.iter = root.getiterator&lt;br /&gt;
          &lt;br /&gt;
          # version 7 has a version attribute&lt;br /&gt;
          root.set(&amp;quot;version&amp;quot;, &amp;quot;7&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Commit with a meaningful message, e.g., in my case it was:&lt;br /&gt;
 hg commit -m &amp;quot;XML iterator fix for Python &amp;lt; 2.7. tested on Python 2.6&amp;quot;&lt;br /&gt;
&lt;br /&gt;
And push it back to BitBucket:&lt;br /&gt;
 kornerr@koren:~/ceed$ '''hg push'''&lt;br /&gt;
 pushing to https://bitbucket.org/kornerr/ceed&lt;br /&gt;
 searching for changes&lt;br /&gt;
 http authorization equired&lt;br /&gt;
 realm: Bitbucket.org HTTP&lt;br /&gt;
 user: '''kornerr'''&lt;br /&gt;
 password: &lt;br /&gt;
 remote: adding changesets&lt;br /&gt;
 remote: adding manifests&lt;br /&gt;
 remote: adding file changes&lt;br /&gt;
 remote: added 1 changesets with 1 changes to 1 files&lt;br /&gt;
 remote: bb/acl: kornerr is allowed. accepted payload.&lt;br /&gt;
&lt;br /&gt;
You can see your changes at BitBucket now:&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_contrib_push.png]]&lt;br /&gt;
&lt;br /&gt;
'''Note: Please, don't try to merge many fixes into single commit. Place each fix into its own commit. It will be easier for us to understand your fixes and accept it faster.'''&lt;br /&gt;
&lt;br /&gt;
== Contact CEGUI developer(s) ==&lt;br /&gt;
Use IRC, mail, or mantis. Tell the URL of your repository and list the changesets you want into upstream.&lt;br /&gt;
&lt;br /&gt;
== Further contributions ==&lt;br /&gt;
If you will contribute again later, you need to first update your BitBucket repository to upstream version, and only then make changes. Please, do it, otherwise your fixes may be rejected simply because we can't spend hours in figuring out how to apply your old changes to the latest version.&lt;br /&gt;
&lt;br /&gt;
To update your BitBucket repository to upstream version, go to your clone of BitBucket repository on your machine and do:&lt;br /&gt;
 hg pull -u http://crayzedsgui.hg.sourceforge.net/hgroot/crayzedsgui/CEED&lt;br /&gt;
&lt;br /&gt;
Then simply push the changes back to your BitBucket repository:&lt;br /&gt;
 hg push&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4717</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=4717"/>
				<updated>2011-12-18T01:12:51Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Related Articles */&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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'' which 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;/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;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4716</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=4716"/>
				<updated>2011-12-18T01:07:30Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Troubleshooting */&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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'' which 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;/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;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4715</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=4715"/>
				<updated>2011-12-18T01:00:30Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Running */&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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'' which 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;/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;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4714</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=4714"/>
				<updated>2011-12-18T00:28:47Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Directories */ Remove extra spaces&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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'' which 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;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4713</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=4713"/>
				<updated>2011-12-18T00:25:06Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Dependencies */ Dependency CEGUI -&amp;gt; PyCEGUI&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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'' which 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;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Template:Todo&amp;diff=4712</id>
		<title>Template:Todo</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Template:Todo&amp;diff=4712"/>
				<updated>2011-12-17T23:48:52Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: Remove extraneous lines #2 :/&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
A ''Todo'' box used to mark missing content. Automatically adds the WIP category.&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{Todo|Complete this section.}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
{{Todo|Complete this section.}}&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;{{Box|Todo:|{{{1}}}|#DDDDBB|#FFFFDD}}[[Category:WIP]]&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Template:Todo&amp;diff=4711</id>
		<title>Template:Todo</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Template:Todo&amp;diff=4711"/>
				<updated>2011-12-17T23:47:30Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: Remove extraneous lines&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
A ''Todo'' box used to mark missing content. Automatically adds the WIP category.&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{Todo|Complete this section.}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
{{Todo|Complete this section.}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;includeonly&amp;gt;{{Box|Todo:|{{{1}}}|#DDDDBB|#FFFFDD}}[[Category:WIP]]&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Template:Todo&amp;diff=4710</id>
		<title>Template:Todo</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Template:Todo&amp;diff=4710"/>
				<updated>2011-12-17T23:45:14Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: Add WIP category&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
A ''Todo'' box used to mark missing content. Automatically adds the WIP category.&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{Todo|Complete this section.}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
{{Todo|Complete this section.}}&amp;lt;/noinclude&amp;gt;&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
{{Box|Todo:|{{{1}}}|#DDDDBB|#FFFFDD}}&lt;br /&gt;
[[Category:WIP]]&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4709</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=4709"/>
				<updated>2011-12-17T23:11:13Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Directories */ Add todo about stable source packages&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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'' which 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 CEGUI, 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;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4708</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=4708"/>
				<updated>2011-12-17T23:00:44Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Dependencies */ Close &amp;lt;/tabs&amp;gt; (oops)&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
===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'' which 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 CEGUI, 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;/tabs&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4707</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=4707"/>
				<updated>2011-12-17T22:58:11Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* CEED */ General, 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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
===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'' which 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 CEGUI, 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;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4706</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=4706"/>
				<updated>2011-12-17T16:33:04Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Documentation */&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
===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'' which 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;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4705</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=4705"/>
				<updated>2011-12-17T16:32:11Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Documentation */&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
===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'' which 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;
&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;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4704</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=4704"/>
				<updated>2011-12-17T05:56:10Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Running the samples */&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
===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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4703</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=4703"/>
				<updated>2011-12-17T05:35:29Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* CEGUI */ Add section about running the samples&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
===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;
&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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4702</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=4702"/>
				<updated>2011-12-17T05:32:48Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Make */ Use tabs for platform specific notes&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
===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;
===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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4701</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=4701"/>
				<updated>2011-12-17T04:59:28Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* GNU Make */ Use Template:CLI&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
===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;
=====Windows / MSVC=====&lt;br /&gt;
{{Todo|MSVC notes}}&lt;br /&gt;
&lt;br /&gt;
=====Mac / Xcode=====&lt;br /&gt;
{{Todo|Xcode notes}}&lt;br /&gt;
&lt;br /&gt;
=====GNU Make=====&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;
&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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4700</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=4700"/>
				<updated>2011-12-17T04:58:07Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Configuring and Generating makefiles */ Use Template:CLI&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
===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;
=====Windows / MSVC=====&lt;br /&gt;
{{Todo|MSVC notes}}&lt;br /&gt;
&lt;br /&gt;
=====Mac / Xcode=====&lt;br /&gt;
{{Todo|Xcode notes}}&lt;br /&gt;
&lt;br /&gt;
=====GNU Make=====&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;
 [~/cegui/cegui_mk2/build]$ make -j4&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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Template:CLI&amp;diff=4699</id>
		<title>Template:CLI</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Template:CLI&amp;diff=4699"/>
				<updated>2011-12-17T04:55:59Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
A generic command line prompt and command.&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{CLI||command --with --parameters}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{CLI|/current/path|command --with --parameters}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{CLI|~/path|2=a command that includes then equal (=) sign}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
{{CLI||command --with --parameters}}&lt;br /&gt;
{{CLI|/current/path|command --with --parameters}}&lt;br /&gt;
{{CLI|~/path|2=a command that includes then equal (=) sign}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt; {{#if:{{{1|}}}|&amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;|}}&amp;lt;span style=&amp;quot;color:#888&amp;quot;&amp;gt;{{{1}}}&amp;lt;/span&amp;gt;{{#if:{{{1|}}}|&amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;]&amp;lt;/span&amp;gt;|}}&amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;$ &amp;lt;/span&amp;gt;{{{2}}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4698</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=4698"/>
				<updated>2011-12-17T04:52:01Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Using the command line */ Use Template:CLI&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
===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;
 [~/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;
 [~/cegui/cegui_mk2/build]$ 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;
 [~/cegui/cegui_mk2/build]$ 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;
=====Windows / MSVC=====&lt;br /&gt;
{{Todo|MSVC notes}}&lt;br /&gt;
&lt;br /&gt;
=====Mac / Xcode=====&lt;br /&gt;
{{Todo|Xcode notes}}&lt;br /&gt;
&lt;br /&gt;
=====GNU Make=====&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;
 [~/cegui/cegui_mk2/build]$ make -j4&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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4697</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=4697"/>
				<updated>2011-12-17T04:45:38Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Directories */ Use Template:CLI&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
===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;
 &amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;[~/cegui/cegui_mk2]$&amp;lt;/span&amp;gt; cd build&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;[~/cegui/cegui_mk2/build]$&amp;lt;/span&amp;gt; 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;
 &amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;[~/cegui/cegui_mk2/build]$&amp;lt;/span&amp;gt; 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;
 [~/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;
 [~/cegui/cegui_mk2/build]$ 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;
 [~/cegui/cegui_mk2/build]$ 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;
=====Windows / MSVC=====&lt;br /&gt;
{{Todo|MSVC notes}}&lt;br /&gt;
&lt;br /&gt;
=====Mac / Xcode=====&lt;br /&gt;
{{Todo|Xcode notes}}&lt;br /&gt;
&lt;br /&gt;
=====GNU Make=====&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;
 [~/cegui/cegui_mk2/build]$ make -j4&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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Template:CLI&amp;diff=4696</id>
		<title>Template:CLI</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Template:CLI&amp;diff=4696"/>
				<updated>2011-12-17T04:42:35Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: Created page with &amp;quot;&amp;lt;noinclude&amp;gt; A generic command line prompt and command.  ====Usage==== * &amp;lt;nowiki&amp;gt;{{CLI||command --with --parameters}}&amp;lt;/nowiki&amp;gt; * &amp;lt;nowiki&amp;gt;{{CLI|/current/path|command --with --param...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
A generic command line prompt and command.&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{CLI||command --with --parameters}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{CLI|/current/path|command --with --parameters}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
{{CLI||command --with --parameters}}&lt;br /&gt;
{{CLI|/current/path|command --with --parameters}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt; {{#if:{{{1|}}}|&amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;[&amp;lt;/span&amp;gt;|}}&amp;lt;span style=&amp;quot;color:#888&amp;quot;&amp;gt;{{{1}}}&amp;lt;/span&amp;gt;{{#if:{{{1|}}}|&amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;]&amp;lt;/span&amp;gt;|}}&amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;$ &amp;lt;/span&amp;gt;{{{2}}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4695</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=4695"/>
				<updated>2011-12-17T04:02:08Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Using the command line */ color CLI prompt&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
 &amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;[~/cegui]$&amp;lt;/span&amp;gt; mkdir cegui_mk2/build&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;[~/cegui]$&amp;lt;/span&amp;gt; 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;
===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;
 &amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;[~/cegui/cegui_mk2]$&amp;lt;/span&amp;gt; cd build&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;[~/cegui/cegui_mk2/build]$&amp;lt;/span&amp;gt; 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;
 &amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;[~/cegui/cegui_mk2/build]$&amp;lt;/span&amp;gt; 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;
 [~/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;
 [~/cegui/cegui_mk2/build]$ 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;
 [~/cegui/cegui_mk2/build]$ 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;
=====Windows / MSVC=====&lt;br /&gt;
{{Todo|MSVC notes}}&lt;br /&gt;
&lt;br /&gt;
=====Mac / Xcode=====&lt;br /&gt;
{{Todo|Xcode notes}}&lt;br /&gt;
&lt;br /&gt;
=====GNU Make=====&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;
 [~/cegui/cegui_mk2/build]$ make -j4&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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4694</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=4694"/>
				<updated>2011-12-17T04:00:55Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Directories */ color CLI prompt&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
 &amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;[~/cegui]$&amp;lt;/span&amp;gt; mkdir cegui_mk2/build&lt;br /&gt;
 &amp;lt;span style=&amp;quot;color:#080&amp;quot;&amp;gt;[~/cegui]$&amp;lt;/span&amp;gt; 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;
===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;
 [~/cegui/cegui_mk2]$ cd build&lt;br /&gt;
 [~/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;
 [~/cegui/cegui_mk2/build]$ 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;
 [~/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;
 [~/cegui/cegui_mk2/build]$ 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;
 [~/cegui/cegui_mk2/build]$ 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;
=====Windows / MSVC=====&lt;br /&gt;
{{Todo|MSVC notes}}&lt;br /&gt;
&lt;br /&gt;
=====Mac / Xcode=====&lt;br /&gt;
{{Todo|Xcode notes}}&lt;br /&gt;
&lt;br /&gt;
=====GNU Make=====&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;
 [~/cegui/cegui_mk2/build]$ make -j4&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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4693</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=4693"/>
				<updated>2011-12-17T03:43:22Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* GNU Make */&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
 [~/cegui]$ mkdir cegui_mk2/build&lt;br /&gt;
 [~/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;
===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;
 [~/cegui/cegui_mk2]$ cd build&lt;br /&gt;
 [~/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;
 [~/cegui/cegui_mk2/build]$ 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;
 [~/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;
 [~/cegui/cegui_mk2/build]$ 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;
 [~/cegui/cegui_mk2/build]$ 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;
=====Windows / MSVC=====&lt;br /&gt;
{{Todo|MSVC notes}}&lt;br /&gt;
&lt;br /&gt;
=====Mac / Xcode=====&lt;br /&gt;
{{Todo|Xcode notes}}&lt;br /&gt;
&lt;br /&gt;
=====GNU Make=====&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;
 [~/cegui/cegui_mk2/build]$ make -j4&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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4692</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=4692"/>
				<updated>2011-12-17T03:36:52Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* GNU Make */ Remove ccache, doesn't belong here&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
 [~/cegui]$ mkdir cegui_mk2/build&lt;br /&gt;
 [~/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;
===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;
 [~/cegui/cegui_mk2]$ cd build&lt;br /&gt;
 [~/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;
 [~/cegui/cegui_mk2/build]$ 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;
 [~/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;
 [~/cegui/cegui_mk2/build]$ 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;
 [~/cegui/cegui_mk2/build]$ 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;
=====Windows / MSVC=====&lt;br /&gt;
{{Todo|MSVC notes}}&lt;br /&gt;
&lt;br /&gt;
=====Mac / Xcode=====&lt;br /&gt;
{{Todo|Xcode notes}}&lt;br /&gt;
&lt;br /&gt;
=====GNU Make=====&lt;br /&gt;
* You can speed ''make'' up significantly if you have a multi-core CPU and add the -jN parameter, when N is the number of CPU cores on your machine.&lt;br /&gt;
 [~/cegui/cegui_mk2/build]$ make -j4&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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4680</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=4680"/>
				<updated>2011-12-16T19:37:03Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Building */&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
 [~/cegui]$ mkdir cegui_mk2/build&lt;br /&gt;
 [~/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;
===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;
 [~/cegui/cegui_mk2]$ cd build&lt;br /&gt;
 [~/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;
 [~/cegui/cegui_mk2/build]$ 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;
 [~/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;
 [~/cegui/cegui_mk2/build]$ 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;
 [~/cegui/cegui_mk2/build]$ 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;
=====Windows / MSVC=====&lt;br /&gt;
{{Todo|MSVC notes}}&lt;br /&gt;
&lt;br /&gt;
=====Mac / Xcode=====&lt;br /&gt;
{{Todo|Xcode notes}}&lt;br /&gt;
&lt;br /&gt;
=====GNU Make=====&lt;br /&gt;
* You can speed ''make'' up significantly if you have a multi-core CPU and add the -jN parameter, when N is the number of CPU cores on your machine.&lt;br /&gt;
 [~/cegui/cegui_mk2/build]$ make -j4&lt;br /&gt;
* Another useful tool is [http://ccache.samba.org/ ccache], especially if you plan to rebuild CEGUI multiple times, but you already knew this ;)&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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4679</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=4679"/>
				<updated>2011-12-16T15:52:12Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Build Options */&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
 [~/cegui]$ mkdir cegui_mk2/build&lt;br /&gt;
 [~/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;
===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;
 [~/cegui/cegui_mk2]$ cd build&lt;br /&gt;
 [~/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;
 [~/cegui/cegui_mk2/build]$ 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;
{{Todo|Build general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific notes}}&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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4678</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=4678"/>
				<updated>2011-12-16T15:15:39Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Building */&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;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
 [~/cegui]$ mkdir cegui_mk2/build&lt;br /&gt;
 [~/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;
===Build Options===&lt;br /&gt;
{{Todo|CMake options}}&lt;br /&gt;
&lt;br /&gt;
===Building===&lt;br /&gt;
{{Todo|Build general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific notes}}&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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4677</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=4677"/>
				<updated>2011-12-16T14:41:56Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Dependencies */ CMake auto-detection&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-source (core CEGUI)&lt;br /&gt;
 cegui/CEED         (editor)&lt;br /&gt;
 cegui/...          (something else)&lt;br /&gt;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
===Build Options===&lt;br /&gt;
{{Todo|CMake options}}&lt;br /&gt;
&lt;br /&gt;
===Building===&lt;br /&gt;
{{Todo|Build general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific notes}}&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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4676</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=4676"/>
				<updated>2011-12-16T14:29:01Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Building */&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-source (core CEGUI)&lt;br /&gt;
 cegui/CEED         (editor)&lt;br /&gt;
 cegui/...          (something else)&lt;br /&gt;
{{Todo|Check directory structure so that CEED (which depends on CEGUI) works}}&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;
===Build Options===&lt;br /&gt;
{{Todo|CMake options}}&lt;br /&gt;
&lt;br /&gt;
===Building===&lt;br /&gt;
{{Todo|Build general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific notes}}&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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
{{Todo|Note and link to prebuilt binary downloads}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Building_from_source&amp;diff=4675</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=4675"/>
				<updated>2011-12-16T13:28:01Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: Work in progress&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;
{{Todo|CMake system intro}}&lt;br /&gt;
{{Todo|Proposed directory structure so that CEED (which depends on CEGUI) works}}&lt;br /&gt;
&lt;br /&gt;
==CEGUI==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Modular design and dependencies}}&lt;br /&gt;
&lt;br /&gt;
===Build Options===&lt;br /&gt;
{{Todo|CMake options}}&lt;br /&gt;
&lt;br /&gt;
===Building===&lt;br /&gt;
{{Todo|Build general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific notes}}&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;
{{Todo|Doxygen howto}}&lt;br /&gt;
&lt;br /&gt;
==CEED==&lt;br /&gt;
{{Todo|Short description}}&lt;br /&gt;
&lt;br /&gt;
===Dependencies===&lt;br /&gt;
{{Todo|Dependencies general}}&lt;br /&gt;
&lt;br /&gt;
====Windows====&lt;br /&gt;
{{Todo|Windows deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Mac====&lt;br /&gt;
{{Todo|Mac deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
====Linux====&lt;br /&gt;
{{Todo|Linux deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
=====Distro1=====&lt;br /&gt;
{{Todo|Distro specific deps &amp;amp; notes}}&lt;br /&gt;
&lt;br /&gt;
===Running===&lt;br /&gt;
{{Todo|Running}}&lt;br /&gt;
&lt;br /&gt;
=Troubleshooting=&lt;br /&gt;
{{Todo|Problems? -&amp;gt; Forum!}}&lt;br /&gt;
&lt;br /&gt;
=Related Articles=&lt;br /&gt;
* [[Eclipse_and_CEGUI]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Template:Todo&amp;diff=4674</id>
		<title>Template:Todo</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Template:Todo&amp;diff=4674"/>
				<updated>2011-12-16T12:56:59Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: Created page with &amp;quot;&amp;lt;noinclude&amp;gt; A ''Todo'' box used to mark missing content.  ====Usage====  &amp;lt;nowiki&amp;gt;{{Todo|Complete this section.}}&amp;lt;/nowiki&amp;gt;  ====Example====  {{Todo|Complete this section.}}&amp;lt;/noinc...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
A ''Todo'' box used to mark missing content.&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{Todo|Complete this section.}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
{{Todo|Complete this section.}}&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;{{Box|Todo:|{{{1}}}|#DDDDBB|#FFFFDD}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Template:Warning&amp;diff=4673</id>
		<title>Template:Warning</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Template:Warning&amp;diff=4673"/>
				<updated>2011-12-16T11:00:32Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: Created page with &amp;quot;&amp;lt;noinclude&amp;gt; '''A 'Warning' box used to report potential danger.  ====Usage====  &amp;lt;nowiki&amp;gt;{{Warning|This text should be heeded.}}&amp;lt;/nowiki&amp;gt;  ====Example====  {{Warning|This text sho...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
'''A 'Warning' box used to report potential danger.&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{Warning|This text should be heeded.}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
{{Warning|This text should be heeded.}}&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;{{Box|Warning:|{{{1}}}|#DDBBBB|#FFDDDD}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Template:Note&amp;diff=4672</id>
		<title>Template:Note</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Template:Note&amp;diff=4672"/>
				<updated>2011-12-16T10:59:37Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: Created page with &amp;quot;&amp;lt;noinclude&amp;gt; '''A 'Note' box used to emphasize important information.'''  ====Usage====  &amp;lt;nowiki&amp;gt;{{Note|This text should be noted.}}&amp;lt;/nowiki&amp;gt;  ====Example====  {{Note|This text sh...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
'''A 'Note' box used to emphasize important information.'''&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
&lt;br /&gt;
&amp;lt;nowiki&amp;gt;{{Note|This text should be noted.}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
{{Note|This text should be noted.}}&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;{{Box|Note:|{{{1}}}|#BBBBDD|#DDDDFF}}&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Template:Box&amp;diff=4671</id>
		<title>Template:Box</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Template:Box&amp;diff=4671"/>
				<updated>2011-12-16T10:55:56Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: Generic message box&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;noinclude&amp;gt;&lt;br /&gt;
&amp;lt;!-- copied from https://wiki.archlinux.org/index.php?title=Template:Box --&amp;gt;&lt;br /&gt;
'''A generic message box.'''&lt;br /&gt;
&lt;br /&gt;
====Usage====&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Box||Content without heading}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Box|Example:|Content with heading}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Box|Example:|Content followed by border-color|#DF0000}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
* &amp;lt;nowiki&amp;gt;{{Box|Example:|Content followed by border-color and background-color|#DF0000|#FFDFDF}}&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Example====&lt;br /&gt;
&lt;br /&gt;
{{Box||Content without heading}}&lt;br /&gt;
{{Box|Example:|Content with heading}}&lt;br /&gt;
{{Box|Example:|Content followed by border-color|#DF0000}}&lt;br /&gt;
{{Box|Example:|Content followed by border-color and background-color|#DF0000|#FFDFDF}}&lt;br /&gt;
&amp;lt;/noinclude&amp;gt;&amp;lt;includeonly&amp;gt;&amp;lt;div style=&amp;quot;padding: 5px; margin: 0.50em 0; background-color: {{{4}}}; border: thin solid {{{3|#000}}}; overflow: hidden;&amp;quot;&amp;gt;&amp;lt;strong&amp;gt; {{{1}}} &amp;lt;/strong&amp;gt;{{{2}}}&amp;lt;/div&amp;gt;&amp;lt;/includeonly&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Porting_tips_and_changes_from_0.7.X_to_0.8.X&amp;diff=4670</id>
		<title>Porting tips and changes from 0.7.X to 0.8.X</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Porting_tips_and_changes_from_0.7.X_to_0.8.X&amp;diff=4670"/>
				<updated>2011-12-16T09:47:52Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: Rotation property changes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{VersionBadge|0.7}}&lt;br /&gt;
&lt;br /&gt;
{{Section|1=Introduction|2=&lt;br /&gt;
This is work in progress, so while this page will be kept as up-to-date as possible, what you read here on any given day will never be definitive and is subject to further change until such time as a stable release is made.  There are no current download packages contain the code this page relates to; this code is only available from the cegui_mk2/trunk directory in the subversion repository (see [[Obtaining the library source from Subversion]]).&lt;br /&gt;
}}&lt;br /&gt;
{{Section|1=Major renames/API changes|2=&lt;br /&gt;
* CEGUI::Window was renamed to CEGUI::Widget as Widget is the coined term for that, WindowManager renamed to WidgetManager, etc... (not in mercurial yet!)&lt;br /&gt;
* The stock/standard window renderer set (now widget renderer set) FalagardWRBase was renamed to StandardWRSet to avoid confusion with core [[Falagard]] facilities (not in mercurial yet!)&lt;br /&gt;
* Image class is now an abstract interface.  BasicImage implementation is provided, and used for internally created Image objects.&lt;br /&gt;
* Imageset class is removed.  You now use the new ImageManager to access defined images.&lt;br /&gt;
* ImagesetManager class is removed.  You now use the new ImageManager.&lt;br /&gt;
* Windows now don't have absolute names! Every window's name only has to be unique in it's parent window.&lt;br /&gt;
}}&lt;br /&gt;
{{Section|1=Name this section|2=&lt;br /&gt;
* Image::draw renamed to Image::render&lt;br /&gt;
* PropertyHelper has been turned into a template class, instead of PropertyHelper::uintToString you do PropertyHelper&amp;lt;uint&amp;gt;::toString, instead of PropertyHelper::stringToUint you do PropertyHelper&amp;lt;uint&amp;gt;::fromString&lt;br /&gt;
* All instances of the word caret that were incorrectly spelt 'carat' have been corrected.  This affects all APIs, properties, events and datafiles.&lt;br /&gt;
* Window::EventWindowUpdated renamed to Window::EventUpdated and the associated string is changed from &amp;quot;WindowUpdate&amp;quot; to &amp;quot;Updated&amp;quot;&lt;br /&gt;
* ListHeader::SegmentNameSuffix changed type from character array to CEGUI::String&lt;br /&gt;
* EventMouseEnters renamed to EventMouseEntersSurface (old name removed)&lt;br /&gt;
* EventMouseLeaves renamed to EventMouseLeavesSurface (old name removed)&lt;br /&gt;
* BiDiVisualMapping renamed to BidiVisualMapping.  Also renamed the files, so CEGUIBiDiVisualMapping.h is now CEGUIBidiVisualMapping.h&lt;br /&gt;
* class colour renamed to Colour, as a side effect the &amp;quot;colour&amp;quot; interpolator is now &amp;quot;Colour&amp;quot; interpolator, this breaks animation definitions!&lt;br /&gt;
* Point typedef removed, please use Vector2 instead&lt;br /&gt;
* Many event string values changed to match the C++ name (but without the Event prefix).  A list of which strings changed value will appear here soon.&lt;br /&gt;
* Window::setRestoreCapture renamed to Window::setRestoreOldCapture&lt;br /&gt;
* CEGUI now supports custom memory allocation, see [[Memory Allocation]] to check if this concerns you or not.&lt;br /&gt;
* Window::addChildWindow renamed to Window::addChild, Window::removeChildWindow renamed to Window::removeChild, several other methods (mostly in layout containers) changed from *ChildWindow* to *Child*&lt;br /&gt;
* CEGUI::String can now be just a typedef or a class, depending on String configuration (CEGUI can now use std::string as CEGUI::String for apps not requiring unicode)&lt;br /&gt;
* Window::getChild_impl method completely removed, it was only used by Window::getParentPixelSize, shouldn't be hard to replace&lt;br /&gt;
* Vector2, Vector3, Size and Rect are now templated, you should use Vector2&amp;lt;float&amp;gt; (or just Vector2&amp;lt;&amp;gt; as a shortcut since float is the default type) instead of Vector2, UVector2 class was removed, UVector2 is now just a typedef to Vector2&amp;lt;UDim&amp;gt;. Same with Vector3, Size and Rect.&lt;br /&gt;
* Texture::saveToMemory is renamed Texture::blitToMemory.&lt;br /&gt;
* Renderer and Texture interfaces changed in order to support named textures.&lt;br /&gt;
* Window::isDisabled(localOnly) is now split into Window::isDisabled (= old isDisabled(true) and Window::isEffectiveDisabled (= old isDisabled(false))&lt;br /&gt;
* Window::isVisible(localOnly) is now split into Window::isVisible (= old isDisabled(true) and Window::isEffectiveVisible (= old isVisible(false))&lt;br /&gt;
* WindowManager::loadWindowLayout is renamed to WindowManager::loadLayoutFromFile&lt;br /&gt;
* NamedXMLResourceManager::create is renamed to NamedXMLResourceManager::createFromFile  (Ex. CEGUI::SchemeManager::createFromFile)&lt;br /&gt;
* Property from Window called &amp;quot;ZOrderChangeEnabled&amp;quot; renamed to &amp;quot;ZOrderingEnabled&amp;quot;&lt;br /&gt;
* Property from Window called &amp;quot;MouseButtonDownAutoRepeat&amp;quot; renamed to &amp;quot;MouseAutoRepeatEnabled&amp;quot;&lt;br /&gt;
* Property from Window called &amp;quot;CustomTooltipType&amp;quot; renamed to &amp;quot;TooltipType&amp;quot;&lt;br /&gt;
* Property from Window called &amp;quot;RiseOnClick&amp;quot; renamed to &amp;quot;RiseOnClickEnabled&amp;quot;&lt;br /&gt;
* Property from Window called &amp;quot;UnifiedAreaRect&amp;quot; renamed to &amp;quot;Area&amp;quot;, &amp;quot;UnifiedSize&amp;quot; renamed to &amp;quot;Size&amp;quot;, etc...&lt;br /&gt;
* CEGUI::DefaultLogger no longer throws const char* but a real exception in setLogFilename - http://www.cegui.org.uk/mantis/view.php?id=443&lt;br /&gt;
* CEGUI now has inbuilt copy, cut, paste support, if you used a custom solution, you might want to check CEGUI::Clipboard and System::injectCopy,Cut,PasteRequest&lt;br /&gt;
* CEGUI::ProgressBar::getStep renamed to getStepSize for consistency with setStepSize&lt;br /&gt;
* CEGUI::WidgetLookManager::parseLookNFeelSpecification is now called parseLookNFeelSpecificationFromFile, variants for loading from string and raw data container have been added&lt;br /&gt;
* XRotation, YRotation, ZRotation properties merged into the new Rotation property, which is a Quaternion.&lt;br /&gt;
}}&lt;br /&gt;
{{Section|1=PyCEGUI|2=&lt;br /&gt;
* EventSet.subscribeEvent now has a different, more pythonic syntax, any python callable (bound member function, free function, lambda, functor, ...) is allowed (EventSet.subscribeEvent(&amp;quot;EventName&amp;quot;, instance, &amp;quot;someMethodInIt&amp;quot;) is now EventSet.subscribeEvent(&amp;quot;EventName&amp;quot;, instance.someMethodInIt)&lt;br /&gt;
}}&lt;br /&gt;
[[Category:Manuals]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=CEED&amp;diff=4669</id>
		<title>CEED</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=CEED&amp;diff=4669"/>
				<updated>2011-12-15T15:16:36Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Arch Linux */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Upcoming CEGUI unified editor. Currently in the early stages. Includes project management and multi-file/multi-tab editing.&lt;br /&gt;
&lt;br /&gt;
== Install ==&lt;br /&gt;
&lt;br /&gt;
CEED depends on an yet unreleased CEGUI 0.8, so you will need to set up a special environment to run it.&lt;br /&gt;
&lt;br /&gt;
[http://www.cegui.org.uk/phpBB2/viewtopic.php?f=15&amp;amp;t=5566 Original post at the forums]&lt;br /&gt;
&lt;br /&gt;
=== Dependencies ===&lt;br /&gt;
&lt;br /&gt;
You need CMake, Python &amp;gt;= 2.6, PyOpenGL, PySide (+ utils/tools), Boost.Python.&lt;br /&gt;
&lt;br /&gt;
==== Debian 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&lt;br /&gt;
&lt;br /&gt;
 apt-get install cmake python-opengl pyside-tools boost-python&lt;br /&gt;
&lt;br /&gt;
==== Arch Linux ====&lt;br /&gt;
&lt;br /&gt;
You need at least python2, boost, python-opengl, pyside (AUR), pyside-tools (AUR). PySide will bring in several other packages and will probably take a few hours to compile.&lt;br /&gt;
&lt;br /&gt;
Note: You probably need to add &amp;quot;-DPYTHON_EXECUTABLE=/usr/bin/python2&amp;quot; (without the quotes) to the cmake command line below because Arch Linux defaults to python 3 but the python modules CMake script expects python2.&lt;br /&gt;
&lt;br /&gt;
==== Fedora ====&lt;br /&gt;
&lt;br /&gt;
You need boost-devel, python-devel, python-opengl, python-pyside, pyside-tools&lt;br /&gt;
&lt;br /&gt;
=== Build CEGUI and PyCEGUI ===&lt;br /&gt;
&lt;br /&gt;
 mkdir -p cegui_mk2/build &lt;br /&gt;
 hg clone http://crayzedsgui.hg.sourceforge.net/hgroot/crayzedsgui/cegui_mk2 cegui_mk2/cegui&lt;br /&gt;
 hg clone http://crayzedsgui.hg.sourceforge.net/hgroot/crayzedsgui/CEED&lt;br /&gt;
 cd cegui_mk2/build&lt;br /&gt;
 cmake -DCEGUI_BUILD_PYTHON_MODULES=ON ../cegui&lt;br /&gt;
 make&lt;br /&gt;
&lt;br /&gt;
== Launch ==&lt;br /&gt;
&lt;br /&gt;
 cd CEED&lt;br /&gt;
 ./runwrapper.sh&lt;br /&gt;
 python CEED.py&lt;br /&gt;
&lt;br /&gt;
or&lt;br /&gt;
 $ cd CEED/bin&lt;br /&gt;
 $ PYTHONPATH=../../cegui_mk2/build/lib:../:$PYTHONPATH python2 ./ceed-gui&lt;br /&gt;
&lt;br /&gt;
You will see a window like this:&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_main_window.png]]&lt;br /&gt;
&lt;br /&gt;
=== Troubleshooting ===&lt;br /&gt;
* If it fails to import ceed.ui.* then you probably need to edit version.py and set CEED_developerMode to True.&lt;br /&gt;
 $ nano ../ceed/version.py&lt;br /&gt;
* If the data files are missing you need to run the 'maintenance' script like this:&lt;br /&gt;
 [CEED/bin]$ cd ..&lt;br /&gt;
 [CEED]$ python2 ./maintenance fetch-datafiles&lt;br /&gt;
&lt;br /&gt;
== Project ==&lt;br /&gt;
&lt;br /&gt;
Unlike old editors (CELayoutEditor and CEImagesetEditor), CEED has a notion of a project. Each project has its own combination of resources and runs its own CEGUI version to render your CEGUI resources. This allows you to have more that one scheme loaded at a time.&lt;br /&gt;
&lt;br /&gt;
To create a new project, you should go to '''File -&amp;gt; New project'''.&lt;br /&gt;
&lt;br /&gt;
The dialog appears. You should input project name and location of the &amp;quot;.project&amp;quot; file. '''Note''': parent directory of the &amp;quot;.project&amp;quot; file must exist.&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_new_project.png]]&lt;br /&gt;
&lt;br /&gt;
After you press '''OK''', Project settings window appears.&lt;br /&gt;
&lt;br /&gt;
=== Project settings ===&lt;br /&gt;
&lt;br /&gt;
(The window is also accessible from '''Edit -&amp;gt; Project settings''')&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_project_settings.png]]&lt;br /&gt;
&lt;br /&gt;
CEED can create assets for CEGUI versions: 0.6 to 0.8. 0.7 is the latest stable, so select it.&lt;br /&gt;
&lt;br /&gt;
Point &amp;quot;Resource directory&amp;quot; to the place where &amp;quot;fonts&amp;quot;, &amp;quot;schemes&amp;quot; and the rest directories are located, then press '''Apply'''. It will change the paths below.&lt;br /&gt;
&lt;br /&gt;
Press '''OK''' and will load your resources. If it fails to, it will show you a warning dialog:&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_new_project_warning.png]]&lt;br /&gt;
&lt;br /&gt;
In our case, the resource directory does not have &amp;quot;schemes&amp;quot; subdirectory, as noted on the last line. Correct the paths and retry.&lt;br /&gt;
&lt;br /&gt;
=== Project resources ===&lt;br /&gt;
&lt;br /&gt;
Currently CEED can only work with imagesets and layouts. Add them to your project by clicking with the right mouse button on '''Project manager''' and selecting '''Add existing file(s)''':&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_project_add_existing.png]]&lt;br /&gt;
&lt;br /&gt;
Select the necessary imagesets and layouts, and save the project.&lt;br /&gt;
&lt;br /&gt;
=== Layouts ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_layout.png]]&lt;br /&gt;
&lt;br /&gt;
To create a new widget, drag it from the left bottom panel.&lt;br /&gt;
&lt;br /&gt;
To edit it, you can either do it visually, or switch to &amp;quot;Code&amp;quot; tab seen below, and edit it manually. There's also &amp;quot;Preview&amp;quot; tab, where you can test your layout in real time.&lt;br /&gt;
&lt;br /&gt;
=== Imagesets ===&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_imageset.png]]&lt;br /&gt;
&lt;br /&gt;
To create a new image, press tool bar button second from the right, or click with the right mouse button on the image itself and select '''Create image''':&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_imageset_create_image.png]]&lt;br /&gt;
&lt;br /&gt;
It creates a 50 x 50 rectangle centered at where mouse cursor is. Move and resize it as you see fit.&lt;br /&gt;
&lt;br /&gt;
== Settings ==&lt;br /&gt;
Go to '''Edit -&amp;gt; Application settings'''.&lt;br /&gt;
&lt;br /&gt;
[[Image:Ceed_application_settings.png]]&lt;br /&gt;
&lt;br /&gt;
There are many settings you can tweak. One of the most important might be '''Shortcuts'''. It allows you to assign shortcuts to zoom, image creation, opening a project, and so on.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
Currently you may have problems with Imagesets that use TGA, since some versions of Qt may be built without TGA support. CEGUI 0.8 has all imagery as PNG (CEGUI 0.7 used TGA), and we advise you to use PNG instead of TGA.&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=4668</id>
		<title>The Beginners Guide to Falagard skinning - Part II</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=4668"/>
				<updated>2011-12-11T23:30:58Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Imagery */ Fix doc link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{VersionBadge|0.4}}&lt;br /&gt;
{{Series|The Beginners Guide to Falagard|2}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Last time we looked at the essential basics to get something running with Falagard. This is great, but a simplistic look'n'feel for a button is a bit boring. So lets step forward and learn something new.&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will create a look'n'feel for the ''Editbox'' window type. This widget is interactive and uses new parts of the Falagard system, making it an excellent target for another tutorial.&lt;br /&gt;
&lt;br /&gt;
So let's get started...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
We'll start out by looking at the requirements for the ''Editbox'' window type. Like always, the information we're looking for can be found in the [http://www.cegui.org.uk/docs/current/fal_wr_ref.html Falagard Window Renderer Requirements].&lt;br /&gt;
&lt;br /&gt;
In there we'll see that the ''Editbox'' is a bit more complex than the ''Button''. But fear not - we'll get through every part of it ;-)&lt;br /&gt;
&lt;br /&gt;
Let's start out with the ''StateImagery'' needed for this widget:&lt;br /&gt;
* Enabled&lt;br /&gt;
* Disabled&lt;br /&gt;
* ReadOnly&lt;br /&gt;
* ActiveSelection&lt;br /&gt;
* InactiveSelection&lt;br /&gt;
&lt;br /&gt;
Unlike the ''Button'' we don't have any optional states. ''Enabled'' and ''Disabled'' should speak for themselves. ''ReadOnly'' is used when the ''Editbox'' is in read-only mode (easy huh?).&lt;br /&gt;
&lt;br /&gt;
The ''ActiveSelection'' state is somewhat special. It should define what imagery to render for the selection graphics itself when the window is in an activated state (has focus).&lt;br /&gt;
''InactiveSelection'' is the same, except it is used when the window is '''not''' active (does'nt have focus).&lt;br /&gt;
&lt;br /&gt;
Besides the ''StateImagery'' needed, a ''Editbox'' also requires a ''NamedArea'' called '''TextArea''' and a ''ImagerySection'' named '''Carat''' (yes, car'''a'''t).&lt;br /&gt;
We'll have a much closer look at these later on.&lt;br /&gt;
&lt;br /&gt;
The initial XML (with the parts we know about) looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
 	&amp;lt;ImagerySection name=&amp;quot;Carat&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We'll fill it out as we go...&lt;br /&gt;
&lt;br /&gt;
== Imagery ==&lt;br /&gt;
This look'n'feel will use a frame consisting of 8 different images from our favorite imageset ''MyImages''. Furthermore we'll have a single image stretched to fill the hole in this frame. The images will have names that are easy to interpret:&lt;br /&gt;
{| cellpadding=&amp;quot;15&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Frame setup&lt;br /&gt;
| TL || align=&amp;quot;center&amp;quot; | T || TR&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | L || Bg|| align=&amp;quot;center&amp;quot; |R&lt;br /&gt;
|-&lt;br /&gt;
| BL || align=&amp;quot;center&amp;quot; | B || BR&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each prefixed with '''Editbox'''. Forming imagenames like '''EditboxTL''' etc.&lt;br /&gt;
&lt;br /&gt;
The ''FrameComponent'' tag may only occur inside an ''ImagerySection''. Just like the ''ImageryComponent'' and ''TextComponent'' that we used in part I.&lt;br /&gt;
&lt;br /&gt;
Using the ''FrameComponent'' is very much like using the ''ImageryComponent'' all the tags allowed are the same, but a ''FrameComponent'' allows up to nine images to be specified. It's purpose is to make making frames easy :-)&lt;br /&gt;
A ''FrameComponent'' is special in the way it handles formatting compared to ''ImageryComponent'' though. Any formatting options are only applied to the background image - if it's specified. Yes. We don't have to set all nine of them. We can just choose the image &amp;quot;positions&amp;quot; we need. In our case we'll use all of them tough...&lt;br /&gt;
&lt;br /&gt;
Let's look at the XML for this ''FrameComponent'':&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;FrameComponent&amp;gt;&lt;br /&gt;
        &amp;lt;Area&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;/Area&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;TopLeftCorner&amp;quot;     imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTL&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;TopEdge&amp;quot;           imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;TopRightCorner&amp;quot;    imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTR&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;RightEdge&amp;quot;         imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;BottomRightCorner&amp;quot; imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBR&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;BottomEdge&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;BottomLeftCorner&amp;quot;  imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBL&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;LeftEdge&amp;quot;          imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;Background&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBg&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/FrameComponent&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should recognise the area. It's the full area of the window, exactly like the areas we used in part I.&lt;br /&gt;
Reason: We want the frame and background to cover the entire window. Simple :-)&lt;br /&gt;
&lt;br /&gt;
Nine images are specifed. The order does not matter.&lt;br /&gt;
But note that compared to the ''ImageryComponent'' used last time, we must specify a type attribute for the images.&lt;br /&gt;
This is so Falagard knows where to place this image in the frame.&lt;br /&gt;
These are of course listed in the [http://www.cegui.org.uk/docs/current/fal_enum_ref.html Falagard XML Enumeration Reference].&lt;br /&gt;
&lt;br /&gt;
The format both horizontally and vertically is ''Stretched''. This ensures that the background image is stretched to fill as much as possible of the &amp;quot;hole&amp;quot; created by the border images (TL,T,TR etc.).&lt;br /&gt;
&lt;br /&gt;
We'll use this frame for all the 3 states (''Enabled'', ''Disabled'', ''ReadOnly''), but we want the colours to be a little different in each state. In part I we created a new property to hold the colour of the Text. To show a different approach, we'll &amp;quot;hard-code&amp;quot; the frame colours into this look'n'feel.&lt;br /&gt;
&lt;br /&gt;
CEGUI supports using a colour rectangle to modulate the colours of anything it renders. This makes it possible to &amp;quot;apply&amp;quot; nice colour gradients to our frame imagery.&lt;br /&gt;
&lt;br /&gt;
The ''Normal'' state will use the colours, unmodified from the image file.&lt;br /&gt;
&lt;br /&gt;
The ''Disabled'' state will use gray to darken the frame imagery &lt;br /&gt;
&lt;br /&gt;
In the ''ReadOnly'' state we'll create a gradient that is white in the top-left corner, and slightly grayish for the three other corners. When applied to the imagery this will result in the top-left corner using exactly the same colours as in the image file, and the three other corners being slightly darkened.&lt;br /&gt;
&lt;br /&gt;
To use this frame component we must - like stated earlier - fit it in a ''ImagerySection''. We'll call this new imagery section &amp;quot;frame&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This is all the we need to write up the xml for this frame, and use it in our states, so now the XML looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;b&amp;gt;&amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;FrameComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopLeftCorner&amp;quot;     imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopEdge&amp;quot;           imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopRightCorner&amp;quot;    imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;RightEdge&amp;quot;         imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomRightCorner&amp;quot; imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomEdge&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomLeftCorner&amp;quot;  imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;LeftEdge&amp;quot;          imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;Background&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBg&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/FrameComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Carat&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The frame component has been added, and the ''Enabled'', ''Disabled'' and ''ReadOnly'' states have been set up to use them. The only new thing is really the ''Colours'' tag inside the ''Section'' tags for &amp;quot;frame&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It behaves just like the ''ColourProperty'' tag we used in part I, except you can specify a colour to use for each corner.&lt;br /&gt;
It's attributes&lt;br /&gt;
* topLeft&lt;br /&gt;
* topRight&lt;br /&gt;
* bottomLeft&lt;br /&gt;
* bottomRight&lt;br /&gt;
Each specify a single colour of the same format we used for ''ColourProperty'' (AARRGGBB in hex).&lt;br /&gt;
&lt;br /&gt;
== Text ==&lt;br /&gt;
Remeber something about a ''NamedArea''? Either way we're going to look at it now. The ''Editbox'' widget requires us to define a named area so it knows where to render, the text we type in, the caret (the marker that shows us where the characters we type will be inserted) and our selection.&lt;br /&gt;
&lt;br /&gt;
In this look'n'feel, we want the text to be rendered inside our frame. That is we dont want the text to cover the frame imagery itself, only the background of it. Falagard provides a ''ImageDim'' tag that we can use to extract the width and height from the images we used for the frame. Falagard also provides a ''DimOperator'' tag that we can use to do a little math on our dimensions. These features will be the core of our ''NamedArea'' which will be named '''TextArea''' (Stated in the requirements... Remember?)&lt;br /&gt;
&lt;br /&gt;
The only thing we must (and may) specify in a ''NamedArea'' is a ''Area''.&lt;br /&gt;
&lt;br /&gt;
If we take a look back at the ''Area'' tag, we know that it must specify four dimensions. ''LeftEdge'', ''TopEdge'', ''RightEdge'' and ''BottomEdge''. You might remember that we can specify ''Width'' instead of ''RightEdge'', and ''Height'' instead of ''BottomEdge''. But we're not going to do that. Just so you know (and don't forget) ;-)&lt;br /&gt;
&lt;br /&gt;
We start out with a &amp;quot;empty&amp;quot; XML and fill it out as we go. For now it looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Area&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;/Area&amp;gt;&lt;br /&gt;
 &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We start out with the left edge. In the frame we used the image named '''EditboxL''' for the left edge. And as the area we want to define is to lie inside the frame, we'll use the width of this specific image as the left edge of our area.&lt;br /&gt;
The XML for this ''ImageDim'' is like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The top edge is very similar except we'll use the height of the image named '''EditboxT''' instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right edge is a bit more tricky. To start out we'll use a ''UnifiedDim'' that gives us the right edge of our widget.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We use a seperate tag to close it, as by itself this ''UnifiedDim'' is not good enough. We still need the take the frame into accout. The image dimension we're after is the width of the image '''EditboxR'''. We must subtract this width from the right edge to ensure that the frame imagery is not overwritten by a long text string in the ''Editbox''.&lt;br /&gt;
&lt;br /&gt;
The ''DimOperator'' can do this for us with XML like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''DimOperator'' tag requires us to specify the attribute ''op'' with the name of the operation we want to perform as the value. The operations supported by Falagard are:&lt;br /&gt;
* Add&lt;br /&gt;
* Subtract&lt;br /&gt;
* Multiply&lt;br /&gt;
* Divide&lt;br /&gt;
We used ''Subtract'' to &amp;quot;move back&amp;quot; a little from our right edge to make sure we leave the frame imagery for the right edge alone.&lt;br /&gt;
&lt;br /&gt;
The bottom edge of the area is very similar to the right. There are two differences. First we want the ''UnifiedDim'' to take the bottom edge of our window and not the right edge. Second we want to subtract the height of the image named '''EditboxB''' instead too.&lt;br /&gt;
&lt;br /&gt;
This gives us this XML:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we put these four dimensions into our ''NamedArea'' it looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Area&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
             &amp;lt;/Unified&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
             &amp;lt;/Unified&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;/Area&amp;gt;&lt;br /&gt;
 &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the complete ''NamedArea'' for our ''Editbox'' look'n'feel. If we fit it inside our full look'n'feel it will look like the XML below. Notice that the ''NamedArea'' is specifed before the ''ImagerySection''. This is required by Falagard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;b&amp;gt;&amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Area&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;/Area&amp;gt;&lt;br /&gt;
     &amp;lt;/NamedArea&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         ...&lt;br /&gt;
         ... saving space ...&lt;br /&gt;
         ...&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Carat&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We don't reference '''TextArea''' anywhere. Just specifying it is all that is required according to the [[Falagard System base widgets reference]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Caret ==&lt;br /&gt;
The ''Editbox'' has a caret. This is a marker that shows us where we are typing and allows us to tell if we are inserting in the middle of the text or at the end etc. The text is split around it by CEGUI so we don't draw over the text rendering the point we're editing unreadable. All this is currently handled internally and all you need to do is create a ''ImagerySection'' name '''Carat'''.&lt;br /&gt;
&lt;br /&gt;
note by Pompei2: You're reading right, the ''ImagerySection'' is named '''Carat''' although the right word is a caret.&lt;br /&gt;
&lt;br /&gt;
When CEGUI needs render the caret (and the text) it will fetch this ''ImagerySection'' and render it at the appropriate position in the text.&lt;br /&gt;
We do not need to make a ''TextComponent'' in a ''Editbox'' to get the text to render. Because of the pecularities of the caret (and selection which we will handle later) it's all done automatically, by using the ''NamedArea'' '''TextArea''' we just specified along with the real pixel area of the window, to confine rendering to right rectangle on the screen.&lt;br /&gt;
&lt;br /&gt;
Enough details. We just want to render a single image named '''EditboxCaret''' stretched vertically inside the '''TextArea'''.&lt;br /&gt;
&lt;br /&gt;
Creating the ''ImagerySection'' is very much like creating the background for the ''Button'' in part I, the only real difference being the ''Area'' used. We'll look at the XML for this area, it's all made up by stuff we've already seen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;Area&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;Width&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
    &amp;lt;/Area&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first and second (left/top edges) ''Dim''s have the familiar ''AbsoluteDim'' with a value of zero. Nothing new here.&lt;br /&gt;
&lt;br /&gt;
The third ''Dim'' on the other hand is new. It's now specified as &amp;quot;Width&amp;quot; and not &amp;quot;RightEdge&amp;quot; like we have done so far. Inside we have a ''ImageDim'' for the width of the caret image we're using. If we had used the regular ''UnifiedDim'', the caret itself would have the width our textarea (because the caret resides in the text area) and would have been very ugly...&lt;br /&gt;
&lt;br /&gt;
The fourth dimension is the familiar ''UnifiedDim'' we have used in all the earlier areas.&lt;br /&gt;
&lt;br /&gt;
We know from part I how to make a ''ImagerySection'' with a ''ImageryComponent''. This is all we need to render this single-image caret. The XML for our look'n'feel is nearing completion.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
         ...&lt;br /&gt;
         ... saving space ...&lt;br /&gt;
         ...&lt;br /&gt;
     &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         ...&lt;br /&gt;
         ... saving space ...&lt;br /&gt;
         ...&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Carat&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;Width&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/ImageryComponent&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We only specify the vertical formatting for the new ''ImageryComponent'' because we are specifying the area to exactly match the width of the image, and thus any formatting would have no effect. ''LeftAligned'' (the default) is just fine.&lt;br /&gt;
&lt;br /&gt;
Now we just need to do something in the ''ActiveSelection'' and ''InactiveSelection'' states...&lt;br /&gt;
&lt;br /&gt;
== Selection ==&lt;br /&gt;
When the user has selected text in the ''Editbox'', either with the mouse or the keyboard, CEGUI render the selection using the two additional states '''ActiveSelection''' and '''InactiveSelection'''.&lt;br /&gt;
&lt;br /&gt;
The the window is active (has focus) it will use the state '''ActiveSelection''', if if does not have focus (inactive) yet still has a selection '''InactiveSelection''' will be used.&lt;br /&gt;
&lt;br /&gt;
For the selection in this look'n'feel, we'll use a single image stretched over the selection area. This image will contain plain white in the image file so we can apply any colour(s) we choose to the selection imagery.&lt;br /&gt;
Let's call it '''White'''.&lt;br /&gt;
&lt;br /&gt;
For '''ActiveSelection''' we'll use a classic blue colour, for inactive the same, except we'll make it 50% transparent.&lt;br /&gt;
We can avoid a colour tag in the '''ActiveSelection''' state if we specify the colours to use directly in the ''ImageryComponent''. We'll do that to show how it works.&lt;br /&gt;
&lt;br /&gt;
We'll create a new ''ImagerySection'' for this &amp;quot;selection brush&amp;quot; named '''selection'''. XML follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;ImagerySection name=&amp;quot;selection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
         &amp;lt;Area&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;/Area&amp;gt;&lt;br /&gt;
         &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;White&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;Colours topLeft=&amp;quot;FF26458A&amp;quot; topRight=&amp;quot;FF26458A&amp;quot; bottomLeft=&amp;quot;FF26458A&amp;quot; bottomRight=&amp;quot;FF26458A&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
 &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We use a default area that you should recognise by now. CEGUI will automatically use the right size for the selection.&lt;br /&gt;
The image we use is the one called '''White''' from our favorite imageset '''MyImages'''. Like always ;-)&lt;br /&gt;
A colour tag has been added as well to make our selection some kind of blue...&lt;br /&gt;
The vertical and horizontal formatting is ''Stretched'' which is generally what you would want to do in a situation like this.&lt;br /&gt;
&lt;br /&gt;
We'll &amp;quot;call&amp;quot; this ''ImagerySection'' from the '''ActiveSelection''' and '''InactiveSelection''' states. In the '''InactiveSelection''' state we'll further modulate the colours used by passing a 50% transparent white. This will have the effect of using the same colour as in the active state, but make that colour 50% transparent. We could have just specified the full colour to use in each state and remove the ''Colours'' tag from the ''ImageryComponent'', but I wanted to show that multiple modulations are possible with Falagard.&lt;br /&gt;
&lt;br /&gt;
The states are the last thing missing from the look'n'feel, so let's take a look at the final XML (yay :-P ).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Area&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;/Area&amp;gt;&lt;br /&gt;
     &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;FrameComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopLeftCorner&amp;quot;     imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopEdge&amp;quot;           imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopRightCorner&amp;quot;    imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;RightEdge&amp;quot;         imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomRightCorner&amp;quot; imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomEdge&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomLeftCorner&amp;quot;  imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;LeftEdge&amp;quot;          imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;Background&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBg&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/FrameComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Carat&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;Width&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;selection&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;White&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Colours topLeft=&amp;quot;FF26458A&amp;quot; topRight=&amp;quot;FF26458A&amp;quot; bottomLeft=&amp;quot;FF26458A&amp;quot; bottomRight=&amp;quot;FF26458A&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;selection&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;selection&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;7FFFFFFF&amp;quot; topRight=&amp;quot;7FFFFFFF&amp;quot; bottomLeft=&amp;quot;7FFFFFFF&amp;quot; bottomRight=&amp;quot;7FFFFFFF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's it folks. The look'n'feel is done. Hopefully you're starting to play around with the XML and making the look'n'feel suit you (or your artist ;-) ).&lt;br /&gt;
Again, feel free to add comments in the discussion page.&lt;br /&gt;
&lt;br /&gt;
Stay tuned for part III...&lt;br /&gt;
&lt;br /&gt;
--[[User:lindquist]] 00:41, 14 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=4667</id>
		<title>The Beginners Guide to Falagard skinning - Part II</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=The_Beginners_Guide_to_Falagard_skinning_-_Part_II&amp;diff=4667"/>
				<updated>2011-12-11T23:28:43Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Requirements */ Fix doc link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{VersionBadge|0.4}}&lt;br /&gt;
{{Series|The Beginners Guide to Falagard|2}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
Last time we looked at the essential basics to get something running with Falagard. This is great, but a simplistic look'n'feel for a button is a bit boring. So lets step forward and learn something new.&lt;br /&gt;
&lt;br /&gt;
In this tutorial we will create a look'n'feel for the ''Editbox'' window type. This widget is interactive and uses new parts of the Falagard system, making it an excellent target for another tutorial.&lt;br /&gt;
&lt;br /&gt;
So let's get started...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
We'll start out by looking at the requirements for the ''Editbox'' window type. Like always, the information we're looking for can be found in the [http://www.cegui.org.uk/docs/current/fal_wr_ref.html Falagard Window Renderer Requirements].&lt;br /&gt;
&lt;br /&gt;
In there we'll see that the ''Editbox'' is a bit more complex than the ''Button''. But fear not - we'll get through every part of it ;-)&lt;br /&gt;
&lt;br /&gt;
Let's start out with the ''StateImagery'' needed for this widget:&lt;br /&gt;
* Enabled&lt;br /&gt;
* Disabled&lt;br /&gt;
* ReadOnly&lt;br /&gt;
* ActiveSelection&lt;br /&gt;
* InactiveSelection&lt;br /&gt;
&lt;br /&gt;
Unlike the ''Button'' we don't have any optional states. ''Enabled'' and ''Disabled'' should speak for themselves. ''ReadOnly'' is used when the ''Editbox'' is in read-only mode (easy huh?).&lt;br /&gt;
&lt;br /&gt;
The ''ActiveSelection'' state is somewhat special. It should define what imagery to render for the selection graphics itself when the window is in an activated state (has focus).&lt;br /&gt;
''InactiveSelection'' is the same, except it is used when the window is '''not''' active (does'nt have focus).&lt;br /&gt;
&lt;br /&gt;
Besides the ''StateImagery'' needed, a ''Editbox'' also requires a ''NamedArea'' called '''TextArea''' and a ''ImagerySection'' named '''Carat''' (yes, car'''a'''t).&lt;br /&gt;
We'll have a much closer look at these later on.&lt;br /&gt;
&lt;br /&gt;
The initial XML (with the parts we know about) looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
 	&amp;lt;ImagerySection name=&amp;quot;Carat&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 	&amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
 	&amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We'll fill it out as we go...&lt;br /&gt;
&lt;br /&gt;
== Imagery ==&lt;br /&gt;
This look'n'feel will use a frame consisting of 8 different images from our favorite imageset ''MyImages''. Furthermore we'll have a single image stretched to fill the hole in this frame. The images will have names that are easy to interpret:&lt;br /&gt;
{| cellpadding=&amp;quot;15&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|+ Frame setup&lt;br /&gt;
| TL || align=&amp;quot;center&amp;quot; | T || TR&lt;br /&gt;
|-&lt;br /&gt;
| align=&amp;quot;center&amp;quot; | L || Bg|| align=&amp;quot;center&amp;quot; |R&lt;br /&gt;
|-&lt;br /&gt;
| BL || align=&amp;quot;center&amp;quot; | B || BR&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Each prefixed with '''Editbox'''. Forming imagenames like '''EditboxTL''' etc.&lt;br /&gt;
&lt;br /&gt;
The ''FrameComponent'' tag may only occur inside an ''ImagerySection''. Just like the ''ImageryComponent'' and ''TextComponent'' that we used in part I.&lt;br /&gt;
&lt;br /&gt;
Using the ''FrameComponent'' is very much like using the ''ImageryComponent'' all the tags allowed are the same, but a ''FrameComponent'' allows up to nine images to be specified. It's purpose is to make making frames easy :-)&lt;br /&gt;
A ''FrameComponent'' is special in the way it handles formatting compared to ''ImageryComponent'' though. Any formatting options are only applied to the background image - if it's specified. Yes. We don't have to set all nine of them. We can just choose the image &amp;quot;positions&amp;quot; we need. In our case we'll use all of them tough...&lt;br /&gt;
&lt;br /&gt;
Let's look at the XML for this ''FrameComponent'':&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;FrameComponent&amp;gt;&lt;br /&gt;
        &amp;lt;Area&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
            &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;/Area&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;TopLeftCorner&amp;quot;     imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTL&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;TopEdge&amp;quot;           imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;TopRightCorner&amp;quot;    imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTR&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;RightEdge&amp;quot;         imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;BottomRightCorner&amp;quot; imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBR&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;BottomEdge&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;BottomLeftCorner&amp;quot;  imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBL&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;LeftEdge&amp;quot;          imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;Image type=&amp;quot;Background&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBg&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/FrameComponent&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You should recognise the area. It's the full area of the window, exactly like the areas we used in part I.&lt;br /&gt;
Reason: We want the frame and background to cover the entire window. Simple :-)&lt;br /&gt;
&lt;br /&gt;
Nine images are specifed. The order does not matter.&lt;br /&gt;
But note that compared to the ''ImageryComponent'' used last time, we must specify a type attribute for the images.&lt;br /&gt;
This is so Falagard knows where to place this image in the frame.&lt;br /&gt;
These are of course listed in the [[Falagard System XML Enumerations reference]].&lt;br /&gt;
&lt;br /&gt;
The format both horizontally and vertically is ''Stretched''. This ensures that the background image is stretched to fill as much as possible of the &amp;quot;hole&amp;quot; created by the border images (TL,T,TR etc.).&lt;br /&gt;
&lt;br /&gt;
We'll use this frame for all the 3 states (''Enabled'', ''Disabled'', ''ReadOnly''), but we want the colours to be a little different in each state. In part I we created a new property to hold the colour of the Text. To show a different approach, we'll &amp;quot;hard-code&amp;quot; the frame colours into this look'n'feel.&lt;br /&gt;
&lt;br /&gt;
CEGUI supports using a colour rectangle to modulate the colours of anything it renders. This makes it possible to &amp;quot;apply&amp;quot; nice colour gradients to our frame imagery.&lt;br /&gt;
&lt;br /&gt;
The ''Normal'' state will use the colours, unmodified from the image file.&lt;br /&gt;
&lt;br /&gt;
The ''Disabled'' state will use gray to darken the frame imagery &lt;br /&gt;
&lt;br /&gt;
In the ''ReadOnly'' state we'll create a gradient that is white in the top-left corner, and slightly grayish for the three other corners. When applied to the imagery this will result in the top-left corner using exactly the same colours as in the image file, and the three other corners being slightly darkened.&lt;br /&gt;
&lt;br /&gt;
To use this frame component we must - like stated earlier - fit it in a ''ImagerySection''. We'll call this new imagery section &amp;quot;frame&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
This is all the we need to write up the xml for this frame, and use it in our states, so now the XML looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;b&amp;gt;&amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;FrameComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopLeftCorner&amp;quot;     imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopEdge&amp;quot;           imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopRightCorner&amp;quot;    imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;RightEdge&amp;quot;         imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomRightCorner&amp;quot; imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomEdge&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomLeftCorner&amp;quot;  imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;LeftEdge&amp;quot;          imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;Background&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBg&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/FrameComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Carat&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The frame component has been added, and the ''Enabled'', ''Disabled'' and ''ReadOnly'' states have been set up to use them. The only new thing is really the ''Colours'' tag inside the ''Section'' tags for &amp;quot;frame&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
It behaves just like the ''ColourProperty'' tag we used in part I, except you can specify a colour to use for each corner.&lt;br /&gt;
It's attributes&lt;br /&gt;
* topLeft&lt;br /&gt;
* topRight&lt;br /&gt;
* bottomLeft&lt;br /&gt;
* bottomRight&lt;br /&gt;
Each specify a single colour of the same format we used for ''ColourProperty'' (AARRGGBB in hex).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Text ==&lt;br /&gt;
Remeber something about a ''NamedArea''? Either way we're going to look at it now. The ''Editbox'' widget requires us to define a named area so it knows where to render, the text we type in, the caret (the marker that shows us where the characters we type will be inserted) and our selection.&lt;br /&gt;
&lt;br /&gt;
In this look'n'feel, we want the text to be rendered inside our frame. That is we dont want the text to cover the frame imagery itself, only the background of it. Falagard provides a ''ImageDim'' tag that we can use to extract the width and height from the images we used for the frame. Falagard also provides a ''DimOperator'' tag that we can use to do a little math on our dimensions. These features will be the core of our ''NamedArea'' which will be named '''TextArea''' (Stated in the requirements... Remember?)&lt;br /&gt;
&lt;br /&gt;
The only thing we must (and may) specify in a ''NamedArea'' is a ''Area''.&lt;br /&gt;
&lt;br /&gt;
If we take a look back at the ''Area'' tag, we know that it must specify four dimensions. ''LeftEdge'', ''TopEdge'', ''RightEdge'' and ''BottomEdge''. You might remember that we can specify ''Width'' instead of ''RightEdge'', and ''Height'' instead of ''BottomEdge''. But we're not going to do that. Just so you know (and don't forget) ;-)&lt;br /&gt;
&lt;br /&gt;
We start out with a &amp;quot;empty&amp;quot; XML and fill it out as we go. For now it looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Area&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;/Area&amp;gt;&lt;br /&gt;
 &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We start out with the left edge. In the frame we used the image named '''EditboxL''' for the left edge. And as the area we want to define is to lie inside the frame, we'll use the width of this specific image as the left edge of our area.&lt;br /&gt;
The XML for this ''ImageDim'' is like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The top edge is very similar except we'll use the height of the image named '''EditboxT''' instead.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The right edge is a bit more tricky. To start out we'll use a ''UnifiedDim'' that gives us the right edge of our widget.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We use a seperate tag to close it, as by itself this ''UnifiedDim'' is not good enough. We still need the take the frame into accout. The image dimension we're after is the width of the image '''EditboxR'''. We must subtract this width from the right edge to ensure that the frame imagery is not overwritten by a long text string in the ''Editbox''.&lt;br /&gt;
&lt;br /&gt;
The ''DimOperator'' can do this for us with XML like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''DimOperator'' tag requires us to specify the attribute ''op'' with the name of the operation we want to perform as the value. The operations supported by Falagard are:&lt;br /&gt;
* Add&lt;br /&gt;
* Subtract&lt;br /&gt;
* Multiply&lt;br /&gt;
* Divide&lt;br /&gt;
We used ''Subtract'' to &amp;quot;move back&amp;quot; a little from our right edge to make sure we leave the frame imagery for the right edge alone.&lt;br /&gt;
&lt;br /&gt;
The bottom edge of the area is very similar to the right. There are two differences. First we want the ''UnifiedDim'' to take the bottom edge of our window and not the right edge. Second we want to subtract the height of the image named '''EditboxB''' instead too.&lt;br /&gt;
&lt;br /&gt;
This gives us this XML:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If we put these four dimensions into our ''NamedArea'' it looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;Area&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
             &amp;lt;/Unified&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
             &amp;lt;b&amp;gt;&amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
             &amp;lt;/Unified&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;/Area&amp;gt;&lt;br /&gt;
 &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the complete ''NamedArea'' for our ''Editbox'' look'n'feel. If we fit it inside our full look'n'feel it will look like the XML below. Notice that the ''NamedArea'' is specifed before the ''ImagerySection''. This is required by Falagard.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;b&amp;gt;&amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Area&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;/Area&amp;gt;&lt;br /&gt;
     &amp;lt;/NamedArea&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         ...&lt;br /&gt;
         ... saving space ...&lt;br /&gt;
         ...&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Carat&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We don't reference '''TextArea''' anywhere. Just specifying it is all that is required according to the [[Falagard System base widgets reference]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Caret ==&lt;br /&gt;
The ''Editbox'' has a caret. This is a marker that shows us where we are typing and allows us to tell if we are inserting in the middle of the text or at the end etc. The text is split around it by CEGUI so we don't draw over the text rendering the point we're editing unreadable. All this is currently handled internally and all you need to do is create a ''ImagerySection'' name '''Carat'''.&lt;br /&gt;
&lt;br /&gt;
note by Pompei2: You're reading right, the ''ImagerySection'' is named '''Carat''' although the right word is a caret.&lt;br /&gt;
&lt;br /&gt;
When CEGUI needs render the caret (and the text) it will fetch this ''ImagerySection'' and render it at the appropriate position in the text.&lt;br /&gt;
We do not need to make a ''TextComponent'' in a ''Editbox'' to get the text to render. Because of the pecularities of the caret (and selection which we will handle later) it's all done automatically, by using the ''NamedArea'' '''TextArea''' we just specified along with the real pixel area of the window, to confine rendering to right rectangle on the screen.&lt;br /&gt;
&lt;br /&gt;
Enough details. We just want to render a single image named '''EditboxCaret''' stretched vertically inside the '''TextArea'''.&lt;br /&gt;
&lt;br /&gt;
Creating the ''ImagerySection'' is very much like creating the background for the ''Button'' in part I, the only real difference being the ''Area'' used. We'll look at the XML for this area, it's all made up by stuff we've already seen.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;Area&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;Width&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
        &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
        &amp;lt;/Dim&amp;gt;&lt;br /&gt;
    &amp;lt;/Area&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The first and second (left/top edges) ''Dim''s have the familiar ''AbsoluteDim'' with a value of zero. Nothing new here.&lt;br /&gt;
&lt;br /&gt;
The third ''Dim'' on the other hand is new. It's now specified as &amp;quot;Width&amp;quot; and not &amp;quot;RightEdge&amp;quot; like we have done so far. Inside we have a ''ImageDim'' for the width of the caret image we're using. If we had used the regular ''UnifiedDim'', the caret itself would have the width our textarea (because the caret resides in the text area) and would have been very ugly...&lt;br /&gt;
&lt;br /&gt;
The fourth dimension is the familiar ''UnifiedDim'' we have used in all the earlier areas.&lt;br /&gt;
&lt;br /&gt;
We know from part I how to make a ''ImagerySection'' with a ''ImageryComponent''. This is all we need to render this single-image caret. The XML for our look'n'feel is nearing completion.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
         ...&lt;br /&gt;
         ... saving space ...&lt;br /&gt;
         ...&lt;br /&gt;
     &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         ...&lt;br /&gt;
         ... saving space ...&lt;br /&gt;
         ...&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Carat&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;Width&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/ImageryComponent&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We only specify the vertical formatting for the new ''ImageryComponent'' because we are specifying the area to exactly match the width of the image, and thus any formatting would have no effect. ''LeftAligned'' (the default) is just fine.&lt;br /&gt;
&lt;br /&gt;
Now we just need to do something in the ''ActiveSelection'' and ''InactiveSelection'' states...&lt;br /&gt;
&lt;br /&gt;
== Selection ==&lt;br /&gt;
When the user has selected text in the ''Editbox'', either with the mouse or the keyboard, CEGUI render the selection using the two additional states '''ActiveSelection''' and '''InactiveSelection'''.&lt;br /&gt;
&lt;br /&gt;
The the window is active (has focus) it will use the state '''ActiveSelection''', if if does not have focus (inactive) yet still has a selection '''InactiveSelection''' will be used.&lt;br /&gt;
&lt;br /&gt;
For the selection in this look'n'feel, we'll use a single image stretched over the selection area. This image will contain plain white in the image file so we can apply any colour(s) we choose to the selection imagery.&lt;br /&gt;
Let's call it '''White'''.&lt;br /&gt;
&lt;br /&gt;
For '''ActiveSelection''' we'll use a classic blue colour, for inactive the same, except we'll make it 50% transparent.&lt;br /&gt;
We can avoid a colour tag in the '''ActiveSelection''' state if we specify the colours to use directly in the ''ImageryComponent''. We'll do that to show how it works.&lt;br /&gt;
&lt;br /&gt;
We'll create a new ''ImagerySection'' for this &amp;quot;selection brush&amp;quot; named '''selection'''. XML follows:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;ImagerySection name=&amp;quot;selection&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
         &amp;lt;Area&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;/Area&amp;gt;&lt;br /&gt;
         &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;White&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;Colours topLeft=&amp;quot;FF26458A&amp;quot; topRight=&amp;quot;FF26458A&amp;quot; bottomLeft=&amp;quot;FF26458A&amp;quot; bottomRight=&amp;quot;FF26458A&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
     &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
 &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We use a default area that you should recognise by now. CEGUI will automatically use the right size for the selection.&lt;br /&gt;
The image we use is the one called '''White''' from our favorite imageset '''MyImages'''. Like always ;-)&lt;br /&gt;
A colour tag has been added as well to make our selection some kind of blue...&lt;br /&gt;
The vertical and horizontal formatting is ''Stretched'' which is generally what you would want to do in a situation like this.&lt;br /&gt;
&lt;br /&gt;
We'll &amp;quot;call&amp;quot; this ''ImagerySection'' from the '''ActiveSelection''' and '''InactiveSelection''' states. In the '''InactiveSelection''' state we'll further modulate the colours used by passing a 50% transparent white. This will have the effect of using the same colour as in the active state, but make that colour 50% transparent. We could have just specified the full colour to use in each state and remove the ''Colours'' tag from the ''ImageryComponent'', but I wanted to show that multiple modulations are possible with Falagard.&lt;br /&gt;
&lt;br /&gt;
The states are the last thing missing from the look'n'feel, so let's take a look at the final XML (yay :-P ).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt; &lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;NamedArea name=&amp;quot;TextArea&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Area&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;DimOperator op=&amp;quot;Subtract&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; dimension=&amp;quot;Height&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/DimOperator&amp;gt;&lt;br /&gt;
                 &amp;lt;/Unified&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;/Area&amp;gt;&lt;br /&gt;
     &amp;lt;/NamedArea&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;FrameComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopLeftCorner&amp;quot;     imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopEdge&amp;quot;           imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxT&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;TopRightCorner&amp;quot;    imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxTR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;RightEdge&amp;quot;         imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomRightCorner&amp;quot; imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBR&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomEdge&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxB&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;BottomLeftCorner&amp;quot;  imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;LeftEdge&amp;quot;          imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxL&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Image type=&amp;quot;Background&amp;quot;        imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxBg&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/FrameComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;Carat&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;Width&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;ImageDim imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; dimension=&amp;quot;Width&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;EditboxCaret&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;ImagerySection name=&amp;quot;selection&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
             &amp;lt;Area&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                     &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;/Area&amp;gt;&lt;br /&gt;
             &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;White&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;Colours topLeft=&amp;quot;FF26458A&amp;quot; topRight=&amp;quot;FF26458A&amp;quot; bottomLeft=&amp;quot;FF26458A&amp;quot; bottomRight=&amp;quot;FF26458A&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Enabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FF7F7F7F&amp;quot; topRight=&amp;quot;FF7F7F7F&amp;quot; bottomLeft=&amp;quot;FF7F7F7F&amp;quot; bottomRight=&amp;quot;FF7F7F7F&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ReadOnly&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;frame&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;FFFFFFFF&amp;quot; topRight=&amp;quot;FFDFDFDF&amp;quot; bottomLeft=&amp;quot;FFDFDFDF&amp;quot; bottomRight=&amp;quot;FFDFDFDF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;ActiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;selection&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;StateImagery name=&amp;quot;InactiveSelection&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;Layer&amp;gt;&lt;br /&gt;
             &amp;lt;Section section=&amp;quot;selection&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;Colours topLeft=&amp;quot;7FFFFFFF&amp;quot; topRight=&amp;quot;7FFFFFFF&amp;quot; bottomLeft=&amp;quot;7FFFFFFF&amp;quot; bottomRight=&amp;quot;7FFFFFFF&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Section&amp;gt;&lt;br /&gt;
         &amp;lt;/Layer&amp;gt;&lt;br /&gt;
     &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That's it folks. The look'n'feel is done. Hopefully you're starting to play around with the XML and making the look'n'feel suit you (or your artist ;-) ).&lt;br /&gt;
Again, feel free to add comments in the discussion page.&lt;br /&gt;
&lt;br /&gt;
Stay tuned for part III...&lt;br /&gt;
&lt;br /&gt;
--[[User:lindquist]] 00:41, 14 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=The_Beginners_Guide_to_Falagard_skinning_-_Part_I&amp;diff=4666</id>
		<title>The Beginners Guide to Falagard skinning - Part I</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=The_Beginners_Guide_to_Falagard_skinning_-_Part_I&amp;diff=4666"/>
				<updated>2011-12-11T23:26:01Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Label */ Fix doc link&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{VersionBadge|0.4}}&lt;br /&gt;
{{Series|The Beginners Guide to Falagard|1}}&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Falagard system in CEGUI 0.4 and up is a powerful tool.&lt;br /&gt;
By using it you can make your GUI elements look like you want and not how some coder thought looked cool.&lt;br /&gt;
Use Falagard to your advantage and you can do alot of nice things from XML that you might think needed real code.&lt;br /&gt;
&lt;br /&gt;
Falagard allows you not only to define how the rendering of a window proceeds, you can create new representational features as well by creating new properties for the window and using them in your imagery configurations.&lt;br /&gt;
&lt;br /&gt;
Before I go too far glorifying Falagard, we'll just jump right into it :-)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Basics ==&lt;br /&gt;
Falagard is a part of the CEGUI core and is implemented in C++. It is completely possible to write a skin in C++, but it's is not very practical. You have to recompile every time you change something. Fortunately CEGUI supports creating a Falagard skin from a custom XML format.&lt;br /&gt;
&lt;br /&gt;
This Falagard XML format is what we're going to be looking at throughout this tutorial. As I think learning by doing is the way to go, we'll try to produce something useful with this tutorial - a fully working look'n'feel for a regular button.&lt;br /&gt;
&lt;br /&gt;
The beginning:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;WidgetLook name=&amp;quot;MyButton&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the truely minimal XML that defines a widget look. A widget look contains all the information needed to render a specific type of window, a widget look is also what we would define as a look'n'feel.&lt;br /&gt;
The first line tells the parser that this is really a XML document. This must always be the first line of a Falagard XML skin.&lt;br /&gt;
The second line opens the ''Falagard'' tag. This is always the first thing we do after the ''&amp;lt;?xml ... ?&amp;gt;'' tag.&lt;br /&gt;
I hope you're somewhat familiar with XML or at least HTML as this tutorial might be a little difficult to understand if you're not. Now you're warned.&lt;br /&gt;
The third line opens a ''WidgetLook'' tag. This is where we cram all the details about our look'n'feel.&lt;br /&gt;
The fourth line closes the ''WidgetLook'' tag. We must always remember to close our tags.&lt;br /&gt;
The fifth line closes the ''Falagard'' tag. Again - always remember to close your tags.&lt;br /&gt;
&lt;br /&gt;
While this simple XML snippet is good for showing you how to start out, it is completely useless as it does nothing.&lt;br /&gt;
&lt;br /&gt;
To make our look'n'feel interesting we need to tell it what to do. So let's have a look at the Falagard data structure:&lt;br /&gt;
&lt;br /&gt;
* WidgetLook&lt;br /&gt;
** Property definitions&lt;br /&gt;
** Properties&lt;br /&gt;
** Named areas&lt;br /&gt;
** Child components&lt;br /&gt;
** Imagery sections&lt;br /&gt;
** State imagery&lt;br /&gt;
&lt;br /&gt;
This might be overwhelming. It might not. Either way it's the how it is. Falagard is a complex system...&lt;br /&gt;
But it's really not that hard once you get down the basics.&lt;br /&gt;
&lt;br /&gt;
The look'n'feel we are going to produce is for a ''Falagard/Button'' type window. This window type is simple, and we don't have to know about all of the parts of a look'n'feel. We only need to know what we'll be using. Furthermore we'll keep it very simple which leaves us at a point where we can make something work with very little.&lt;br /&gt;
&lt;br /&gt;
I'm still going to give a short description of each item in the list though:&lt;br /&gt;
&lt;br /&gt;
* WidgetLook - This is where we add all the other components for our look'n'feel. Consider it '''the''' look'n'feel.&lt;br /&gt;
&lt;br /&gt;
* Property definitions - A property definition is the creation of a new property in the window that gets the look'n'feel assigned.&lt;br /&gt;
&lt;br /&gt;
* Properties - A property in CEGUI is a window variable that we can access from anywhere. Even outside C++ (think XML window layouts). We often assign default values to properties from a look'n'feel.&lt;br /&gt;
&lt;br /&gt;
* Named areas - A named area defines a rectangle, inside the window we are skinning, with a distinct name. Often used to define where to draw some specific piece of imagery that needs special handling by CEGUI as thus cannot be completely defined in the look'n'feel.&lt;br /&gt;
&lt;br /&gt;
* Child components - Some window types need child windows. This could be scrollbar, a titlebar etc. We specify what type of window this child will be customize it for the situation from the look'n'feel.&lt;br /&gt;
&lt;br /&gt;
* Imagery sections - An imagery section is a collection of imagery components tagged with a name. We use imagery sections to split the renderable parts of our look'n'feel into sections which can be drawn independently. Like for example having the frame in one section and the background in another.&lt;br /&gt;
&lt;br /&gt;
* State imagery - Tells CEGUI what to draw when. In a state imagery we draw all the different imagery sections we need for a specific window &amp;quot;situation&amp;quot;. For our button we will have: Normal, Hover, Pushed, Disabled.&lt;br /&gt;
&lt;br /&gt;
Ok. I hope this clarifies it a bit. We'll go into more detil about the different parts as we need them.&lt;br /&gt;
&lt;br /&gt;
== Requirements ==&lt;br /&gt;
Every time you write a look'n'feel you need to make find out what the requirements are for the type of window you want to skin. To get this information you either look at the header files in the Falagard module source directory, or you reference the manual. This is available both online and in the documentation directory in the SDK as a PDF.&lt;br /&gt;
&lt;br /&gt;
The online version is available on the page [http://www.cegui.org.uk/docs/current/fal_man.html Falagard skinning system for CEGUI]. For the list of these requirements I'm talking about the [http://www.cegui.org.uk/docs/current/fal_wr_ref.html Falagard Window Renderer Requirements] is what you're looking for.&lt;br /&gt;
If we look in there we'll see that ''Falagard/Button'' only require 1 ''StateImagery'' definition to be present. ''Normal''.&lt;br /&gt;
&lt;br /&gt;
It allows up to four ''StateImagery'' definitions to cover all its possible states: ''Normal'', ''Hover'', ''Pushed'' and ''Disabled''.&lt;br /&gt;
&lt;br /&gt;
We'll start out the easy way and just make the ''Normal'' state ;-) So now our XML looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;WidgetLook name=&amp;quot;MyButton&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;StateImagery name=&amp;quot;Normal&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you compare to the last XML piece, the only difference is the addition of a ''StateImagery'' tag with its name attribute set to &amp;quot;Normal&amp;quot;. This makes sure that we live up to the requirement of a &amp;quot;Normal&amp;quot; state definition.&lt;br /&gt;
As I said earlier the ''WidgetLook'' is '''the''' look'n'feel so it is - of course - inside it we add the ''StateImagery'' tag.&lt;br /&gt;
&lt;br /&gt;
This still extremely simple look'n'feel is actually a fully valid look'n'feel. It implements what is required by the manual. Though as you might have guessed it still does nothing.&lt;br /&gt;
To get it to render anything we have to define the imagery sections mentioned earlier.&lt;br /&gt;
&lt;br /&gt;
== Imagery ==&lt;br /&gt;
For our look'n'feel we'll just want a single image to be stretched over the entire window area. That is each corner from the image mapped to each corner of the window.&lt;br /&gt;
&lt;br /&gt;
To acheive this the first thing we need to do is to add a ''ImagerySection'' to our look'n'feel.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;WidgetLook name=&amp;quot;MyButton&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;ImagerySection name=&amp;quot;bg&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;Normal&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;b&amp;gt;&amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we have added the imagery section, and named it &amp;quot;bg&amp;quot;. This name is just something we choose.&lt;br /&gt;
&lt;br /&gt;
Inside the state imagery for the &amp;quot;Normal&amp;quot; state a layer has been added.&lt;br /&gt;
The ''Layer'' tag allow you to control the z-ordering of layers inside in a ''StateImagery'', but we only need one layer for this look'n'feel so let's not worry too much about that.&lt;br /&gt;
&lt;br /&gt;
In the layer a ''Section'' has been added. This tag tells the layer its in that we want the ''ImagerySection'' named &amp;quot;bg&amp;quot; to be rendered as part of this layer.&lt;br /&gt;
&lt;br /&gt;
This is nice. The look'n'feel is all ready and hooked up to render the imagery section &amp;quot;bg&amp;quot; as the imagery for the &amp;quot;Normal&amp;quot; state. But our imagery section is still empty, and this means our look'n'feel really is no better than the previous. It still does nothing (at least visually).&lt;br /&gt;
&lt;br /&gt;
Now that we're over the really basic and boring stuff, let's make it draw that image...&lt;br /&gt;
&lt;br /&gt;
To draw a single image we use the tag ''ImageryComponent''. This tag requires us to define the area in which we want the image to be drawn, as well as the image to draw.&lt;br /&gt;
&lt;br /&gt;
The area is the most complex part of practically all look'n'feels. It is designed to be flexible and uses an extended version of the unified coordinate system of CEGUI 0.4 and up.&lt;br /&gt;
Besides the regular two numbers containing the relative and absolute component of the coordinate or size Falagard also allows us to use the dimensions of images, windows, text and even properties.&lt;br /&gt;
We can also perform arithmetic operations on these dimensions to a certain extent.&lt;br /&gt;
&lt;br /&gt;
Any area needs to define 4 dimensions to fully describe the area. There is some flexibility in how you define the dimensions though.&lt;br /&gt;
Probably the most common is to use one of &amp;quot;LeftEdge&amp;quot;, &amp;quot;TopEdge&amp;quot;, &amp;quot;RightEdge&amp;quot; or &amp;quot;BottomEdge&amp;quot;. These map to edges of the window that recieves the look'n'feel, but you can specify &amp;quot;Width&amp;quot; and &amp;quot;Height&amp;quot; instead of &amp;quot;RightEdge&amp;quot; and &amp;quot;BottomEdge&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The look'n'feel we're creating only needs a simple area that covers the entire widget. We'll take the XML required for that in two steps.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;Area&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
 &amp;lt;/Area&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The area itself is created with the ''Area'' tag. Inside it we have the 4 dimensions. We must explicitly state the type of dimension for each one. The order is important:&lt;br /&gt;
&lt;br /&gt;
* LeftEdge&lt;br /&gt;
* TopEdge&lt;br /&gt;
* RightEdge / Width&lt;br /&gt;
* BottomEdge / Height&lt;br /&gt;
&lt;br /&gt;
You don't have to use '''both''' width and height. For example using &amp;quot;RightEdge&amp;quot; and &amp;quot;Height&amp;quot; is fine.&lt;br /&gt;
&lt;br /&gt;
This tells the area how to interpret the dimensions that we are now going to add:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;Area&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
         '''&amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;'''&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
         '''&amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;'''&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
         '''&amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;'''&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
     &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
         '''&amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;'''&lt;br /&gt;
     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
 &amp;lt;/Area&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Inside each ''Dim'' tag we have added a dimension. Let's take them one at a time.&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt; - This tell it to put our &amp;quot;LeftEdge&amp;quot; ''Dim'' at pixel position 0. All dimensions are always relative to window that has the look'n'feel, so 0 will in this case be the left edge of our widget as we planned.&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt; - Just the same as before. But this time we're in a &amp;quot;TopEdge&amp;quot; ''Dim'' so it will result in the top edge of our window.&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt; - A unified dimension. This one has a scale (relative) component of exactly one. And a offset (absolute) value of zero. As type we've set &amp;quot;RightEdge&amp;quot;. This is what the scale component get multiplied by to get some thing useful (pixel values). One times RightEdge will equal RightEdge, which is exactly the window dimension we want.&lt;br /&gt;
&lt;br /&gt;
# &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt; - Same as before but the bottom edge of our window as the dimension.&lt;br /&gt;
&lt;br /&gt;
Now the area to span our entire is worked out, let's add that ''ImageryComponent'' and give it its area.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;WidgetLook name=&amp;quot;MyButton&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;bg&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;b&amp;gt;&amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
                &amp;lt;Area&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                &amp;lt;/Area&amp;gt;&lt;br /&gt;
            &amp;lt;/ImageryComponent&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;Normal&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now the area is in place.&lt;br /&gt;
The ''ImageryComponent'' tag has been added to our ''ImagerySection'' and inside it we have out the area we just created.&lt;br /&gt;
All thats missing now is the image!&lt;br /&gt;
&lt;br /&gt;
We'll assume we have a imageset loaded called &amp;quot;MyImages&amp;quot;. And inside this imageset we have the image &amp;quot;ButtonBG&amp;quot; defined.&lt;br /&gt;
This is the image we'll use for our button.&lt;br /&gt;
&lt;br /&gt;
The XML looks like this&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;ButtonBG&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Simple eh?&lt;br /&gt;
&lt;br /&gt;
We also wanted the image to be stretched across the whole area of the ''ImageryComponent''. The default formatting in top/left alignment. Not good enough...&lt;br /&gt;
&lt;br /&gt;
We add the formatting tags&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Vertical format must come first. Both sets stretching as the formatting. Which is what we need.&lt;br /&gt;
That's all we wanted in the look'n'feel so let's have a look at the XML for this extremely simple button skin.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;WidgetLook name=&amp;quot;MyButton&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;bg&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
                &amp;lt;Area&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                &amp;lt;/Area&amp;gt;&lt;br /&gt;
                &amp;lt;b&amp;gt;&amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;ButtonBG&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
            &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;Normal&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The three new tags just got added after the area in the ''ImageryComponent'', and we're done :)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Label ==&lt;br /&gt;
You might have noticed that I have'nt talked about the label until now.&lt;br /&gt;
We'll need to take a look at it now or we won't get any text on our button.&lt;br /&gt;
With Falagard you have full control of how the text is rendered.&lt;br /&gt;
&lt;br /&gt;
For our look'n'feel we want the text to be centered both vertically and horizontally in the widget. We also want the text to wrap (word wrap) if it's too long to render as one line without being clipped.&lt;br /&gt;
&lt;br /&gt;
We'll make a new ''ImagerySection'' for our label. This gives us a nice seperation of parts to render. &amp;quot;bg&amp;quot; being the background, and a new section called &amp;quot;label&amp;quot; to represent the - You guessed it - label.&lt;br /&gt;
Inside this new ''ImagerySection'' we add a ''TextComponent'' which we'll set up to render the text like we want.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;ImagerySection name=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;TextComponent&amp;gt;&lt;br /&gt;
     &amp;lt;/TextComponent&amp;gt;&lt;br /&gt;
 &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Like a ''ImageryComponent'' a ''TextComponent'' must have an area. For our button we'll allow text to span the entire window. This means that we can reuse the ''Area'' from before.&lt;br /&gt;
&lt;br /&gt;
A ''TextComponent'' by default renders the text of the window that has the look'n'feel assigned.&lt;br /&gt;
This is exactly what we want for our button.&lt;br /&gt;
&lt;br /&gt;
The formatting we wanted is easily made by using the same tag we used before (to format the background image) but with another type. The formattings supported are different for ''TextComponent'' and ''ImageryComponent''.&lt;br /&gt;
&lt;br /&gt;
Let's look at the XML for this new ''ImagerySection'' &amp;quot;label&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;ImagerySection name=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;TextComponent&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;Area&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
             &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                 &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/Dim&amp;gt;&lt;br /&gt;
         &amp;lt;/Area&amp;gt;&lt;br /&gt;
         &amp;lt;VertFormat type=&amp;quot;CentreAligned&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;HorzFormat type=&amp;quot;WordWrapCentreAligned&amp;quot; /&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/TextComponent&amp;gt;&lt;br /&gt;
 &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We added the same area as in the &amp;quot;bg&amp;quot; ''ImagerySection'', and added the formattings we wanted. Take a look at [http://www.cegui.org.uk/docs/current/fal_enum_ref.html Falagard XML Enumeration Reference] for the complete listing of supported formattings (and lots of other stuff).&lt;br /&gt;
&lt;br /&gt;
This ''ImagerySection'' is done. It will render the label with the correct formatting using a white colour. By not specifying a colour we always choose white, which is useful as we can modulate it into any colour we choose later on. Which we of course will :-)&lt;br /&gt;
&lt;br /&gt;
To actually use this new &amp;quot;label&amp;quot; section we must add it to our state imagery like we did with the &amp;quot;bg&amp;quot; section earlier. So here's what the XML looks like so far:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;WidgetLook name=&amp;quot;MyButton&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;ImagerySection name=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;TextComponent&amp;gt;&lt;br /&gt;
                &amp;lt;Area&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Area&amp;gt;&lt;br /&gt;
                 &amp;lt;VertFormat type=&amp;quot;CentreAligned&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;HorzFormat type=&amp;quot;WordWrapCentreAligned&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/TextComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;bg&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
                &amp;lt;Area&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                &amp;lt;/Area&amp;gt;&lt;br /&gt;
                &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;ButtonBG&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;Normal&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
                '''&amp;lt;Section section=&amp;quot;label&amp;quot; /&amp;gt;'''&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
     &amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This look'n'feel adds the fully working label (still white) to our button skin. This is starting to become a useful look'n'feel, so let's give it the final touch by adding handling of the three other states ''Hover'', ''Pushed'' and ''Disabled'' that we left out before.&lt;br /&gt;
&lt;br /&gt;
== Colours ==&lt;br /&gt;
We want to use different text colours for each of these states. We also want to able to customize those colours on a per widget basis.&lt;br /&gt;
This is made possible by the property definition.&lt;br /&gt;
&lt;br /&gt;
A ''PropertyDefinition'' creates a new property in the window that gets the look'n'feel assigned. The property we create is a simple string value, but '''we''' choose what it's used for. '''Not''' CEGUI.&lt;br /&gt;
&lt;br /&gt;
In total we have 4 states for our button counting the new ones, so we'll add 4 new properties to store the text colour for each state. The XML is like so:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;PropertyDefinition name=&amp;quot;NormalTextColour&amp;quot; initialValue=&amp;quot;FFFFFFFF&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;PropertyDefinition name=&amp;quot;HoverTextColour&amp;quot; initialValue=&amp;quot;FFFF0000&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;PropertyDefinition name=&amp;quot;PushedTextColour&amp;quot; initialValue=&amp;quot;FF00FF00&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;PropertyDefinition name=&amp;quot;DisabledTextColour&amp;quot; initialValue=&amp;quot;7F888888&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* ''name'' is the name the new property will be available under.&lt;br /&gt;
* ''initialValue'' is the default value for the property.&lt;br /&gt;
* ''redrawOnWrite'' when set to true the window will be redrawn when the value of the property changes.&lt;br /&gt;
&lt;br /&gt;
These properties will be available from both C++ code and in XML window layouts. So choosing a good name is a good idea.&lt;br /&gt;
You can create properties that you don't use for anything inside the look'n'feel. These will still become available which can be a good way of creating new variables for windows that you might need in your application.&lt;br /&gt;
&lt;br /&gt;
The default values represent colours in the format CEGUI would expect a colour for a built-in property.&lt;br /&gt;
Colours for CEGUI are always written in hexadecimal.&lt;br /&gt;
&lt;br /&gt;
The format is: &amp;quot;AARRGGBB&amp;quot; where:&lt;br /&gt;
* AA = Alpha&lt;br /&gt;
* RR = Red&lt;br /&gt;
* GG = Green&lt;br /&gt;
* BB = Blue&lt;br /&gt;
&lt;br /&gt;
This gives our properties the values of&lt;br /&gt;
* white for ''Normal''&lt;br /&gt;
* red for ''Hover''&lt;br /&gt;
* green for ''Pushed''&lt;br /&gt;
* 50% tranparent grey for ''Disabled''&lt;br /&gt;
&lt;br /&gt;
Setting a new value for any of these properties will make sure the button is re-rendered to show the new colour.&lt;br /&gt;
&lt;br /&gt;
The only places in the look'n'feel that know which state we are in are the ''StateImagery'' tags. The ''Section'' tags inside these allow for colours to be specified. The XML for the label in the ''Normal'' state looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;Section name=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
     &amp;lt;ColourProperty name=&amp;quot;NormalTextColour&amp;quot; /&amp;gt;&lt;br /&gt;
 &amp;lt;/Section&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The ''ColourProperty'' tag inside our ''Section'' ensures that all imagery in the imagery section &amp;quot;label&amp;quot; has its colour modulated by the value of the property &amp;quot;NormalTextColour&amp;quot;. The imagery section &amp;quot;label&amp;quot; render only white text, so by doing this we ensure that the colour rendered is exactly that of the value of the property &amp;quot;NormalTextColour&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
We now know what to do so lets look at the XML so far for this look'n'feel:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
 &amp;lt;?xml version=&amp;quot;1.0&amp;quot; ?&amp;gt;&lt;br /&gt;
 &amp;lt;Falagard&amp;gt;&lt;br /&gt;
     &amp;lt;WidgetLook name=&amp;quot;MyButton&amp;quot;&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;PropertyDefinition name=&amp;quot;NormalTextColour&amp;quot; initialValue=&amp;quot;FFFFFFFF&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;PropertyDefinition name=&amp;quot;HoverTextColour&amp;quot; initialValue=&amp;quot;FFFF0000&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;PropertyDefinition name=&amp;quot;PushedTextColour&amp;quot; initialValue=&amp;quot;FF00FF00&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&lt;br /&gt;
         &amp;lt;PropertyDefinition name=&amp;quot;DisabledTextColour&amp;quot; initialValue=&amp;quot;7F888888&amp;quot; redrawOnWrite=&amp;quot;true&amp;quot; /&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;TextComponent&amp;gt;&lt;br /&gt;
                &amp;lt;Area&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                     &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                         &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                     &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                 &amp;lt;/Area&amp;gt;&lt;br /&gt;
                 &amp;lt;VertFormat type=&amp;quot;CentreAligned&amp;quot; /&amp;gt;&lt;br /&gt;
                 &amp;lt;HorzFormat type=&amp;quot;WordWrapCentreAligned&amp;quot; /&amp;gt;&lt;br /&gt;
             &amp;lt;/TextComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;ImagerySection name=&amp;quot;bg&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;ImageryComponent&amp;gt;&lt;br /&gt;
                &amp;lt;Area&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;LeftEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;TopEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;AbsoluteDim value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;RightEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;RightEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                    &amp;lt;Dim type=&amp;quot;BottomEdge&amp;quot;&amp;gt;&lt;br /&gt;
                        &amp;lt;UnifiedDim scale=&amp;quot;1&amp;quot; offset=&amp;quot;0&amp;quot; type=&amp;quot;BottomEdge&amp;quot; /&amp;gt;&lt;br /&gt;
                    &amp;lt;/Dim&amp;gt;&lt;br /&gt;
                &amp;lt;/Area&amp;gt;&lt;br /&gt;
                &amp;lt;Image imageset=&amp;quot;MyImages&amp;quot; image=&amp;quot;ButtonBG&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;VertFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;HorzFormat type=&amp;quot;Stretched&amp;quot; /&amp;gt;&lt;br /&gt;
            &amp;lt;/ImageryComponent&amp;gt;&lt;br /&gt;
         &amp;lt;/ImagerySection&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;Normal&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;b&amp;gt;&amp;lt;Section section=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;ColourProperty name=&amp;quot;NormalTextColour&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;/Section&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;b&amp;gt;&amp;lt;StateImagery name=&amp;quot;Hover&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;ColourProperty name=&amp;quot;HoverTextColour&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;/Section&amp;gt;&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;Pushed&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;ColourProperty name=&amp;quot;PushedTextColour&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;/Section&amp;gt;&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&lt;br /&gt;
         &amp;lt;StateImagery name=&amp;quot;Disabled&amp;quot;&amp;gt;&lt;br /&gt;
            &amp;lt;Layer&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;bg&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;Section section=&amp;quot;label&amp;quot;&amp;gt;&lt;br /&gt;
                    &amp;lt;ColourProperty name=&amp;quot;DisabledTextColour&amp;quot; /&amp;gt;&lt;br /&gt;
                &amp;lt;/Section&amp;gt;&lt;br /&gt;
            &amp;lt;/Layer&amp;gt;&lt;br /&gt;
         &amp;lt;/StateImagery&amp;gt;&amp;lt;/b&amp;gt;&lt;br /&gt;
     &amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
 &amp;lt;/Falagard&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Not too hard was it? The look'n'feel reached a whole new level with these changes, as state is reflected in the text colour.&lt;br /&gt;
&lt;br /&gt;
To sum up what we've made:&lt;br /&gt;
* A look'n'feel for the ''Falagard/Button'' window type.&lt;br /&gt;
* Static background image.&lt;br /&gt;
* Formatted label.&lt;br /&gt;
* Label colour dependent on current state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
That will be enough for this time. It's getting early ;-)&lt;br /&gt;
&lt;br /&gt;
I hope this tutorial is useful and that it will help expose Falagard more broadly.&lt;br /&gt;
&lt;br /&gt;
Please give feedback in the discussion page so I can improve the tutorial where needed.&lt;br /&gt;
&lt;br /&gt;
--[[User:lindquist]] 06:10, 6 Dec 2005 (CET)&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorials]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Animation_System&amp;diff=4663</id>
		<title>Animation System</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Animation_System&amp;diff=4663"/>
				<updated>2011-12-10T15:41:06Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: /* Via Falagard looknfeel XML */  Add colour animation example&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{VersionBadge|0.7}} {{VersionAtLeast|0.7.2}}&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
'''You have to inject time pulses (see System::injectTimePulse), otherwise CEGUI has no idea time is passing and the animations will always be stuck at the position they started at.'''&lt;br /&gt;
&lt;br /&gt;
== Basic concepts ==&lt;br /&gt;
In UI lots of animations are likely to be shared (for example widget specific animation), so CEGUI splits the animation between definition and instance. You can have one animation definition animating large amount of Windows, having only one animation per window is also fine (one animation with only one instance). Animation definitions aren't tied to window type, the only condition  is that the target must have all affected (target properties of all affectors inside the animation) and source properties (all source properties in key frames, if any).&lt;br /&gt;
&lt;br /&gt;
== Purpose of animation classes ==&lt;br /&gt;
&lt;br /&gt;
=== Animation Definition (class {{DoxygenClass|Animation|0.7}}) ===&lt;br /&gt;
This class holds defining data for animations. Specifically duration, replay mode, auto start and list of Affectors. This class doesn't directly animate anything. You have to instantiate it via CEGUI::AnimationManager::instantiateAnimation.&lt;br /&gt;
&lt;br /&gt;
=== Affector (class {{DoxygenClass|Affector|0.7}}) ===&lt;br /&gt;
Affector affects (changes the value of) one property. It holds application method (more about that later), target property, used interpolator and list of key frames.&lt;br /&gt;
&lt;br /&gt;
=== Key Frame (class {{DoxygenClass|KeyFrame|0.7}}) ===&lt;br /&gt;
Key frame represents the value of affected property at given time position. It holds value, source property and time position. Key frames can use values of properties of the affected window. If source property is not empty, property is saved when animation starts and used as value for this key frame.&lt;br /&gt;
&lt;br /&gt;
=== Animation Instance (class {{DoxygenClass|AnimationInstance|0.7}}) ===&lt;br /&gt;
This class uses animation definition to animate Window. It holds animation position and playback speed.&lt;br /&gt;
&lt;br /&gt;
=== Animation Manager (class {{DoxygenClass|AnimationManager|0.7}}) ===&lt;br /&gt;
Singleton class. You use it to create new animation definitions and instantiate existing animation definitions. (You should not construct Animation definitions or Animation instances directly, always use Animation Manager).&lt;br /&gt;
&lt;br /&gt;
=== Interpolator (class {{DoxygenClass|Interpolator|0.7}}) ===&lt;br /&gt;
To be able to animate smoothly between 2 discrete keyframes, interpolators had to be introduced. You don't have to use them directly, everything is done for you in the animation classes. You only need to understand their internals if you need custom interpolator (as all basic interpolators are included in CEGUI, if you find some property that can't be animated with stock interpolators, let us know).&lt;br /&gt;
&lt;br /&gt;
== Defining animations ==&lt;br /&gt;
&lt;br /&gt;
=== Via code ===&lt;br /&gt;
This sample animation takes 0.3 seconds and in that time, it fades the window and rotates it 10 degrees around Y axis.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
   CEGUI::Animation* anim = CEGUI::AnimationManager::getSingleton().createAnimation(&amp;quot;Testing&amp;quot;);&lt;br /&gt;
   anim-&amp;gt;setDuration(0.3f); // duration in seconds&lt;br /&gt;
   anim-&amp;gt;setReplayMode(CEGUI::Animation::RM_Once); // when this animation is started, only play it once, then stop&lt;br /&gt;
   &lt;br /&gt;
   // now we define affector inside our Testing animation&lt;br /&gt;
   {&lt;br /&gt;
    // this affector changes YRotation and interpolates keyframes with float interpolator&lt;br /&gt;
    CEGUI::Affector* affector = anim-&amp;gt;createAffector(&amp;quot;YRotation&amp;quot;, &amp;quot;float&amp;quot;);&lt;br /&gt;
    // at 0.0 seconds, the animation should set YRotation to 10.0 degrees&lt;br /&gt;
    affector-&amp;gt;createKeyFrame(0.0f, &amp;quot;0.0&amp;quot;);&lt;br /&gt;
    // at 0.3 seconds, YRotation should be 0 degrees and animation should progress towards this in an accelerating manner&lt;br /&gt;
    affector-&amp;gt;createKeyFrame(0.3f, &amp;quot;10.0&amp;quot;, CEGUI::KeyFrame::P_QuadraticAccelerating);&lt;br /&gt;
   }&lt;br /&gt;
 &lt;br /&gt;
   // animation can have more than one affectors! lets define another affector that changes Alpha&lt;br /&gt;
   {&lt;br /&gt;
    // this affector will again use float interpolator&lt;br /&gt;
    CEGUI::Affector* affector = anim-&amp;gt;createAffector(&amp;quot;Alpha&amp;quot;, &amp;quot;float&amp;quot;);&lt;br /&gt;
    affector-&amp;gt;createKeyFrame(0.0f, &amp;quot;1.0&amp;quot;); // at 0.0 seconds, set alpha to 0.5&lt;br /&gt;
    affector-&amp;gt;createKeyFrame(0.3f, &amp;quot;0.5&amp;quot;, CEGUI::KeyFrame::P_QuadraticDecelerating); // at 1.0 seconds, set alpha to 1.0, now decelerating!&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Via [[Falagard]] looknfeel XML ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;WidgetLook ...&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
  &amp;lt;AnimationDefinition name=&amp;quot;Testing&amp;quot; duration=&amp;quot;0.3&amp;quot; replayMode=&amp;quot;once&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;Alpha&amp;quot; interpolator=&amp;quot;float&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;1.0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;0.5&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;YRotation&amp;quot; interpolator=&amp;quot;float&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;10&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
  &amp;lt;/AnimationDefinition&amp;gt;&lt;br /&gt;
&amp;lt;/WidgetLook&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Animating colours example, with [http://www.cegui.org.uk/docs/current/xml_animation.html#xml_animation_keyframe KeyFrame sourceProperty] and the colour [http://www.cegui.org.uk/docs/current/xml_animation.html#xml_animation_affector interpolator]:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
  &amp;lt;AnimationDefinition name=&amp;quot;NormalToHover&amp;quot; duration=&amp;quot;0.2&amp;quot; replayMode=&amp;quot;once&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;CurrentColour&amp;quot; interpolator=&amp;quot;colour&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; sourceProperty=&amp;quot;NormalColour&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.2&amp;quot; sourceProperty=&amp;quot;HoverColour&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
  &amp;lt;/AnimationDefinition&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Via separate animation list XML (AnimationManager::loadAnimationsFromXML) ===&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Animations&amp;gt;&lt;br /&gt;
  &amp;lt;AnimationDefinition name=&amp;quot;Testing&amp;quot; duration=&amp;quot;0.3&amp;quot; replayMode=&amp;quot;once&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;Alpha&amp;quot; interpolator=&amp;quot;float&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;1.0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;0.5&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;YRotation&amp;quot; interpolator=&amp;quot;float&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;10&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
  &amp;lt;/AnimationDefinition&amp;gt;&lt;br /&gt;
&amp;lt;/Animations&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Instantiating animations ==&lt;br /&gt;
If you created the animation in code or via separate animation definition file, you have to instantiate it (only [[Falagard]] instantiates and sets target automatically).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
CEGUI::AnimationInstance* instance = CEGUI::AnimationManager::getSingleton().instantiateAnimation(anim);&lt;br /&gt;
// after we instantiate the animation, we have to set its target window&lt;br /&gt;
instance-&amp;gt;setTargetWindow(targetWindow);&lt;br /&gt;
&lt;br /&gt;
// at this point, you can start this instance and see the results&lt;br /&gt;
instance-&amp;gt;start();&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Connecting events and animations ==&lt;br /&gt;
You often want your animation to start when something happens (Mouse gets over the widget, new FrameWindow is opened, etc). You have two options to achieve this.&lt;br /&gt;
&lt;br /&gt;
If you already are using XML to define animations, the easiest solution is to use the auto event subscription facility. You add pairs of Event name and action that should happen with the animation (&amp;quot;Start&amp;quot;, &amp;quot;Stop&amp;quot;, &amp;quot;Pause&amp;quot;, &amp;quot;Unpause&amp;quot;, etc.) and when target window is set, these subscriptions are automatically made for your convenienve.&lt;br /&gt;
&lt;br /&gt;
Both [[Falagard]] and Animations.xml approaches are the same with regards to this. This XML snippet starts the animation when mouse enters the target window's area.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;AnimationDefinition name=&amp;quot;Testing&amp;quot; duration=&amp;quot;0.3&amp;quot; replayMode=&amp;quot;once&amp;quot;&amp;gt;&lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;Subscription event=&amp;quot;MouseEntersArea&amp;quot; action=&amp;quot;Start&amp;quot; /&amp;gt;&lt;br /&gt;
&amp;lt;/AnimationDefinition&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Doing this in code is much more powerful (you can subscribe to a window that's different than target window) but also more messy:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;cpp&amp;quot;&amp;gt;&lt;br /&gt;
windowWithEvent-&amp;gt;subscribeEvent(CEGUI::Window::EventMouseEntersArea, CEGUI::Event::Subscriber(&amp;amp;CEGUI::AnimationInstance::handleStart, instance));&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can also do this from a Lua script:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;lua&amp;quot;&amp;gt;&lt;br /&gt;
CEGUI.WindowManager:getSingleton():getWindow(&amp;quot;WindowName&amp;quot;):subscribeEvent(&amp;quot;MouseEnter&amp;quot;, &amp;quot;luafunctionname&amp;quot;)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
This code sets up the window specified in WindowName, the name of that window on creation or from the XML &amp;quot;Name&amp;quot; property, to react to the mouse entering it by calling the Lua function specified in luafunctionname. The Lua function name argument should be the name, without trailing (), to a function declared in Lua or exported to Lua from C.&lt;br /&gt;
&lt;br /&gt;
== Progression ==&lt;br /&gt;
As I created the implementation, I noticed that linear animations look really boring and predictable. Often times accelerating or decelerating anims will look much better and lively. To make creating those easier, I introduced progression to key frames. This enum tells the system how to progress towards the key frame that holds the progression (that means progression on the first key frame is never used!). The default is linear, meaning that progress towards the keyframe is completely linear. Try the other options yourself to see the differences.&lt;br /&gt;
=== animations.xml example ===&lt;br /&gt;
Here we have edited the example animation so that the alpha value uses the quadratic deceleration progression. This will make the alpha value drop quickly in the first frames but the speed of the change will decrease quickly and give a smooth finish to the transition.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Animations&amp;gt;&lt;br /&gt;
  &amp;lt;AnimationDefinition name=&amp;quot;Testing&amp;quot; duration=&amp;quot;0.3&amp;quot; replayMode=&amp;quot;once&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;Alpha&amp;quot; interpolator=&amp;quot;float&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;1.0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;0.5&amp;quot; progression=&amp;quot;quadratic decelerating&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;YRotation&amp;quot; interpolator=&amp;quot;float&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;10&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
  &amp;lt;/AnimationDefinition&amp;gt;&lt;br /&gt;
&amp;lt;/Animations&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Possible values for this property, in XML, are:&lt;br /&gt;
* &amp;quot;linear&amp;quot;: (default value) Simple linear transition. Same rate of progression for every frame. &lt;br /&gt;
* &amp;quot;discrete&amp;quot;: Abrupt progression, goes from one value straight to the next one.&lt;br /&gt;
* &amp;quot;quadratic accelerating&amp;quot;: Starts slow but accelerates to very fast towards the end.&lt;br /&gt;
* &amp;quot;quadratic decelerating&amp;quot;: Starts very fast but comes smoothly to a halt in the end.&lt;br /&gt;
&lt;br /&gt;
== Application methods ==&lt;br /&gt;
Affectors offer 3 different &amp;quot;application methods&amp;quot;. One is absolute, meaning that the keyframe value is taken as absolute and is directly set to the property after interpolation. The other 2 are relative. That means that when the animation starts, the old values of properties are saved and later used when animating. AM_Relative means saved_value + interpolated_value, AM_RelativeMultiply means saved_value * interpolated_float.&lt;br /&gt;
&lt;br /&gt;
=== animations.xml example: ===&lt;br /&gt;
In the following example we have changed the rotation affector to do relative rotation instead of absolute, which is default. This means that whatever rotation the window had when the animation started it will add the new rotation to that value. The absolute method would have reset the rotation to 0 in the first key frame and then proceeded to rotate it by 10 degrees during 0.3 seconds.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;Animations&amp;gt;&lt;br /&gt;
  &amp;lt;AnimationDefinition name=&amp;quot;Testing&amp;quot; duration=&amp;quot;0.3&amp;quot; replayMode=&amp;quot;once&amp;quot;&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;Alpha&amp;quot; interpolator=&amp;quot;float&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;1.0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;0.5&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
    &amp;lt;Affector property=&amp;quot;YRotation&amp;quot; interpolator=&amp;quot;float&amp;quot; applicationMethod=&amp;quot;relative&amp;quot;&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.0&amp;quot; value=&amp;quot;0&amp;quot; /&amp;gt;&lt;br /&gt;
      &amp;lt;KeyFrame position=&amp;quot;0.3&amp;quot; value=&amp;quot;10&amp;quot; /&amp;gt;&lt;br /&gt;
    &amp;lt;/Affector&amp;gt;&lt;br /&gt;
  &amp;lt;/AnimationDefinition&amp;gt;&lt;br /&gt;
&amp;lt;/Animations&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Possible values for this property, in XML, are:&lt;br /&gt;
* &amp;quot;absolute&amp;quot;: (default setting) The interpolated value is set as the new property value.&lt;br /&gt;
* &amp;quot;relative&amp;quot;: The interpolated value is added to the starting value of the property.&lt;br /&gt;
* &amp;quot;relative multiply&amp;quot;: The interpolated value is multiplied with the starting value of the property.&lt;br /&gt;
&lt;br /&gt;
[[Category:Manuals]]&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=User:Pav&amp;diff=4662</id>
		<title>User:Pav</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=User:Pav&amp;diff=4662"/>
				<updated>2011-12-10T15:31:23Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: Created page with &amp;quot;New here, trying to improve docs while learning about CEGUI (before everything seems obvious and I forget about it).&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;New here, trying to improve docs while learning about CEGUI (before everything seems obvious and I forget about it).&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	<entry>
		<id>http://cegui.org.uk/wiki/index.php?title=Talk:%22Falagard%22_Skinning_System_Documentation&amp;diff=4661</id>
		<title>Talk:&quot;Falagard&quot; Skinning System Documentation</title>
		<link rel="alternate" type="text/html" href="http://cegui.org.uk/wiki/index.php?title=Talk:%22Falagard%22_Skinning_System_Documentation&amp;diff=4661"/>
				<updated>2011-12-10T15:27:00Z</updated>
		
		<summary type="html">&lt;p&gt;Pav: Created page with &amp;quot;Delete? ~~~~&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Delete? [[User:Pav|Pav]] 15:27, 10 December 2011 (UTC)&lt;/div&gt;</summary>
		<author><name>Pav</name></author>	</entry>

	</feed>