FROM : Ricky Sharp
DATE : Fri Nov 05 19:09:32 2004
On Friday, November 05, 2004, at 09:51AM, Dan Saul <daniel.<email_removed>> wrote:
>Wow you really went in depth there, I thank you for that, however I
>suppose due to to my lack of clarity, what i meant was to get the
>version of the app itself. What I am trying to do is write an
>updating system for game, so I need to get the version number of the
>game before I can act on it.
Ah yes, this is a totally different beast :)
>For applications with info(strings) that is easy, but for carbon
>applications not so much.
I think you'll find that there are effectively three types of Carbon apps (binaries):
* Non-bundled CFM (contains 'vers' and 'plst' resource in the resource fork)
* Bundled CFM (contains 'vers' resource and a separate .plist file)
* Bundled mach-o (contains just a .plist file)
Having said that, there's two APIs you can read up on that should give you the proper info. Both are defined in CFBundle.h:
CFBundleGetVersionNumber
CFBundleGetValueForInfoDictionaryKey
Note: The 'vers' resource does store version information, but for use by Mac OS 9.x and earlier only. Although, I don't know what Mac OS X does which such apps that omit the version key from their plist, but do provide a 'vers' resource. Hopefully that's considered a malformed plist and that developers didn't do such a thing.
--
Rick Sharp
Instant Interactive(tm)
DATE : Fri Nov 05 19:09:32 2004
On Friday, November 05, 2004, at 09:51AM, Dan Saul <daniel.<email_removed>> wrote:
>Wow you really went in depth there, I thank you for that, however I
>suppose due to to my lack of clarity, what i meant was to get the
>version of the app itself. What I am trying to do is write an
>updating system for game, so I need to get the version number of the
>game before I can act on it.
Ah yes, this is a totally different beast :)
>For applications with info(strings) that is easy, but for carbon
>applications not so much.
I think you'll find that there are effectively three types of Carbon apps (binaries):
* Non-bundled CFM (contains 'vers' and 'plst' resource in the resource fork)
* Bundled CFM (contains 'vers' resource and a separate .plist file)
* Bundled mach-o (contains just a .plist file)
Having said that, there's two APIs you can read up on that should give you the proper info. Both are defined in CFBundle.h:
CFBundleGetVersionNumber
CFBundleGetValueForInfoDictionaryKey
Note: The 'vers' resource does store version information, but for use by Mac OS 9.x and earlier only. Although, I don't know what Mac OS X does which such apps that omit the version key from their plist, but do provide a 'vers' resource. Hopefully that's considered a malformed plist and that developers didn't do such a thing.
--
Rick Sharp
Instant Interactive(tm)
| Related mails | Author | Date |
|---|---|---|
| Dan Saul | Nov 5, 14:49 | |
| Ricky Sharp | Nov 5, 15:51 | |
| Dan Saul | Nov 5, 16:50 | |
| Frederick Cheung | Nov 5, 18:01 | |
| Ricky Sharp | Nov 5, 19:09 | |
| M. Uli Kusterer | Nov 5, 19:26 |






Cocoa mail archive

