Adding dynamic libraries to a macosx application bundle

CLAM team is now geared toward having again MacOSX binary distribution. We are learning how things in Mac works and it is being a long process. At last it seems that we are getting enough insight. Until now, our Mac packages for CLAM applications depended on the installation of another bundle with clam and third party libraries. Following the advice of Volker Schumacher this would be more handy by having, as we have in windows, all third party libraries within the handle. So we used otool and install_name_tool as the mac developer documentation says. But CLAM has a lot of third party dependencies which are recursive and this was a very hard problem to do it by hand, so Pau and me pair programmed a handy python script which eases the process a lot.

What it does is firstly using otool to retrieve all the dependencies recursively and removes system ones. Then it copies all them to the bundle, changes their id and then changes all cross references among libraries and applications accordantly.

The script is available on the CLAM svn repository. A SCons tool is also work in progress. I will wrote more on int when finished.



Leave a comment