[fpc-pascal] Packaging shared libraries for OSX, recommendations?

Jonas Maebe jonas.maebe at elis.ugent.be
Mon Jun 10 10:59:26 CEST 2013

On 10 Jun 2013, at 09:22, Bruce Tulloch wrote:

> What is the *recommended* way to build and package a shared library  
> for OSX?
> Our aim is that ordinary users can "just install it" such that other
> applications that depend on the library "just run" (without requiring
> authors of those other applications to include a copy of the library  
> in
> their bundle or users to fiddle with command line command to  
> configure them
> if they don't).

The above is the non-recommended way. The recommended way is to have  
application packagers include the library (or framework) within their  
application bundle in order to prevent version conflicts or the  
absence of the correct version on the system to cause problems. And to  
give them the ability to just copy the application from one system to  
another and have it keep working without having to hunt everywhere for  
other components they also have to copy (although this is not possible  
for all applications, for most it is).

> This library facilitates low level I/O. There are no UI or other  
> resources
> but it has headers for those who want to build apps against it. If  
> this
> were just UNIX we'd put under /usr/lib (and /use/include and perhaps
> /usr/share) but doing this this seems to be discouraged when reading  
> the
> Apple's developer docs.

Under Mac OS X (and *BSD, and probably even most Linux distributions  
these days), you would put it under /usr/local/[lib,include,share]. / 
usr/lib etc are reserved for system usage.

> We don't want to depend on MacPorts, Fink or Brew etc. Should we be
> packaging this as a framework, albeit a simple one?

If you absolutely want to distribute it as a standalone framework, you  
would generally install it under /Library/Frameworks or under /Library/ 
Application Support/YourProductName.


More information about the fpc-pascal mailing list