Page 1 of 11

Building Scan Tailor on OSX

Posted: 21 Oct 2009, 18:31
by rob
Hey all,

I've already gotten two requests to describe how I built Scan Tailor on OSX, so I just realized it would probably be useful to put my procedure here:

UPDATE: If you want to recompile Scan Tailor after you upgrade to 10.6 (Snow Leopard) then you must wipe out darwinports (=macports) and reinstall it, and all the ports you installed.

Update: How to get the source code:
The latest code is always in Scan Tailor's git repository:
If you are not familiar with git, you can grab the latest sources using the web interface: ... ;a=summary
Use the topmost "snapshot" link for that purpose.
Here's the process that I used:

Once you get the Scan Tailor source code, and assuming you already have Darwinports installed, and also assuming you have XCode installed (which gives you gcc) you can do this:

sudo port install cmake
sudo port install qt4-mac This will take several hours.
sudo port install boost

I'm pretty sure that qt4-mac will install tiff, jpeg and png, but if not:

sudo port install tiff
sudo port install jpeg
sudo port install libpng

After that's done, hopefully you should be able to go into the Scan Tailor directory and type

Code: Select all

CMAKE_LIBRARY_PATH=/opt/local/lib CMAKE_INCLUDE_PATH=/opt/local/include  cmake -DQT_QMAKE_EXECUTABLE=/opt/local/libexec/qt4-mac/bin/qmake .
(note the space and dot at the end!)

When that's done, type


And hopefully it will work.

TO RUN SCANTAILOR, you must open Terminal, go to the scantailor directory, and type ./scantailor which should bring it up.

Re: Building Scan Tailor on OSX

Posted: 22 Oct 2009, 14:01
by w_m0zart
Thanks Rob for sharing your knowledge.

Maybe it's noteworthy to mention that it's important to have a proper Xcode version. Originally I tried the default Xcode from my osx 10.5 installation dvd, but a.o. installing qt4 with macports threw a lot of errors. I wrote about it here: ... tart=0#p32
and here:

Eventually it would be great to have Scan Tailor as a proper application bundle, which can be started by double clicking.

Re: Building Scan Tailor on OSX

Posted: 22 Oct 2009, 15:54
by Tulon
Yeah, that would be nice. Don't count on me though. I do have an old iBook G4 running Tiger around, but what I don't have is time.

Re: Building Scan Tailor on OSX

Posted: 08 Mar 2010, 19:23
by ladamus
Hi there,

Thanx for all the great job done!

Could you please help a bit? I am trying to build Scan Tailor on OSX but the process is stuck at "Building qt4-mac-devel" and will not move. Any ideas?

Thanx in advance,


Re: Building Scan Tailor on OSX

Posted: 09 Mar 2010, 12:29
by rob
qt4 takes a long, long time to compile. What are your hardware specs, and how long have you waited so far?

Re: Building Scan Tailor on OSX

Posted: 18 Mar 2010, 18:43
by Tim
Just for anybody reading this, I wrote up the instructions for building scantailor on Snow Leopard and sent them to Tulon. He posted them on the Wiki at ... e_on_Linux

I hadn't seen the posts above when I wrote it, but I don't see any differences either, besides the note on recompiling.

Re: Building Scan Tailor on OSX

Posted: 18 Mar 2010, 19:43
by rob

Re: Building Scan Tailor on OSX

Posted: 19 May 2010, 18:23
by hank
The process is similar on Linux, where I've compiled ScanTailor. Make a build directory, cd in there, type cmake .., and you're in business.

Re: Building Scan Tailor on OSX

Posted: 28 May 2010, 03:57
by univurshul
Does anyone have this OSX version of Scan Tailor in .app form they can just upload to a DropBox account?

I saw these instructions online and here. But I don't even have a clue what the code lines mean and what app to start with to the Scan Tailor App running. Can someone break this down even further and explain what app I enter the codes into? This is a real deterrent for people who don't write code. I've downloaded Xcode. I've downloaded MacPorts. Never used either before. Do I need that port app or the other "ports" app to do this?

Why not just create a normal Mac installer? And after seeing how tricky it is to get this program running, it makes me wonder if it's full feature and like the PC version's capability. I've heard it's good, but, instead of testing the software, I'm asking what code goes where, how many different apps I need to get this one app running....ugh.

Help, please.

Re: Building Scan Tailor on OSX

Posted: 28 May 2010, 09:06
by Tim
Yeah, it's currently not a painless process to build on Mac OS X. "Terminal" is the name of the app that you need to launch to run "command line" commands such as these. I think once you do that you may have a shot. You may want to google for a Terminal or command line basics tutorial. It's really not as bad as it seems, but I've been using them since I was a kid, so I'm not a good judge I suppose. The only thing I can think of that the tutorial doesn't tell you now is how to change directories and move files to where you want them. That's with the cd and mv commands. When you open a Terminal window it starts you in your home directory. Files get downloaded by default to the Downloads directory under that, and you may want to move the scantailor sources somewhere else, such as back to your home directory before unpacking them. The ls command lists the files in a directory.

There currently is no full Scan for OS X. What happens when you follow these build instructions is that it creates an executeable file that you can run when you open the Terminal app, change to the scantailor directory, and type:
to run it. Once you do that, the app pops up and runs just as nicely as on any other platform.

I have contributed a rudimentary plist file which is part of what is needed to make a true Mac OS .app application that can sit happily in your applications folder and run with a double click, command-O, etc, but more work is needed in the scantailor build process to actually make that happen. It's currently more than Tulon wants to deal with (or has experience with I think), but if you can find a developer that is willing to help out, that would be great.