CELayout Editor - Getting Started / Building
Abstract
This page tries to get you up and running with the layout editor. It will explain both the use of a distribution, and downloading from SVN. If you have problems, don't hesitate to visit the forums. And besides, you may alter this page with any information you think will be helpful to future readers of this page. Some parts might be a little too verbose, but better safe then sorry ;-) If you're done reading, don't forget to read the manual.
Using a distribution
This is the recommended way. The distributions are stable and compatible with official CEGUI library releases. For example the 0.4.1 editor will work fine ("proven") with the 0.4.1 CEGUI release. Visit the download page for Windows installer(s) and Linux source distribution(s). Before installing a new version, it is recommeded that you uninstall a previous version first, because files might get removed in newer versions and such. On windows you can stop reading now. Linux and/or SVN users must read on for a bit more.
Compiling yourself
If you are a non-windows user, or prefer SVN access over distributions, you must follow the steps mentioned in this topic.
Setup CEGUI
Please see the CEGUI download info for downloading and compiling the cegui library.
Compile WxWidgets
This topic explains how to get and setup this cross-platform application framework.
Distributions for many platforms can be found here.
On Windows
Recommended: WxWidgets (2.8.11)
- Download as .zip
- For compiling you have two options:
- Option 1 (fast): Compile using Visual Studio command line
- Open the VS command line ( Start->All Programs->Microsoft Visual Studio->Visual Studio Tools->Visual Studio command line )
- In the command line change to the build directory wxWidgets-2.8.11\build\msw (example: "cd C:\wxWidgets-2.8.11\build\msw")
- To compile the debug configuration enter nmake -f makefile.vc BUILD=debug UNICODE=1 USE_OPENGL=1
- To compile the release configuration enter nmake -f makefile.vc BUILD=release UNICODE=1 USE_OPENGL=1
- Option 2: Compile using the Visual Studio solution:
- Change the lines #define wxUSE_GLCANVAS 0 to #define wxUSE_GLCANVAS 1 in the following files:
- wxWidgets-2.8.11\include\wx\msw\setup.h
- wxWidgets-2.8.11\include\wx\msw\setup0.h
- wxWidgets-2.8.11\include\wx\univ\setup.h
- Start wxWidgets-2.8.11\build\msw\wx.dsw (if saving the project afterwards, you can open wx.sln for later use cases)
- Build all projects in "Unicode Debug" and "Unicode Release" configurations
- Option 1 (fast): Compile using Visual Studio command line
WxWidgets (2.9.0)
- NOTE: Appearently this release doesn't work well with the editor yet. Please use 2.8.10 as latest 'safe' release.
- Download wxAll.
- Edit wxWidgets-2.9.0\include\wx\msw\setup.h, wxWidgets-2.9.0\include\wx\msw\setup0.h and wxWidgets-2.9.0\include\wx\univ\setup.h to change from #define wxUSE_GLCANVAS 0 to #define wxUSE_GLCANVAS 1.
- Build wxWidgets-2.9.0\build\msw\wx.dsw (Appearently recent wx releases include solutions for vc7, 8 and 9 too).
- More unknown changes???
WxWidgets (2.8.3 - 2.8.10)
- Download wxAll.
- Edit wxWidgets-2.8.3\include\wx\msw\setup0.h and wxWidgets-2.8.3\include\wx\univ\setup.h to change from #define wxUSE_GLCANVAS 0 to #define wxUSE_GLCANVAS 1.
- Build wxWidgets-2.8.3\build\msw\wx.dsw
- More unknown changes???
WxWidgets (2.6.4)
- Download wxAll.
- Edit wxWidgets-2.6.4\include\wx\msw\setup.h and wxWidgets-2.6.4\include\wx\univ\setup.h to change from #define wxUSE_GLCANVAS 0 to #define wxUSE_GLCANVAS 1.
- Build wxWidgets-2.6.4\build\msw\wx.dsw
Note: I (scriptkid) always use the regular 'unicode debug' and 'unicode release' builds. But i assume that the DLLs will work fine too. If it hasn't been done so already, add 'include/msvc' and include to the include build paths and 'lib/vc_lib' to the library paths in Visual Studio.
WxWidgets (less than 2.6.4)
Because of issues I had compiling wxWidgets properly, I'm going to go into more depth for using Visual Studio 7.1 or 8.0 to do so. (Jouninkomiko 05-20-2006)
- Because the editor uses the wxGLCanvas, open include/msvc/wx/setup.h, and change the define for wxUSE_GLCANVAS from 0 to 1.
- Within the src/wxWindows.dsw solution you'll find this setting inside the wxWindows project, under Headers/Setup/setup.h
NOTE: Another Windows specific step-by-step guide was posted in the forums by fjeronimo and can be read here: http://www.cegui.org.uk/phpBB2/viewtopic.php?t=2760
On Linux
- Enter ./configure --with-opengl --enable-unicode
- Enter make
- Enter make install
Setup the editor
This topic explains how to get and setup the editor from sources.
Checkout
If you use a non-command line utility such as TortoiseSVN, you can choose one of these URLs to respectively checkout the HEAD or one of the stable branches.
https://crayzedsgui.svn.sourceforge.net/svnroot/crayzedsgui/CELayoutEditor/trunk https://crayzedsgui.svn.sourceforge.net/svnroot/crayzedsgui/CELayoutEditor/branches/v-0-4-1 https://crayzedsgui.svn.sourceforge.net/svnroot/crayzedsgui/CELayoutEditor/branches/before_wxwidgets
Or, from the command line (same order):
svn co https://crayzedsgui.svn.sourceforge.net/svnroot/crayzedsgui/CELayoutEditor/trunk MyEditorFolder svn co https://crayzedsgui.svn.sourceforge.net/svnroot/crayzedsgui/CELayoutEditor/branches/v-0-4-1 MyEditorFolder svn co https://crayzedsgui.svn.sourceforge.net/svnroot/crayzedsgui/CELayoutEditor/branches/before_wxwidgets MyEditorFolder
Retreiving is always "anonymous", so it should work immediately.
Compile
On windows:
- Open vc++6/CELayoutEditor.dsw (VS6) or vc++6/CELayoutEditor.sln (VS7.1). Conversions should happen automatically when opening on newer versions. Make sure that you add the directories 'wxWidgets-x.x.x\include' and 'wxWidgets-x.x.x\include\msvc' to your Include Directories, and 'wxWidgets-x.x.x\lib\vc_lib' to your Library Directories.
- Also add CEGUI-0.5.0 to the project include folders.
- Also add CEGUI-0.5.0\include to the project include folders.
- Build either Debug or Release.
On Linux:
- Enter ./bootstrap
- Enter ./configure
- Enter make
- Enter make install
- Optionally set the CELAYOUTEDITOR_DATAPATH environment variable to point the editor to the correct 'datafiles' directory. If you do not set this variable, the editor will default to the location where it thinks the datafiles were installed (this will be typically be something like /usr/local/share/CELayoutEditor/datafiles). See the configuration file for additional details.
Hopefully, we will have a mac-compatible project or makefile in the future as well, so watch this space! :-)
Setup CELayoutEditor
- If using the Visual Studio solution: go to the Project Settings and under Debugging set $(TargetDir) as the working directory for your configurations (Debug and Release).
- Get all the CEGUI dll s you need and place them in your working directories. ( e.g. in C:\CELayoutEditor\bin\debug and C:\CELayoutEditor\bin\release if "C:\CELayoutEditor" is your checkout directory). You will also need SILLY.dll and SILLY_d.dll from the CEGUI dependencies respectively placed in the release and debug directories.
- Now after compiling, the CELayoutEditor should be ready to start and working. Everything regarding the .ini files and handling the editor should be covered in the manual.