Daniel Reetz, the founder of the DIY Book Scanner community, has recently started making videos of prototyping and shop tips. If you are tinkering with a book scanner (or any other project) in your home shop, these tips will come in handy. https://www.youtube.com/channel/UCn0gq8 ... g_8K1nfInQ

Building Scan Tailor on OSX

Scan Tailor specific announcements, releases, workflows, tips, etc. NO FEATURE REQUESTS IN THIS FORUM, please.
User avatar
n9yty
Posts: 72
Joined: 25 Jul 2010, 22:13

Re: Building Scan Tailor on OSX

Post by n9yty » 30 May 2011, 19:22

Tim wrote:There currently is no full Scan Tailor.app 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:
./scantailor
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.
This is ridiculous.

Folks, look in the source tree under the "packaging/osx" directory. The readme there has everything you need to build a self-contained application bundle without the need for MacPorts and all. In fact, once the right pieces are assembled (all documented), there is a single command line you run to build the whole thing. Painless really if you can read. I don't know why nobody wants to look at it, what a waste of time that was to put together.

I also posted a standalone build of a recent Beta in that thread, if you want to download it feel free.

http://www.4shared.com/file/72104Vm1/Sc ... eta11.html

In those notes I had been using Qt 4.7b2 but I think the latest build tree requires 4.7.3 which is the most recent official release, so that is the only caveat. Still use the Carbon Qt. You should actually be able to do almost everything from the Finder by just staging the files right and telling Finder to run the build script using Terminal.app.

User avatar
jimboh
Posts: 82
Joined: 06 Jan 2011, 00:55

Re: Building Scan Tailor on OSX

Post by jimboh » 30 May 2011, 19:44

knappen wrote:Is this not a build of the actual program?

I get a Terminal message when I open this saying:

"dyld: Library not loaded: /opt/local/libexec/qt4-mac-devel/lib/QtGui.framework/Versions/4/QtGui
Referenced from: /Applications/scantailor
Reason: image not found
Trace/BPT trap
logout"
Yes, it is the build that I compiled and run on my computer, using Xcode and MacPorts. I guess the app is not self-contained but depends on MacPorts stuff being in specific places on my computer. Sorry, but I cannot do anything about that because I am not a programmer and lack the necessary knowledge. I just follow the instructions on the sourceforge page and the result works on my machine. If I can do it, just about anyone should be able to do it.

User avatar
rob
Posts: 773
Joined: 03 Jun 2009, 13:50
E-book readers owned: iRex iLiad, Kindle 2
Number of books owned: 4000
Country: United States
Location: Maryland, United States
Contact:

Re: Building Scan Tailor on OSX

Post by rob » 30 May 2011, 20:06

n9yty wrote:In fact, once the right pieces are assembled (all documented), there is a single command line you run to build the whole thing.
Speaking as both a programmer and a user... this is the problem. You and I are quite comfortable building a program from scratch, but many people are not. I know, it's hard to believe! Their eyes are going to glaze over just with the suggestion of opening the terminal and typing some commands. The ideal goal is a self-contained executable. Does your procedure generate a completely independent distributable that does not require downloading anything else separately?

I think what we need is a separate sticky post called Download ScanTailor for OSX Here, with a link to n9yty's build. That should hopefully clear up the whole "not available on/how do I build for OSX" thing.
The Singularity is Near. ~ http://halfbakedmaker.org ~ Follow me as I build the world's first all-mechanical steam-powered computer.

User avatar
n9yty
Posts: 72
Joined: 25 Jul 2010, 22:13

Re: Building Scan Tailor on OSX

Post by n9yty » 30 May 2011, 20:20

rob wrote:
n9yty wrote:In fact, once the right pieces are assembled (all documented), there is a single command line you run to build the whole thing.
Speaking as both a programmer and a user... this is the problem. You and I are quite comfortable building a program from scratch, but many people are not. I know, it's hard to believe!
My instructions can all be done without ever opening Terminal.app. If you just make a folder in the finder and put the right downloaded items into it, and run the other binary installers for CMake and the like, you can click on the build script in Finder to build it all and get a app bundle. I had a version that did all the downloading too (in fact those lines are in there but just commented out), but I didn't want to take the time to handle multiple remote sites, failures, etc...

