Redistributing Tools used by application (OSX, imageMagick, TWAIN - SANE)

294 views Asked by At

I have a mac application that uses twain (Relies on 3 packages that I had to install: libusb, sane backends, and twain sane interface) and imagemagick which I also used a package to install and I'm not really sure how to go about redistributing them.

I'm thinking I would have to include the source for each package I rely on, libusb-1.0.9.tar.bz2 for example for the lib usb package, and then configure and make each of those in /use/local/bin (Basing that off seeing it done by the binary packages). I imagine I would have to add these locations to $PATH once done.

I was trying this myself but ran into this error: "configure: error: no acceptable C compiler found in $PATH" so am now downloading xcode developer tools. I imagine the end user for my installer will run into this issue as well though if they don't have it installed so I'm now not sure how to proceed.

Can anyone shed some light on how to properly distribute tools that your app relies on? I am using FileStorm Pro and was planning on using applescript shell commands to do the command line work.

1

There are 1 answers

1
abarnert On BEST ANSWER

Unless you were planning to distribute your application as source, you definitely don't want to distribute its dependencies as source. Most Mac users do not have the Xcode developer tools, and do not want them.

Build the binaries on your machine (ideally on a clean machine with the oldest version of OS X you want to support, the newest version of Xcode that works on that OS, and nothing else installed on it). Then copy the resulting binaries somewhere into your .app bundle. Then, instead of running the tools in a way that relies on $PATH, launch them by an explicit path relative to argv[0] or [NSBundle mainBundle].

(And make sure to check the licenses of every third-party tool you're using.)