Skip to content

Building from Source Code on Linux and Mac OS X

Mikhail Morozov edited this page Dec 25, 2025 · 15 revisions

Building on Linux

If you want to build ScanTailor-Experimental for Linux you can read this instruction.

If you want to build a flatpak file please use this instruction.

Building on Mac OS X

Building for Mac OS is quite difficult at that moment. Here is an issue with discussion about current build process.

Next is the original instruction.

WARNING!!! The next text is a copy of original ScanTailor Wiki so it's extremely outdated!

MacPorts

MacPorts has already scantailor as a package (Xcode prerequisites for MacPorts apply)

sudo port selfupdate
sudo port install scantailor

Building on Mac OS X is very similar to building on Linux but the package names are different and the MacPorts packaging system needs to be installed in order to get the needed packages. Also the nonstandard location that MacPorts installs qmake to needs to be specified.

Prerequisites

sudo port selfupdate
  • Then install the rest of the needed packages with
sudo port install cmake qt4-mac-devel boost xrender

This installs:

  • CMake, the cross platform build system.
  • Qt version 4.6.0 beta currently
  • Boost version 1.40.0 including libboost
  • libxrender

The rest of the needed packages are installed as dependencies of these.

Configuration

Download the scantailor source code package and then upack the source by entering the following in the directory where the source package resides:

tar xf scantailor-0.9.8.1.tar.gz

Replace the file name above with the name of the version that you have downloaded. Typing the first few letters of the name and typing tab will autocomplete the filename for you.

Then navigate to the directory that contains the scantailor sources. From there, run the following (single line and mind the dot at the end):

cmake -DCMAKE_LIBRARY_PATH=/opt/local/lib -DCMAKE_INCLUDE_PATH=/opt/local/include
-DQT_QMAKE_EXECUTABLE=/opt/local/libexec/qt4-mac-devel/bin/qmake .

There will be lots of messages from cmake ending with

- Configuring done 
- Generating done 
  • If you have missing dependencies you will get an error message telling you what is missing. You can then search for the missing package and install it.
  • If you have a library and header files installed in a non-standard place then cmake will not find them. In that case you can specify them as above for qmake or run the interactive program '''ccmake''' which allows you to specify paths to libraries and header files.

Compilation and Installation

make
sudo make install

Clone this wiki locally