So, no need to mess with Terminal, just downloading and copying files and you can get a final product that is a standalone app bundle ready to be put into your applications folder.

User avatar
rob
Posts: 773
Joined: 03 Jun 2009, 13:50
E-book readers owned: iRex iLiad, Kindle 2
Number of books owned: 4000
Country: United States
Location: Maryland, United States
Contact:

Re: Building Scan Tailor on OSX

Post by rob » 30 May 2011, 21:14

Yeah, but... do you know how long boost takes to build? Hours. The ordinary user isn't going to wait and wait for hours while the software compiles.
The Singularity is Near. ~ http://halfbakedmaker.org ~ Follow me as I build the world's first all-mechanical steam-powered computer.

User avatar
n9yty
Posts: 72
Joined: 25 Jul 2010, 22:13

Re: Building Scan Tailor on OSX

Post by n9yty » 30 May 2011, 22:03

Not hours. MacPorts is hugely invasive and contains tons of stuff you don't need for this build. I offered to make builds for Tulon but he didn't want the bother of putting them on his site, which I understand to a point since he is not supporting them. I have made builds all along. The sticking point came when he wouldn't include the patch, and I wasn't going to maintain a disparate codebase since I am not actively using the project anyway. If it is simply a matter of him telling me when a new release is ready, I will grab, build, and release a binary.

Tulon
Posts: 687
Joined: 03 Oct 2009, 06:13
Number of books owned: 0
Location: London, UK
Contact:

Re: Building Scan Tailor on OSX

Post by Tulon » 31 May 2011, 04:03

n9yty wrote:I offered to make builds for Tulon but he didn't want the bother of putting them on his site, which I understand to a point since he is not supporting them.
Indeed, I am not looking forward to doing even more tech support. However, I am willing to link to a third party page that would provide the download link and clearly state the Mac OS X version is supported only by the community, not the author. Linking to a thread on this forum seems like a good idea.
Scan Tailor experimental doesn't output 96 DPI images. It's just what your software shows when DPI information is missing. Usually what you get is input DPI times the resolution enhancement factor.

User avatar
rob
Posts: 773
Joined: 03 Jun 2009, 13:50
E-book readers owned: iRex iLiad, Kindle 2
Number of books owned: 4000
Country: United States
Location: Maryland, United States
Contact:

Re: Building Scan Tailor on OSX

Post by rob » 31 May 2011, 17:14

n9yty, I got the latest ScanTailor source from SF, and there appears to be a bug in the buildscantailor.sh script:

Code: Select all

export BOOST_DIR=`find $STHOME -type d -iname boost_[0-9]*_[0-9]*_[0-9]*`
should be:

Code: Select all

export BOOST_DIR=`find $STHOME -type d -iname "boost_[0-9]*_[0-9]*_[0-9]*"`
(i.e. quotes around the regex)
  • Also, what do you think in ScanTailor prevents building it in 64-bit mode?
  • Is there any significance to address-model=32 in boost? Would this slow down boost under a 64-bit OSX?
--Rob
The Singularity is Near. ~ http://halfbakedmaker.org ~ Follow me as I build the world's first all-mechanical steam-powered computer.

User avatar
jimboh
Posts: 82
Joined: 06 Jan 2011, 00:55

Re: Building Scan Tailor on OSX

Post by jimboh » 01 Jun 2011, 14:28

It is good to have two options for building an OS X version, one provided in n9yty's instructions, the other described at http://sourceforge.net/apps/mediawiki/s ... n_Mac_OS_X

User avatar
n9yty
Posts: 72
Joined: 25 Jul 2010, 22:13

Re: Building Scan Tailor on OSX

Post by n9yty » 20 Jun 2011, 11:38

There should not be a need for the quotes around the regex unless you have a space in your boost library directory name which is not the case with a standard installation. But it wouldn't hurt I suppose. LoL

As to 64-bit builds, I was able to get everything to build as universal 32/64-bit, but the Qt libraries were not available in that configuration in a way that was compatible with 10.4, and maybe ppc support in general. At the time I build this, there was a lot of voice opinion that 10.4 support was important, so I oped to go with the 32-bit only i386/ppc Qt libraries. If you could drop ppc and 10.4 support then you could download the Cocoa Qt frameworks instead of Carbon and tweak the build scripts accordingly.

Post Reply