app-bundle vs. regular/"BSD utility" executables : what differences are there still?

René J.V. Bertin rjvbertin at gmail.com
Sat Jan 9 04:54:31 PST 2016


On Tuesday January 05 2016 10:29:41 Jeremy Huddleston Sequoia wrote:

>It's possible for a standalone executable to have an Info.plist.  It is embedded in the executable in an __info_plist section.  This can be done by the CREATE_INFOPLIST_SECTION_IN_BINARY Xcode build setting or by creating an __info_plist section manually at link time if not using Xcode (-Wl,-sectcreate,__TEXT,__info_plist,/path/to/my/Info.plist).

I've tried to read up on this way of "bundling" an Info.plist, but all I've found to date is focused on info dicts that are intended only (chiefly?) for allowing an executable to be code-signed. I haven't found any discussion of the elements that are supported. It seems safe to assume that a list of document types will simply be ignored, though maybe not the references it makes to document icons. The bundle icon idem: is that key ignored when present in an embedded Info.plist, or if not, where is the icon expected to be found?

All this because there is a CMake macro (in the ECM, "Extra CMake Modules") that makes it trivial to switch the target between an app bundle and a traditional executable. The app bundle gets a standard Info.plist with the proper key/value pairs (including the app icon if one is defined in the CMake file). It'd probably be easiest if that plist can be embedded.

Thanks,
René


More information about the macports-users mailing list