-
Notifications
You must be signed in to change notification settings - Fork 211
Compiling gImageReader
If you would like to compile gImageReader from source, follow these steps:
Linux (various distributions)
-
Make sure you have
cmakeand a C++ compiler supportingC++11installed. -
Install the development packages of the following required build dependencies ([Gtk], [Qt5] and [Qt4] indicate dependencies required for compiling the respective gImageReader interface):
- tesseract (>=3.03.00, recommended 3.04.00 or newer)
- sane
- podofo
- libjpeg
- djvulibre
- intltool
- [Gtk] gtkmm
- [Gtk] gtkspellmm (>=3.0.5)
- [Gtk] gtksourceviewmm
- [Gtk] cairomm
- [Gtk] poppler-glib
- [Gtk] json-glib
- [Gtk] libxml++
- [Qt5] qt5-qtbase
- [Qt5] qtspell-qt5
- [Qt5] poppler-qt5
- [Qt5] quazip-qt5
- [Qt4] qt4
- [Qt4] qtspell-qt4
- [Qt4] poppler-qt4
- [Qt4] quazip-qt4
For Debian based systems, the specific package names are those listed as
Build-Dependsin the package control file.For Fedora based systems, the specific package names are those listed as
BuildRequiresin the package spec file. -
Configure the build: from within the extracted source tarball or git clone folder, type
$ mkdir build $ cd build $ cmake -DINTERFACE_TYPE=<type> ..where
<type>is eithergtk,qt5,qt4. Theqt4interface is only recommended if your distribution does not provide Qt5 >= 5.5.0 (Qt5 < 5.5.0 suffer from QTBUG-43562 which causes gImageReader to crash).Other standard cmake configuration options (such as
CMAKE_INSTALL_PREFIX) can also be specified, typeccmake ..inside thebuildfolder to start the cmake configuration editor which lists all available configuration options. -
Compilation: from within the created
builddirectory, typemake -
Installing: from within the created
builddirectory, typemake install -
Alternatively to installing the application with
make install, it can also be run from within thebuilddirectory.-
For the
Qt4andQt5variants, it is sufficient to type from within thebuilddirectory./gimagereader-qt5 # or ./gimagereader-qt4 -
For the
Gtkvariant, one needs to ensure the path to the local glib schemas is added toXDG_DATA_DIRSwhen running the application:XDG_DATA_DIRS=$PWD:$XDG_DATA_DIRS ./gimagereader-gtk
-
Windows
The easiest way to compile gImageReader for Windows is by using the provided Docker image, performing the following steps from the root directory of the gImageReader source tree:
-
Build the image (only required once resp. periodically to update it):
docker build -t gimagereader_buildenv packaging/win32 -
Compile gImageReader and build the installers:
-
32-bit build:
docker run -v $PWD:/workspace gimagereader_buildenv packaging/win32/makeinstaller.sh i686 qt5 -
64-bit build:
docker run -v $PWD:/workspace gimagereader_buildenv packaging/win32/makeinstaller.sh x86_64 qt5
-
-
The built installers can then be found inside the build trees:
- 32-bit build:
build/mingw32-qt5/gImageReader_$VERSION_qt5_i686.exe - 64-bit build:
build/mingw64-qt5/gImageReader_$VERSION_qt5_x86_64.exe
- 32-bit build: