Closed GoogleCodeExporter closed 9 years ago
Until r371, which is incorporated in Tunnelblick versions 3.0b26 and above,
Tunnelblick used (as described in the bug report) several formats for its
Info.plist "CFBundleShortVersionString" key, which is apparently the key
reported by System Profiler.
Since r371, Tunnelblick has consistently used the following scheme:
CFBundleShortVersionString is a string containing the "marketing" version: for
example, "3.0b26 (build 1395)".
CFBundleVersion is a string containing the build number, for example, "1395".
Starting with version 3.1, beta versions are more clearly identified in the
marketing string; for example, "3.1beta04 (build 1745)".
Depending on your purpose, you would use one or the other:
* If you want something human-readable to display, use
CFBundleShortVersionString
* If you want to compare versions, use CFBundleVersion. Or strip everything to
the left of and including "(build " in CFBundleShortVersionString.
Background:
Version information in a Cocoa application is contained in the
.app/Contents/Info.plist file. Apple has specified meanings for the keys in the
file. The two keys that are used are
CFBundleShortVersionString - a localizable "marketing" version.
CFBundleVersion - this is supposed to be limited to digits and decimal points
so it can be parsed. It is the key used by the system to determine the latest
version of an application. My understanding is that many applications violate
this by including a "b" to indicate beta versions.
The problem with CFBundleShortVersionString (and the pre-r371 use of
CFBundleVersion) is that the human-readable string, even if consistent, is not
ordered properly: "3.0" comes before "3.0b20", which is not correct -- 3.0b20
is really "beta 20 for version 3.0", and 3.0 is the later (released) version.
There is a long thread on the Apple Discussion Board about version info,
located at
http://lists.apple.com/archives/carbon-development/2004/Jun/msg00816.html
I have marked this as "Fixed", because -- since r371 and going forward -- it is
consistent. Unfortunately, we can't change the past versions!
Original comment by jkbull...@gmail.com
on 15 Jul 2010 at 12:35
Original issue reported on code.google.com by
greg.ver...@gmail.com
on 15 Jul 2010 at 8:17