Dependencies
============

In order to install QStarDict, it is necessary to install its dependencies.

The dependencies:
* Qt 5 (LGPLv3) https://doc.qt.io/qt-5/

* GLib (LGPL-2.1-or-later) https://docs.gtk.org/glib/
is used in the StarDict plugin

* ZLib (License of ZLib) https://zlib.net/
is used in the StarDict plugin

* LibZIM (GPLv2-or-later) https://openzim.org/wiki/Libzim
is used in the Kiwix plugin

* ESpeak (GPLv3-or-later) https://espeak.sourceforge.net/
is used for pronouncing words

On systems based on Debian or Ubuntu all of the dependencies can be
installed using the following command:

sudo apt install build-essential \
                 qt5-qmake qtbase5-dev qtbase5-private-dev \
                 qttools5-dev-tools libx11-dev \
                 libglib2.0-dev zlib1g-dev \
                 libzim-dev \
                 espeak

Building and installing QStarDict
=================================

When the dependencies are installed, it is possible to build and install
QStarDict using the following commands:

    qmake # to configure the project
    make # build
    sudo make install

qmake switches
==============

QStarDict consists of a core and plugins. There are the following plugins:
* kiwix - adds support for Kiwix Wiktionary dictionaries
* stardict - adds support for StarDict 2.x dictionaries
* web - adds support for online web dictionaries
* savetofile - adds a toolbar action for saving translations to files
* print - adds a toolbar action for printing translations

By default, all of these plugins are built, although not all of them
are enabled by default. If you want to select only a subset of the
plugins, add ENABLED_PLUGINS option to the invocation of qmake:

    qmake ENABLED_PLUGINS=<selected plugins>

In order to enable the developer mode for plugins, run qmake as
    
    qmake DEV=1

In order to install QStarDict to an install prefix other than /usr,
run qmake as
    
    qmake INSTALL_PREFIX=<install prefix>
