2

I'm toying with the idea of building a Cocoa app that uses OpenCV. I could take the easy route and just use MacPorts or some such tool to get OpenCV quickly. Unfortunately, sooner or later, I'd still have to tackle the issue of deployment so I decided to get that out of the way immediately.

My Question is:
What is the best strategy for deploying apps that rely upon libraries that do not ship with OS X?? Especially with regard to guaranteeing backward compatibility to OS X 10.5 or even 10.4?

The way I see it these are the options:

  1. I could compile OpenCV from source as dynamic libraries and install them on the customer's computer using an installer.

  2. I could compile OpenCV statically and embed the static libraries in the application bundle.

  3. Then there is the option of creating a Private Framework but nobody seems to have a clue about how to do that.

I'm leaning towards option 2 since I like the idea of distributing the app in a *.dmg image since that reduces installation to simply draging-and-dropping the app bundle to the 'Applications' folder.

os x nerd
  • 897
  • 1
  • 10
  • 18
  • 1
    You could build OpenCV as a dynamic library or framework and include that in the app bundle, too. – mipadi Jan 27 '12 at 16:19
  • Isn't that the same as a Private framework? – os x nerd Jan 27 '12 at 16:25
  • 1
    A "private framework" is generally used to mean a system framework that doesn't present a public API. – mipadi Jan 27 '12 at 16:30
  • Here are instructions for how to include the OpenCV dynamic libraries in an OS X application bundle: http://stackoverflow.com/questions/7117128 – SSteve Jan 27 '12 at 18:15
  • SSteve: So I just compile the OpenCV libraries as usual with cake, copy/paste them into my project, set up an Xcode copy job to move the dylibs into the bundle and then write a scrip to change the paths in both the library and application executable binaries. Did you ever solve your issue with highgui looking for libs in /opt/local/bin? http://stackoverflow.com/questions/6856029/deploy-and-distribute-opencv-applications-with-xcode4-on-mac-osx – os x nerd Jan 28 '12 at 14:14

1 Answers1

0

I think Option 2 is Apple's recommended choice.

Amy Worrall
  • 16,250
  • 3
  • 42
  • 65