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.8
and MSVC 2013). For creating cross-platform makefiles, CMake (>= 2.8.11) is
required.

Ubuntu 15.04 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 15.04 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 15.04). Note that on
Ubuntu 15.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".

Using USE_QT5=1 means that the KDE thumbnailer plugin will be compiled for KDE
Frameworks 5 (needs packages kio-dev and extra-cmake-modules on Ubuntu 15.04;
note that Dolphin in Ubuntu 15.04 is not yet able to use thumbnailers built
for KDE Frameworks 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). On Ubuntu 15.04 with install prefix /usr/local, this can be
done by running:

  sudo update-mime-database /usr/local/share/mime
  sudo update-desktop-database /usr/local/share/applications


== Building the Android version ==

Support for Android is still experimental. Since CMake does not support
Android yet, there is a QtCreator project file in src/pentobi_qml/Pentobi.pro
for building the Android app. Before compilation, the binary translation
files need to be generated by selecting the QtCreator menu item
Tools/External/Linguist/Release Translations.

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