This file explains how to compile and install Pentobi from the sources.

== Requirements ==

Pentobi requires the Qt libraries (>= 4.8). The C++ compiler needs to support
certain C++11 features (only features that are already implemented by GCC 4.7
and MSVC 2013). For creating cross-platform makefiles, CMake (>= 2.8.9) is
required.

Ubuntu 13.10 provides suitable versions of the required tools and libraries in
its package repository. They can be installed with the shell command:

  sudo apt-get install cmake g++ libqt4-dev make qt4-default

== Building ==

Pentobi can be compiled from the source directory with the shell commands:

  cmake -DCMAKE_BUILD_TYPE=Release .
  make

=== Building with Qt 5 ===

To build Pentobi with Qt 5 instead of Qt 4, use the cmake option
-DUSE_QT5=1 and make sure that the development packages for Qt 5 are
installed.

Ubuntu 13.10 provides suitable versions of the required Qt 5 tools and libraries
in its package repository. They can be installed with the shell command:

  sudo apt-get install \
    qt5-default qttools5-dev qttools5-dev-tools libqt5svg5-dev

=== Building the KDE thumbnailer plugin ===

A thumbnailer plugin for KDE 4 can be built by using the cmake option
-DPENTOBI_BUILD_KDE_THUMBNAILER=1. In this case, the KDE development files
need to be installed (package kdelibs5-dev on Ubuntu 13.10). Note that on
Ubuntu 13.10, the plugin will not be found if the default installation prefix
/usr/local is used. You need to add KDEDIRS=/usr/local to /etc/environment.
After that, you can enable previews for Blokus game file in the Dolphin file
manager in "Configure Dolphin/General/Previews".

The KDE thumbnailer plugin cannot be compiled with Qt 5.

== Installing ==

On Linux, Pentobi can be installed after compilation with the shell command:

  sudo make install

After installation, the system-wide databases should be updated to
make Pentobi appear in the desktop menu and register it as handler for Blokus
files (*.blksgf). The databases can be updated with the shell command:

  sudo make post-install

This make target assumes that the commands update-desktop-database and
update-mime-database exist.

== Building the Android version ==

Since CMake does not support Android yet, there is a QtCreator project file in
src/pentobi_qml/Pentobi.pro for building the Android app. For testing purposes,
the GUI that is used for Android can also be built as a desktop application by
running CMake with -DPENTOBI_BUILD_QML=1. It requires at least Qt 5.3.
