views:

24

answers:

1

I am working on a job where we are developing a set of cross-platform applications using C++, Qt, and CMake (among other things). On the Mac we run into the problem that we need to package all of our shared libraries into each .app (currently there are 4 of them), which causes the size of the download and install to get large fairly rapidly.

We want to remain friendly to the Mac way of doing things, which means that we want to support the capacity to drag and drop applications. Does anybody have any ideas on how to do this while keeping the total size down?

The project is currently a set of four executables or apps that each use a common set of shared libraries (qt and in-house). There is also a set of ruby bindings that rely on the in-house libraries. I realize that you could probably create a Framework and install it in System/Library/Frameworks, but I haven't read about that much yet. Doing that way seems like it would break the ability to drag and drop the app between machines.

Does anybody know of any examples of applications that do a similar thing on the Mac? Any creative ideas would be most welcome.

+1  A: 

Make an installer, preferably using the standard package maker which comes with XCode tools. Having an installer for a suite of applications is not that uncommon. Apple's own iWork has an installer and shares libraries. Making a standard .pkg is important if you want to distribute your app to a corporate customer: the IT admin would want to automate the install process remotely, which is possible for a standard .pkg but not if you write a custom installer yourself.

As for the file placements, you should understand File System Domains as described by Apple. Basically, all the directory structure is repeated three times:

/System/    : system domain
/           : local domain
/Users/name : user's domain

The first is reserved by Apple. The second is for things shared by users on a machine. The third is for a specific user.

The shared objects are put into directories called Library. So we have

/System/Library 
/Library
/Users/name/Library

You'll typically install things in the last two. Inside Library, the directories should be organized as described here. Typically you put the frameworks in

Library/Frameworks/

or

Library/Application Support/your_app/Frameworks/ 
Yuji
Thanks for the tips. It's not always clear which of Apple's developer docs are relevant to a particular task. There are definitely some things we want to install in /Users/name/Library/Application Support. We have a Google Sketchup plugin that will need to go in there.
jonc