Recent

Author Topic: How to get the usual menu items in the first menu  (Read 8215 times)

Phil

  • Hero Member
  • *****
  • Posts: 2750
Re: How to get the usual menu items in the first menu
« Reply #15 on: June 08, 2016, 09:53:17 pm »
Distributing a .dylib as part of your .app bundle is not too big a deal since the bundle already consists of more files than just the executable. Look inside the .app bundles of apps installed under /Applications to see the variety of libraries included.

For example, Microsoft's excellent Remote Desktop app (free from Apple Mac App Store) includes the Qt .dylibs, as well as the SSL .dylib. Qt typically won't be installed on a user's Mac. The SSL .dylib should be, but by including their own it means they can ensure the app uses an up-to-date version.

You can also make a framework for a .dylib. Typically this is for very large libraries that might need to be used by multiple apps, or if the libraries already have a nice .dmg installer that you (and users) can use. See /Library/Frameworks for examples of what you have installed. Note that frameworks can be versioned, meaning you can install more than one version of a framework library into the same .framework bundle (ensuring that apps that use the old version are unaffected).

The old-fashioned way of putting the .dylib into /usr/lib is also supported, but I would not take that approach. It's really more of a holdover from an previous era.

Is this what you're using?

http://www.hdfgroup.org/HDF5/

If so, what sort of programs use that? I'm completely unfamiliar with it.

-Phil

Clemens

  • New Member
  • *
  • Posts: 21
Re: How to get the usual menu items in the first menu
« Reply #16 on: June 09, 2016, 11:32:46 am »
Got it. I still think that statically linking the library to my binary would be more straightforward and platform independent, but copying the dylib into the app bundle is no big deal. I wrote a post-build script to do that. I'll see how it works out on Windows and Linux.