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 2012). For creating cross-platform makefiles, CMake (>= 2.8.9) is
required.

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

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

== Building ==

Pentobi can be compiled with cmake using the shell command:

  cmake . && make

=== Building with Qt 5 ===

To build Pentobi with Qt 5 instead of Qt 4, use the cmake option
-DUSE_QT5=ON and make sure that the development packages for Qt 5 are
installed (on Ubuntu 13.04: qt5-default, qttools5-dev, qttools5-dev-tools).
The KDE thumbnailer plugin (see below) cannot be compiled with Qt 5.

=== Building with Boost.Thread ===

Because of a non-functional C++11 threads implementation on MinGW GCC 4.7
(and potentially other platforms), it is still possible to compile Pentobi
using Boost.Thread instead of C++11 threads by using the cmake option
-DUSE_BOOST_THREAD=ON. In this case, the Boost libraries (>= 1.49) need to
be installed.

=== Building the KDE thumbnailer plugin ===

A thumbnailer plugin for KDE can be built by using the cmake option
-DPENTOBI_BUILD_KDE_THUMBNAILER=ON. In this case, the KDE development files
need to be installed (package kdelibs5-dev on Ubuntu 13.04). Note that on
Ubuntu 13.04, 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".

== 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.
