On 27 Nov 2012, at 06:59, Sachin Porwal <[email protected]> wrote:
> Hi Stephen, > > Thanks for your help. > > No, the tool is not an App/Bundle, it is native command line Tool > which embeds the File version Plist in itself. I am trying to find a > generic way to read version information from such binaries (32/64 bit) > if they have file version plist embeded with them. Maybe you know this already but IIRC the plist is embedded by the linker using the Other Linker Flags to create a named TEXT section: -sectcreate __TEXT __info_plist "my app-info.plist" So the problem may be how to identify and read the relevant Mach-O section. Perhaps the otool source would be of help. A google for 'read mach binary section' throws up some leads including http://stackoverflow.com/questions/1778218/parser-for-32-bit-and-64-bit-mach-o-binary-executable-formats-in-c I am sure that others will be able to offer more specific advice. Regards Jonathan Mitchell Mugginsoft LLP > > Thanks, > Sachin > > On Tue, Nov 27, 2012 at 12:24 PM, Stephen J. Butler > <[email protected]> wrote: >> Do you mean the app/bundle version? CFBundleGetValueForInfoDictionaryKey() >> with kCFBundleVersionKey. >> >> >> On Tue, Nov 27, 2012 at 12:41 AM, Sachin Porwal <[email protected]> >> wrote: >>> >>> Hi, >>> >>> I am looking for a way to read file version information of a native >>> Binary(32/64 bit) in Cocoa. This is required to upgrade a existing >>> tool on target system from my custom installer. >>> Could you please point me in right direction? Much appreciated.... >>> >>> Thanks, >>> Sachin >>> _______________________________________________ >>> >>> Cocoa-dev mailing list ([email protected]) >>> >>> Please do not post admin requests or moderator comments to the list. >>> Contact the moderators at cocoa-dev-admins(at)lists.apple.com >>> >>> Help/Unsubscribe/Update your Subscription: >>> >>> https://lists.apple.com/mailman/options/cocoa-dev/stephen.butler%40gmail.com >>> >>> This email sent to [email protected] >> >> > _______________________________________________ > > Cocoa-dev mailing list ([email protected]) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > https://lists.apple.com/mailman/options/cocoa-dev/jonathan%40mugginsoft.com > > This email sent to [email protected] _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [email protected]
