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


== Requirements ==

Pentobi requires the Qt libraries (>=5.2). The C++ compiler needs to support
certain C++11 features (only features that are already implemented by
GCC 4.9 and MSVC 2015). The build system uses CMake (>=3.0.2).

Ubuntu 16.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 \
    g++ make cmake qttools5-dev qttools5-dev-tools libqt5svg5-dev


== Building ==

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

  cmake -DCMAKE_BUILD_TYPE=Release .
  make


=== Building the KDE thumbnailer plugin ===

A thumbnailer plugin for KDE can be built by using the cmake option
-DPENTOBI_BUILD_KDE_THUMBNAILER=1. In this case, the KDE development files
need to be installed (packages kio-dev and extra-cmake-modules on
Ubuntu 16.04). Note that on Ubuntu 16.04, the plugin will not be found if
the default installation prefix /usr/local is used. You need to add
QT_PLUGIN_PATH=/usr/local/lib/plugins 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). On Ubuntu 16.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 ==

For building the Android app, there is a QtCreator project file in
src/pentobi_qml/Pentobi.pro. It requires Qt 5.6. Before compilation, the
binary translation files need to be generated by using File/Release in
Qt Linguist for all TS files in src/pentobi_qml/qml/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.
