Subversion (development) version

Getting the sourcecode

This will create the directory stellarium which contains the source code.

Building the source

Change into the stellarium directory which was created by the svn command above

cd stellarium

Make a builds/unix directory and change into it:

mkdir -p builds/unix
cd builds/unix

By default this will configure Stellarium to be installed in the /usr/local/ area. If this is OK, run CMake like this:

cmake ../..

or, if you would prefer to specify an alternative installation prefix, select it like this

cmake -DCMAKE_INSTALL_PREFIX=/opt/mylocation/ ../..

Now build using make:

make

To run Stellarium from the source tree, change back to the root of the source tree, and call the binary like this:

cd ../..
builds/unix/src/stellarium

If you want to install the program, from the builds/unix directory enter this command (as root if necessary):

make install

Updating SVN

If you have previously build the SVN code, but want to see what changes have been made since you did that, just cd into the stellarium directory and use the command:

svn up

This will download just the changes which were made since you last retrieved files from the repository. Often, all that will be required is to build from the make stage, but if there are new files you will need to build from the CMake stage.

If you modify any files, subversion will attempt to merge new updates with your changed files. This can lead to build problems, and you may want to revert your changes before updating. To revert such local edits, from the stellarium directory, do this before the update:

svn status

And for all files which are listed with an M next to them, do

svn revert filename filesname2 ...

Or you can just revert all changes recursively:

svn revert -R ./

Enabling Sound Support

Audio support for the new scripting engine is available after r3998 of the SVN code. Stellarium's sound support is a compile time option. To use sound in Stellarium you need to have a version of QT which supports the Phonon audio system. You also need a recent version of CMake.

Sound support is controlled by the CMake option ENABLE_SOUND. You can change this setting using ccmake, by editing the CMakeCache.txt file, or by supplying the -DENABLE_SOUND=1 option when you first run CMake.

Current Build Issues

Note that the development code is a work in progress, and as such, please don't expect it to build straight off the bat. Often it will be fine, but sometimes the build will be broken.

If the build seems to be broken for extended periods, try a thorough clean of the build directory (i.e. remove builds/unix), and start from the beginning. Check there are no new dependencies which you are missing. If you still have trouble, post to the forums or stellarium-pubdevel mailing list.

2009-03-10: CMake's detection of Phonon for audio support is not working properly right now. It is necessary to hack up the CMakeLists.txt file to gt it working. I'm working on it. -Matthew