This document will hopefully give you a little overview of what you need to start hacking Xiphos and how the code is laid out. It is not an introduction how to use your shell or compiler.
You need development tools like the C and C++ compiler, make, autoconf, automake and of course all the header files for the libraries required by Xiphos. If you run into any trouble, your system likely misses some of the required tools or header files. Make sure to have a complete installation for development. Most distributions split Gnome into packages for the normal user and packages for development, mostly recognizable with a package name ending with -devel.
If you just want to take a look at the source code, download it from the Xiphos SourceForge page.
There you will find the latest source for the latest official release. If you have time and want to contribute to the development, you should consider using SVN.
Retrieving source code from SVN
One-stop retrieval of the Xiphos tree, for the current release:
svn checkout svn://svn.code.sf.net/p/gnomesword/code/trunk xiphos
Get general information on SVN usage on your system with
First make run
From this point on, whether if you use SVN or a tar file, we use "waf" to configure, build, and install:
./waf configure --prefix=/usr --debug-level=optimized --enable-webkit-editor ./waf build
If you now want to install Xiphos, you may have to become root...
...which asks you for the root password. After that do...
...to let Xiphos install under /usr/local. Compile while not running as the root user, as you can screw up your whole system if something goes wrong. Use a normal user account.
If you do not have root right on your system, you can configure Xiphos with another prefix. For example, your home directory is /home/user. Type...
./waf configure --prefix=/home/user ...
...and Xiphos can be installed in your home directory after the make process.
Hacking the code
The choice of editor or IDE you is up to you. Please read Coding Conventions to understand indention and formatting choices.
Xiphos is separated into three parts:
Main is the glue between backend and gui and contains all the code that does not belong to backend or gui.
The backend is strictly for communicating with the sword library. It should not contain anything else.
The gui is, speaking for itself, just for the gui. The aim is, to keep all gui relevant code out of main and backend, to make it possible to switch between different guis.
The gui is split into the gui header files in the gui directoy which only provides the exported functions for inclusion, plus the gui C files in the gnome2 directory.