Difference between revisions of "CEED"

From CEGUI Wiki - Crazy Eddie's GUI System (Open Source)
Jump to: navigation, search
m (Ubuntu Trusty)
 
(43 intermediate revisions by 10 users not shown)
Line 1: Line 1:
Upcoming CEGUI unified editor. Currently in the early stages. Includes project management and multi-file/multi-tab editing.
+
The CEGUI unified editor. Includes project management and multi-file/multi-tab editing.
 +
 
 +
== Building CEED on Windows ==
 +
Follow these instructions for building and installing CEED on Windows OS: http://cegui.org.uk/wiki/Building_CEED_for_Windows
 +
 
 +
Or, if you don't want to build it yourself, you can use the precompiled binaries: http://sourceforge.net/projects/crayzedsgui/files/CEED/0.8/
  
 
== Install ==
 
== Install ==
  
CEED depends on an yet unreleased CEGUI 0.8, so you will need to set up a special environment to run it.
+
CEED from the v0-8 branch (and all snapshots) depend on CEGUI 0.8. Even though it may work with CEGUI "default" it is not tested with it so don't expect any help if you try to make it work that way.
  
[http://www.cegui.org.uk/phpBB2/viewtopic.php?f=15&t=5566 Original post at the forums]
+
[http://www.cegui.org.uk/phpBB2/viewtopic.php?f=15&t=5566 Original post at the forums] (very old, don't use!)
  
 
=== Dependencies ===
 
=== Dependencies ===
  
You need CMake, Python 2.6, PyOpenGL, PySide (+ utils/tools), Boost.Python.
+
You need CMake, Python >= 2.6 (preferably Python 2.7), PyOpenGL, PySide (+ utils/tools), Boost.Python.
  
 
==== Debian Wheezy ====
 
==== Debian Wheezy ====
Line 16: Line 21:
  
 
  apt-get install cmake python-opengl pyside-tools boost-python
 
  apt-get install cmake python-opengl pyside-tools boost-python
 +
 +
==== Ubuntu Trusty ====
 +
 +
In ubuntu, you must install the python-pyside package as well as pyside-tools, pyside-tools does not pull it in.
 +
 +
  apt-get install python python-pyside pyside-tools python-opengl libboost-python-dev
 +
 +
==== Arch Linux ====
 +
 +
You need at least python2, boost, python2-opengl, python2-pyside (AUR), python2-pyside-tools (AUR). PySide will bring in several other packages and will probably take a few hours to compile.
 +
 +
'''Important Note''': You probably need to add "-DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/python2.7" (without the quotes) to the cmake command line below because Arch Linux defaults to python 3 but the python modules CMake script expects python2. Also different GLFW version might get mixed up causing the compilation to fail. So if you are just interested in compiling CEGUI for CEED, you might also want to add "-DCEGUI_SAMPLES_ENABLED=OFF" to the cmake command below.
 +
 +
Arch Linux has the entire ceed packaged, see the AUR repo and save yourself all this trouble.
 +
 +
==== Fedora ====
 +
 +
You need boost-devel, python-devel, python-opengl, python-pyside, pyside-tools
  
 
=== Build CEGUI and PyCEGUI ===
 
=== Build CEGUI and PyCEGUI ===
  
mkdir -p cegui_mk2/build
+
(Or get it from distribution repo and skip this)
  hg clone http://crayzedsgui.hg.sourceforge.net/hgroot/crayzedsgui/cegui_mk2 cegui_mk2/cegui
+
 
  hg clone http://crayzedsgui.hg.sourceforge.net/hgroot/crayzedsgui/CEED
+
  hg clone https://bitbucket.org/cegui/cegui
  cd cegui_mk2/build
+
  hg clone https://bitbucket.org/cegui/ceed
  cmake -DCEGUI_BUILD_PYTHON_MODULES=ON ../cegui
+
cd ceed
make
+
hg update v0-8
 +
cd ../
 +
cd cegui
 +
hg update v0-8
 +
cd ../
 +
mkdir cegui/build
 +
  cd cegui/build
 +
  cmake -DCEGUI_BUILD_PYTHON_MODULES=ON -DCEGUI_BUILD_RENDERER_OPENGL=ON -DCEGUI_BUILD_RENDERER_OPENGL3=ON ../  
 +
 
 +
==== Renderers ====
 +
 
 +
CEED requires the OpenGL2 renderer to be enabled. This is what it uses to function. However in CEGUI 0.8 you have to enable both OpenGL2 and OpenGL3 renderers for the bindings to work correctly.
 +
 
 +
Make sure "CEGUI_BUILD_RENDERER_OPENGL" and "CEGUI_BUILD_RENDERER_OPENGL3" are both enabled before you build CEGUI.
  
 
== Launch ==
 
== Launch ==
  
  cd CEED
+
  cd ../ceed
 +
cd bin
 
  ./runwrapper.sh
 
  ./runwrapper.sh
  python CEED.py
+
  ./ceed-gui
  
== Overview ==
+
or
 +
$ cd ../ceed/bin
 +
$ PYTHONPATH=../../cegui/build/lib:../:$PYTHONPATH python2 ./ceed-gui
  
Unlike old editors (CELayoutEditor and CEImagesetEditor), CEED has a notion of a project. Each project has it's 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.
+
You will see a window like this:
 +
 
 +
[[Image:Ceed_main_window.png]]
 +
 
 +
=== Troubleshooting ===
 +
* If it fails to import ceed.ui.* then you need to compile UI files, call
 +
[ceed] ./maintenance compile-ui-files
 +
Or alternatively edit ceed/version.py and set CEED_developerMode to True.
 +
* If the data files are missing you need to run the 'maintenance' script like this:
 +
[ceed/bin]$ cd ..
 +
[ceed]$ ./maintenance fetch-datafiles
 +
 
 +
== Project ==
 +
 
 +
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.
 +
 
 +
To create a new project, you should go to '''File -> New project'''.
 +
 
 +
The dialog appears. You should input project name and location of the ".project" file. '''Note''': parent directory of the ".project" file must exist.
 +
 
 +
[[Image:Ceed_new_project.png]]
 +
 
 +
After you press '''OK''', Project settings window appears.
 +
 
 +
=== Project settings ===
 +
 
 +
(The window is also accessible from '''Edit -> Project settings''')
 +
 
 +
[[Image:Ceed_project_settings.png]]
 +
 
 +
CEED can create assets for CEGUI versions: 0.6 to 0.8. 0.7 is the latest stable, so select it.
 +
 
 +
Point "Resource directory" to the place where "fonts", "schemes" and the rest directories are located, then press '''Apply'''. It will change the paths below.
 +
 
 +
Press '''OK''' and will load your resources. If it fails to, it will show you a warning dialog:
 +
 
 +
[[Image:Ceed_new_project_warning.png]]
 +
 
 +
In our case, the resource directory does not have "schemes" subdirectory, as noted on the last line. Correct the paths and retry.
 +
 
 +
=== Project resources ===
 +
 
 +
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)''':
 +
 
 +
[[Image:Ceed_project_add_existing.png]]
 +
 
 +
Select the necessary imagesets and layouts, and save the project.
 +
 
 +
=== Layouts ===
 +
 
 +
[[Image:Ceed_layout.png]]
 +
 
 +
To create a new widget, drag it from the left bottom panel.
 +
 
 +
If you just created a new layout using CEED, you will notice that both the Visual and the Code views are empty. The created file is indeed entirely empty so far. In order to start working, we recommend to add a DefaultWindow as root, and add everything else to this root. In CEGUI it is always recommended to have a root window that covers the entire screen (you can do this by simply setting a window's size to {1.0, 1.0} relative sizes and the position to 0, which is both the default for DefaultWindow's). You can simply drag a DefaultWindow into the Widget Hierarchy or into the Visual window to add a new DefaultWindow as root for your empty layout. If you switch to the code window you will see that the basic XML structure of your layout has been set up for you.
 +
 
 +
To edit it, you can either do it visually, or switch to "Code" tab seen below, and edit it manually. There's also "Preview" tab, where you can test your layout in real time.
 +
 
 +
=== Imagesets ===
 +
 
 +
[[Image:Ceed_imageset.png]]
 +
 
 +
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''':
 +
 
 +
[[Image:Ceed_imageset_create_image.png]]
 +
 
 +
It creates a 50 x 50 rectangle centered at where mouse cursor is. Move and resize it as you see fit.
 +
 
 +
== Settings ==
 +
Go to '''Edit -> Application settings'''.
 +
 
 +
[[Image:Ceed_application_settings.png]]
 +
 
 +
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.
  
 
== Notes ==
 
== Notes ==
 +
 +
You can now use the ceed-migrate tool for converting between old and new CEGUI datafiles. Here is a quick guide for that: http://cegui.org.uk/wiki/Using_CEED-Migrate
  
 
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.
 
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.
 +
 +
== Complete Install Notes for Ubuntu ==
 +
 +
This script was tested Nov 24 2015 with a fresh install of Ubuntu 15.10 Wily, and successfully installed working ceed in home directory. Build took approximately 1 hour with 3 cores.
 +
 +
#!/bin/bash
 +
set -e
 +
set -u
 +
 +
# Install dependencies
 +
sudo apt-get update
 +
sudo apt-get -y upgrade
 +
 +
# Build tools
 +
sudo apt-get -y install gcc g++
 +
sudo apt-get -y install mercurial cmake-data cmake scons make ccache
 +
 +
# Cegui deps
 +
sudo apt-get -y install libfreetype6-dev libsilly-dev libxml2-dev libexpat1-dev libgles2-mesa-dev libglfw-dev libglew-dev libglm-dev
 +
 +
# Ceed deps
 +
sudo apt-get -y install python python-pyside pyside-tools python-opengl libboost-python-dev
 +
 +
# Clone Repositories
 +
hg clone https://bitbucket.org/cegui/cegui
 +
hg clone https://bitbucket.org/cegui/ceed
 +
cd ceed
 +
hg update v0-8
 +
cd ../
 +
cd cegui
 +
hg update v0-8
 +
cd ../
 +
 +
# Build cegui with python bindings
 +
mkdir cegui/build
 +
cd cegui/build
 +
cmake -DCEGUI_BUILD_PYTHON_MODULES=ON -DCEGUI_BUILD_RENDERER_OPENGL=ON -DCEGUI_BUILD_RENDERER_OPENGL3=ON ../
 +
make -j3
 +
cd ../..
 +
 +
# Adjust ceed "runwrapper.sh" path
 +
cd ceed/bin
 +
sed -i "s|/../../cegui-v0-8|/../../cegui|g" runwrapper.sh
 +
 +
# Now run from ceed/bin with commands:
 +
#  ./runwrapper.sh
 +
#  ./ceed-gui

Latest revision as of 18:07, 24 November 2015

The CEGUI unified editor. Includes project management and multi-file/multi-tab editing.

Building CEED on Windows

Follow these instructions for building and installing CEED on Windows OS: http://cegui.org.uk/wiki/Building_CEED_for_Windows

Or, if you don't want to build it yourself, you can use the precompiled binaries: http://sourceforge.net/projects/crayzedsgui/files/CEED/0.8/

Install

CEED from the v0-8 branch (and all snapshots) depend on CEGUI 0.8. Even though it may work with CEGUI "default" it is not tested with it so don't expect any help if you try to make it work that way.

Original post at the forums (very old, don't use!)

Dependencies

You need CMake, Python >= 2.6 (preferably Python 2.7), PyOpenGL, PySide (+ utils/tools), Boost.Python.

Debian Wheezy

PySide is part of Sid at the moment, so you have to add its repository address to your /etc/apt/sources.list

apt-get install cmake python-opengl pyside-tools boost-python

Ubuntu Trusty

In ubuntu, you must install the python-pyside package as well as pyside-tools, pyside-tools does not pull it in.

 apt-get install python python-pyside pyside-tools python-opengl libboost-python-dev

Arch Linux

You need at least python2, boost, python2-opengl, python2-pyside (AUR), python2-pyside-tools (AUR). PySide will bring in several other packages and will probably take a few hours to compile.

Important Note: You probably need to add "-DPYTHON_EXECUTABLE=/usr/bin/python2 -DPYTHON_INCLUDE_DIR=/usr/include/python2.7 -DPYTHON_LIBRARY=/usr/lib/python2.7" (without the quotes) to the cmake command line below because Arch Linux defaults to python 3 but the python modules CMake script expects python2. Also different GLFW version might get mixed up causing the compilation to fail. So if you are just interested in compiling CEGUI for CEED, you might also want to add "-DCEGUI_SAMPLES_ENABLED=OFF" to the cmake command below.

Arch Linux has the entire ceed packaged, see the AUR repo and save yourself all this trouble.

Fedora

You need boost-devel, python-devel, python-opengl, python-pyside, pyside-tools

Build CEGUI and PyCEGUI

(Or get it from distribution repo and skip this)

hg clone https://bitbucket.org/cegui/cegui
hg clone https://bitbucket.org/cegui/ceed
cd ceed
hg update v0-8
cd ../
cd cegui
hg update v0-8
cd ../
mkdir cegui/build
cd cegui/build
cmake -DCEGUI_BUILD_PYTHON_MODULES=ON -DCEGUI_BUILD_RENDERER_OPENGL=ON -DCEGUI_BUILD_RENDERER_OPENGL3=ON ../ 

Renderers

CEED requires the OpenGL2 renderer to be enabled. This is what it uses to function. However in CEGUI 0.8 you have to enable both OpenGL2 and OpenGL3 renderers for the bindings to work correctly.

Make sure "CEGUI_BUILD_RENDERER_OPENGL" and "CEGUI_BUILD_RENDERER_OPENGL3" are both enabled before you build CEGUI.

Launch

cd ../ceed
cd bin
./runwrapper.sh
./ceed-gui 

or

$ cd ../ceed/bin
$ PYTHONPATH=../../cegui/build/lib:../:$PYTHONPATH python2 ./ceed-gui

You will see a window like this:

Ceed main window.png

Troubleshooting

  • If it fails to import ceed.ui.* then you need to compile UI files, call
[ceed] ./maintenance compile-ui-files

Or alternatively edit ceed/version.py and set CEED_developerMode to True.

  • If the data files are missing you need to run the 'maintenance' script like this:
[ceed/bin]$ cd ..
[ceed]$ ./maintenance fetch-datafiles

Project

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.

To create a new project, you should go to File -> New project.

The dialog appears. You should input project name and location of the ".project" file. Note: parent directory of the ".project" file must exist.

Ceed new project.png

After you press OK, Project settings window appears.

Project settings

(The window is also accessible from Edit -> Project settings)

Ceed project settings.png

CEED can create assets for CEGUI versions: 0.6 to 0.8. 0.7 is the latest stable, so select it.

Point "Resource directory" to the place where "fonts", "schemes" and the rest directories are located, then press Apply. It will change the paths below.

Press OK and will load your resources. If it fails to, it will show you a warning dialog:

Ceed new project warning.png

In our case, the resource directory does not have "schemes" subdirectory, as noted on the last line. Correct the paths and retry.

Project resources

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):

Ceed project add existing.png

Select the necessary imagesets and layouts, and save the project.

Layouts

Ceed layout.png

To create a new widget, drag it from the left bottom panel.

If you just created a new layout using CEED, you will notice that both the Visual and the Code views are empty. The created file is indeed entirely empty so far. In order to start working, we recommend to add a DefaultWindow as root, and add everything else to this root. In CEGUI it is always recommended to have a root window that covers the entire screen (you can do this by simply setting a window's size to {1.0, 1.0} relative sizes and the position to 0, which is both the default for DefaultWindow's). You can simply drag a DefaultWindow into the Widget Hierarchy or into the Visual window to add a new DefaultWindow as root for your empty layout. If you switch to the code window you will see that the basic XML structure of your layout has been set up for you.

To edit it, you can either do it visually, or switch to "Code" tab seen below, and edit it manually. There's also "Preview" tab, where you can test your layout in real time.

Imagesets

Ceed imageset.png

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:

Ceed imageset create image.png

It creates a 50 x 50 rectangle centered at where mouse cursor is. Move and resize it as you see fit.

Settings

Go to Edit -> Application settings.

Ceed application settings.png

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.

Notes

You can now use the ceed-migrate tool for converting between old and new CEGUI datafiles. Here is a quick guide for that: http://cegui.org.uk/wiki/Using_CEED-Migrate

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.

Complete Install Notes for Ubuntu

This script was tested Nov 24 2015 with a fresh install of Ubuntu 15.10 Wily, and successfully installed working ceed in home directory. Build took approximately 1 hour with 3 cores.

#!/bin/bash
set -e
set -u 

# Install dependencies
sudo apt-get update
sudo apt-get -y upgrade

# Build tools
sudo apt-get -y install gcc g++
sudo apt-get -y install mercurial cmake-data cmake scons make ccache

# Cegui deps
sudo apt-get -y install libfreetype6-dev libsilly-dev libxml2-dev libexpat1-dev libgles2-mesa-dev libglfw-dev libglew-dev libglm-dev

# Ceed deps
sudo apt-get -y install python python-pyside pyside-tools python-opengl libboost-python-dev

# Clone Repositories
hg clone https://bitbucket.org/cegui/cegui
hg clone https://bitbucket.org/cegui/ceed
cd ceed
hg update v0-8
cd ../
cd cegui
hg update v0-8
cd ../

# Build cegui with python bindings
mkdir cegui/build
cd cegui/build
cmake -DCEGUI_BUILD_PYTHON_MODULES=ON -DCEGUI_BUILD_RENDERER_OPENGL=ON -DCEGUI_BUILD_RENDERER_OPENGL3=ON ../ 
make -j3
cd ../..

# Adjust ceed "runwrapper.sh" path
cd ceed/bin
sed -i "s|/../../cegui-v0-8|/../../cegui|g" runwrapper.sh

# Now run from ceed/bin with commands:
#  ./runwrapper.sh
#  ./ceed-gui