         This file describes how to build and install Marble


NOTE: This file describes how to build Marble as a stand-alone
      application.  If you are building Marble as part of the KDE-EDU
      module, then you should instead read the file INSTALL in the top
      level directory of this module and ignore this one.  This is
      most likely ../INSTALL.


Prerequisites for building Marble are:
 - Qt 4.2 or newer
 - cmake version 2.4 or newer
 - (optional): kdelibs from the KDE subversion repositories.
    We have found that Marble v.0.5.x works fine.
 - gpsd-2.37 or newer. Older versions of gpsd had C++ bindings
    removed, how far back I don't know but 2.36 was one of them.
    Great thanks to the gpsd developers for adding them back.

A checkout of Marble. You can check out Marble using SVN via the command:

svn co svn://anonsvn.kde.org/home/kde/trunk/KDE/kdeedu/marble


You can build and install Marble in two different ways:

1. As a Qt-only application.
2. As a KDE application, using kdelibs and KDE based classes.

Choose one of them and read below for how to do it.

NOTE: If you wish to build Marble with debug info include the argument
      -DCMAKE_BUILD_TYPE=debug in the cmake command below.

1. Build Marble as a Qt only application.

1.1 Create a build directory

Create a build directory parallel to the source directory.  Suppose
that the source directory is named 'marble'. Then create a new
directory called 'marble-build'.


1.2 Configure the build tree

Go into the build directory and type

  cmake -DQTONLY=ON ../marble

By default, marble is installed into /usr/local.  If you want to
install it into any other directory, add
-DCMAKE_INSTALL_PREFIX=/path/to/install/into like in this example:

  cmake -DQTONLY=ON -DCMAKE_INSTALL_PREFIX=/home/ingwa/apps ../marble


1.3 Build marble

Also in the build directory, type:

  make


1.4 Install marble

Finally, also from the build directory, type:

  make install

and start Marble either from the menu or via the command line:

  marble


2. Build Marble as a KDE application.

2.1 Create a build directory

This is the same step as for a Qt-only build:

Create a build directory parallel to the source directory.  Suppose
that the source directory is named 'marble'. Then create a new
directory called 'marble-build'.

2.2 Configure the build tree

Go into the build directory and type

  cmake ../marble

From now on the steps are the same as for a Qt-only build.

2.3 Build marble

  make

2.4 Install marble

  make install

and start Marble either from the menu or via the command line:

  marble


3 Adjust Marble's search path for the maps and data

There are several ways to adjust the path where Marble is
drawing it's data from:

3.1 At Compiletime

Use the cmake option -DMARBLE_DATA_PATH to specify the 
built-in system path that Marble gathers its data from:

Example:
  cmake -DQTONLY=ON -DMARBLE_DATA_PATH /mnt1/marble/data ~/marble

3.2 "At Runtime"

There are two solutions to adjust the data path for a
precompiled Marble binary:

a) Enter a key and a value

marbleDataPath="/smb/marble/data"

to the config file "marblerc" or 
"~/.config/KDE/Marble\ Desktop\ Globe.conf" and (re)start the 
application.

b) Start Marble using the command line option --marbleDataPath:

marble --marbleDataPath ~/marble/data


4. Known Issues:

- Due to a bug in the cmake files you might have to move the installed
data under certain circumstances:

  mkdir -p /usr/local/share/apps/marble
  cp -a /marble/data /usr/local/share/apps/marble
  rm -r /marble

- If you don't specify any install path using cmake then Marble will probably install under /usr/local.
If your distribution doesn't include /usr/local/lib in your LD_LIBRARY_PATH you might need to add that directory via:

  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

- The integrated Wikipedia browser doesn't load images
