[fpc-pascal] Packaging shared libraries for OSX, recommendations?
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
> 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
> but it has headers for those who want to build apps against it. If
> 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
> 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/
More information about the fpc-pascal