• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Cocoa | Reading Plist/file version of Native binary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Cocoa | Reading Plist/file version of Native binary


  • Subject: Re: Cocoa | Reading Plist/file version of Native binary
  • From: "email@hidden" <email@hidden>
  • Date: Tue, 27 Nov 2012 08:06:20 +0000


On 27 Nov 2012, at 06:59, Sachin Porwal <email@hidden> 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@hidden> wrote:
>> Do you mean the app/bundle version? CFBundleGetValueForInfoDictionaryKey()
>> with kCFBundleVersionKey.
>>
>>
>> On Tue, Nov 27, 2012 at 12:41 AM, Sachin Porwal <email@hidden>
>> 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@hidden)
>>>
>>> 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:
>>>
>>>
>>> This email sent to email@hidden
>>
>>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> 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:
>
> This email sent to email@hidden


_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

References: 
 >Cocoa | Reading Plist/file version of Native binary (From: Sachin Porwal <email@hidden>)
 >Re: Cocoa | Reading Plist/file version of Native binary (From: "Stephen J. Butler" <email@hidden>)
 >Re: Cocoa | Reading Plist/file version of Native binary (From: Sachin Porwal <email@hidden>)

  • Prev by Date: Re: Cocoa | Reading Plist/file version of Native binary
  • Next by Date: Re: Cocoa | Reading Plist/file version of Native binary
  • Previous by thread: Re: Cocoa | Reading Plist/file version of Native binary
  • Next by thread: Re: Cocoa | Reading Plist/file version of Native binary
  • Index(es):
    • Date
    • Thread