This is the developer's manual, where you find useful informations for developing on CA.

Toolkits we use

Getting a working dev environment

0. Needed dependencies

  • A working CrystalSpace 1.4+ and CEL 1.4+

If you're running Debian/Ubuntu, then check this howto. If not, you can try to use the graball script from the gibraltar project.

And if you don't manage to get a working CS+CEL with these two methods, or you want to compile it yourself, then go to the CrystalSpace website.

Please don't install CS+CEL from the official Debian packages, it WON'T work

(package names for Ubuntu/Debian):

Copy-paste install (ubuntu/debian):

sudo apt-get install  python-gtk2 python-kiwi python-gtkglext1 python-opengl python-lxml python-louie python-sqlobject python-sqlite python-configobj python-pythonmagick gazpacho python-twisted-core python-twisted-web python-twisted python-setuptools python-processing python-networkx python-pygraphviz python-pydot python-matplotlib python-yaml

1. Get it

# Get GtkCS
hg clone http://rcs.kyanite-studios.org/hg/gtkcs
# Get CAF
hg clone http://rcs.kyanite-studios.org/hg/caf
# Get DAMN
hg clone http://rcs.kyanite-studios.org/hg/damn
# Get CA
hg clone http://rcs.kyanite-studios.org/hg/ca
# Get metamodel
hg clone http://rcs.kyanite-studios.org/hg/metamodel
cd ca
# Obsidian
svn co https://b2cs.delcorp.org/svn/blender2crystal/branches/generalization/libs/obsidian/
# Csproperties
wget http://delcorp.org/~caedes/csproperties.py

2. Copy vfs.cfg

(is this still needed??)

Then, copy your vfs.cfg file :

cp $CRYSTAL/vfs.cfg vfs.cfg

4. Generate the plugins metadata

$CAF/bin/plugdev ca/plugins caf/plugins

5. Setup PYTHONPATH

You need all of the following in pythonpath:

  • ca directory or .
  • $CRYSTAL/out/linuxx86/optimize/bindings/python/
  • $CEL/out/linuxx86/optimize/bindings/python/
  • Parent directory of obsidian, gtkcs and caf
  • Location with csproperties such as apricot/scripts/components/

6. Run

And run it :

cd ca
$CAF/bin/launcher app.py (if this doesn't work, export your PYTHONPATH to point to the requested libs)

CA Design

What is where ?

Knowing what is where while programming is very important, so it's a good start to read the class hierarchies.

The following describes ressources that are not python-specific (so not documented with epydoc) :

  • glade/ : Glade files, for the UI
  • pixmaps/ : All pictures/pixmaps used in the application
  • ca
    • plugins/ : Standard plugins (e.g. CEL).
  • lib : ca resources (textures, handle meshes…)
  • scripts : some example/testing scripts which can be run from the ca console (aka. code editor).

Services

Services are objects that are unique in the system. They are used to exchange informations mostly. They are located inside “ca.core.services”.

Buses

  • Logger : The main logger where you can send and receive status messages
  • Notifier : The main system bus for inter-component communication.

Managers

  • ConfigMgr : The configuration manager
  • PluginMgr : The plugin manager
  • SceneMgr : The scene manager, where you can access information about the currently handled scene
  • AssetMgr : The asset manager, where all Art assets are collected
  • UiMgr : The ui manager, it manages all sections of the interface, and their plugins.
  • CmdMgr : The command manager. Keeps track of all executed commands, and allows to undo and redo.

Interacting with CrystalSpace engine

You can get a pointer to the running CS instance by calling :

CrystalSpace.getSingleton()

A set of pointers are available (2d engine, 3d engine, etc) at the root (resp. cs.g2d, cs.g3d, …). Check sources.

Using/Mapping CS/CEL Objects

CS/CEL objects are handled by the Obsidian library. Check http://b2cs.delcorp.org/index.php/GeneralizationProposal for (not so up-to-date) documentation and http://kyanite-studios.org/docs/obsidian/ for generated doc.

Plugins

The plugin topic is a bit too wide to be covered in a single section. See plugins.

Contributing

Check the developer protocol to find general guidelines for contributing.

Other documents like vision, roadmap and the “development state documents” can help you to see what's going on.

You can also join the mailing list or comment your ideas on irc (irc.freenode.net #kyanite).

 
ca/dev/developer_manual.txt · Last modified: 2009/08/06 01:42 by caedes
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki