Re: build numbers
Re: build numbers
- Subject: Re: build numbers
- From: Glenn Andreas <email@hidden>
- Date: Wed, 15 Sep 2004 11:42:34 -0500
At 5:54 PM +0200 9/15/04, Allan Odgaard wrote:
On 15. Sep 2004, at 17:47, Stephane Sudre wrote:
I'm using the CFBundleVersion and a format like "1.0b27" where the
latter part is the build number (and compliant with Apples
guidelines). [...]
You don't like the version.plist file?
I never figured out what it did, other than: "[version.plist] You'll
never edit these directly, rather they will be edited by settings
within Xcode.".
Oh.. maybe it's supposed to be included in my bundle, and I should
use version.plist instead of CFBundleVersion??? But then, why? And
wouldn't that mean I'd need to bump two versions (three, counting
InfoPlist.strings)?
Yup - three potentially different versions, each with subtly
overlapping but not quite identical purposes and use, but whose
consistency is pretty much required - gotta love seeing your about
box saying "Foo 1.0b4(v1.0b3)"
According to
<http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/Concepts/PListKeys.html>
CFBundleVersion is the "exact build version of the bundle":
You may omit minor revision and build number information as
appropriate. You may also omit major and minor revision information
and specify only a build number.
(this is the one that appears in the parens in the about box). Gotta
love the way something can have [Major,Minor,Build], [Major], or
[Build]. Of course, since the about box automatically adds the "v"
you can't do something like "beta 5" since that would show up as "Foo
1.0 (vbeta 5)"
CFBundleShortVersionString is the marketing version of the bundle.
NSHumanReadableCopyright may also have your version number (and is
then localized via the InfoPlist.strings), as may
CFBundleDisplayName (also localizable via InfoPList.strings).
And let's not forget CFBundleGetInfoString which also has the version
("This string was also known as the long version string in Mac OS
9"), and again, localized via InfoPlist.strings (unless you've got
CFBundleGetInfoHTML which is an HTML version of this string).
The only one you _don't_ want to touch is
CFBundleInfoDictionaryVersion (which is the vesion of the plist
structure itself).
It all probably depends on how you want the "build number" to show
up, and where - and how is it different from the version itself, and
how you want to treat beta versions (do two different beta version
have the same short version string with only different build
numbers?) Should the user be able to tell what the build number is
from the finder? If so, you need to change the
CFBundleGetInfo[HTML|String] as well (which normally lives in the
InfoPlist.strings since it would be localizeable).
I'd say, from reading above tech note, that the "cleanest" way is to
bump the CFBundleVersion with the build number (and only have the
build number there and nothing else) and the
CFBundleGetInfo[HTML|String] in your appropriate InfoPlist.strings
files (one for each localization).
And then how to handle the build number for a framework (which
doesn't have it's own about box) is another matter...
--
Glenn Andreas email@hidden
<http://www.gandreas.com/> oh my!
Mad, Bad, and Dangerous to Know
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden