Adding Info.plist to "single file" / "flat" executable after link phase?
Adding Info.plist to "single file" / "flat" executable after link phase?
- Subject: Adding Info.plist to "single file" / "flat" executable after link phase?
- From: Shawn Erickson <email@hidden>
- Date: Wed, 18 Mar 2009 16:04:15 -0700
I note the below outlined in Code Signing Guide [1] and Runtime
Configuration Guidelines [2]. I am wonder if a way exists to do this
after the final link? I basically have a single executable that
contains a main method that will call one of several entry points in a
dylib it links against at runtime. This single executable is copied as
a post build step to a handful of names (cluster of executables with
different names but the same main entry point) and I would like to
have a different embedded Info.plists for each. I know I could do this
by creating multiple targets in Xcode with different plist files
specified in the other link options but I would like to avoid the need
of doing that if possible.
---
Even if your program does not use the bundle structure, it should
still include an information property-list file to identify key pieces
of information to the system. For unbundled CFM executables, you can
place the contents of the program's Info.plist file in a 'plst'
resource. For unbundled Mach-O executables, you can create an
__info_plist section in the executable's __TEXT segment and put the
contents of your information property-list file there. To create an
__info_plist section, you would create an Info.plist file as you would
for a bundled program and then add the following linker options to
your makefile or Xcode project:
-sectcreate __TEXT __info_plist Info.plist
---
[1] http://developer.apple.com/documentation/Security/Conceptual/CodeSigningGuide/Procedures/Procedures.html#//apple_ref/doc/uid/TP40005929-CH4-DontLinkElementID_6
[2] http://developer.apple.com/DOCUMENTATION/MacOSX/Conceptual/BPRuntimeConfig/Articles/ConfigFiles.html#//apple_ref/doc/uid/20002091-SW1
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden