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

Required:

  * C++ compiler with C++11 support (or C++17 when using Qt 6)
  * CMake >= 2.8.12. A particular version of Qt may require a newer
    version of CMake.
  * Make
  * Qt 4-6. DPSO_QT_VERSION CMake option.
  * libtesseract
  * libx11
  * libxext - for X11 Nonrectangular Window Shape Extension

Optional:

  * pkg-config to find Tesseract. If pkg-config is not installed, or
    if you have an old Tesseract version that comes without a .pc file
    for pkg-config, CMake will try to find Tesseract on its own.

  * Qt 5 X11 extras to fix a window title bug in Qt 5 < 5.3.2.

  * libintl for translated user interface. On some systems libintl is
    a part of GNU C library and doesn't need to be installed
    separately. DPSO_ENABLE_NLS CMake option.

  * gettext utilities (msgfmt is needed to compile gettext message
    catalogs). DPSO_ENABLE_NLS CMake option.

  * pandoc to generate HTML manual. DPSO_GEN_HTML_MANUAL CMake
    option.

To install dependencies on Debian, Ubuntu, and derivatives, run:

    sudo apt-get install cmake make pkg-config g++ qtbase5-dev \
        libqt5x11extras5-dev libtesseract-dev libx11-dev libxext-dev \
        gettext pandoc


Building
========

You can build dpScreenOCR with the following commands:

    cd path_to_dpscreenocr_source
    mkdir build
    cd build
    cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release ..
    make

You can configure the build with various CMake options; run
"cmake -LH .." to see them all. Options specific to dpScreenOCR have
the "DPSO_" prefix.


Installing
==========

Use "make install" and "make uninstall" to install and remove
dpScreenOCR, respectively. You can set the installation prefix via
CMAKE_INSTALL_PREFIX at the build stage; the default is "/usr/local".

Since version 1.1, dpScreenOCR supports relocation: it loads resources
from paths relative to the location of the executable, rather than
from absolute paths based on the installation prefix. For example, you
can install in "~/dpscreenocr", then move the "dpscreenocr" directory
to a different location, and the program will still work correctly.
