MantisBT - CMake
View Issue Details
0011694CMakeCMakepublic2011-01-13 11:172016-06-10 14:31
Sean McBride 
Brad King 
normalminoralways
closedmoved 
OS X
CMake 2.8.3 
 
0011694: On Mac OS X, the CMake.app is missing version and copyright info in its Info.plist
CMake's Info.plist is missing info that all apps should have: version and copyright (and perhaps more). See screenshot.

See also here for more info on what should be present:

http://developer.apple.com/library/mac/#documentation/MacOSX/Conceptual/BPRuntimeConfig/Articles/ConfigFiles.html [^]
No tags attached.
png CMakeVersionMissing.png (319,149) 2011-01-13 11:17
https://public.kitware.com/Bug/file/3621/CMakeVersionMissing.png
patch 0001-OS-X-Set-CMake.app-bundle-version-fields-in-Info.pli.patch (2,387) 2013-09-27 09:58
https://public.kitware.com/Bug/file/4890/0001-OS-X-Set-CMake.app-bundle-version-fields-in-Info.pli.patch
png Screen Shot 2013-09-27 at 11.00.10.png (69,994) 2013-09-27 11:04
https://public.kitware.com/Bug/file/4891/Screen%20Shot%202013-09-27%20at%2011.00.10.png
png

patch 0001-OS-X-Set-CMake.app-bundle-Info.plist-fields-11694.patch (4,433) 2013-09-30 11:49
https://public.kitware.com/Bug/file/4892/0001-OS-X-Set-CMake.app-bundle-Info.plist-fields-11694.patch
Issue History
2011-01-13 11:17Sean McBrideNew Issue
2011-01-13 11:17Sean McBrideFile Added: CMakeVersionMissing.png
2011-01-13 11:24Bill HoffmanNote Added: 0024647
2011-01-13 11:24Bill HoffmanAssigned To => Bill Hoffman
2011-01-13 11:24Bill HoffmanStatusnew => assigned
2011-01-13 11:30Sean McBrideNote Added: 0024648
2012-09-20 18:10James WalkerNote Added: 0031075
2013-09-26 17:42--marcNote Added: 0033903
2013-09-26 17:52--marcNote Edited: 0033903bug_revision_view_page.php?bugnote_id=33903#r1267
2013-09-27 09:57Brad KingAssigned ToBill Hoffman => Brad King
2013-09-27 09:57Brad KingPlatform => OS X
2013-09-27 09:57Brad KingTarget Version => CMake 3.0
2013-09-27 09:58Brad KingFile Added: 0001-OS-X-Set-CMake.app-bundle-version-fields-in-Info.pli.patch
2013-09-27 09:58Brad KingNote Added: 0033909
2013-09-27 11:04Sean McBrideNote Added: 0033910
2013-09-27 11:04Sean McBrideFile Added: Screen Shot 2013-09-27 at 11.00.10.png
2013-09-28 02:33--marcNote Added: 0033921
2013-09-28 02:34--marcNote Edited: 0033921bug_revision_view_page.php?bugnote_id=33921#r1271
2013-09-30 08:27Brad KingNote Added: 0033931
2013-09-30 08:29Brad KingNote Added: 0033932
2013-09-30 11:01Sean McBrideNote Added: 0033938
2013-09-30 11:18Brad KingNote Added: 0033941
2013-09-30 11:33Sean McBrideNote Added: 0033943
2013-09-30 11:49Brad KingFile Added: 0001-OS-X-Set-CMake.app-bundle-Info.plist-fields-11694.patch
2013-09-30 11:49Brad KingNote Added: 0033945
2013-09-30 13:16Brad KingNote Added: 0033946
2013-10-07 14:18Sean McBrideNote Added: 0034072
2013-10-08 11:29Brad KingNote Added: 0034076
2013-10-08 11:48Sean McBrideNote Added: 0034077
2013-10-08 12:39Brad KingNote Added: 0034079
2014-01-27 14:11Brad KingNote Added: 0035007
2014-01-27 14:11Brad KingTarget VersionCMake 3.0 =>
2016-06-10 14:28Kitware RobotNote Added: 0041778
2016-06-10 14:28Kitware RobotStatusassigned => resolved
2016-06-10 14:28Kitware RobotResolutionopen => moved
2016-06-10 14:31Kitware RobotStatusresolved => closed

Notes
(0024647)
Bill Hoffman   
2011-01-13 11:24   
Do you have a patch that adds that support? I don't know much about plist files.
(0024648)
Sean McBride   
2011-01-13 11:30   
Not at this time. I could attempt such a patch, but not in the short term... a bit swamped currently...
(0031075)
James Walker   
2012-09-20 18:10   
In my opinion, the lack of a CFBundleName value is worse than the lack of version and copyright information. This makes the app show up with no name in the Activity Viewer utility, for instance.
(0033903)
--marc   
2013-09-26 17:42   
(edited on: 2013-09-26 17:52)
As of version cmake-2.8.11, Info.plist version entries are empty ...

    <key>CFBundleShortVersionString</key>
    <string></string>
    <key>CFBundleVersion</key>
    <string></string>

The version number in the info.plist file matter to places like http://www.macupdate.com [^] ... the senior content manager advised me that macupdate "listings rely on the internal version number of a given application" info.plist .

https://developer.apple.com/library/mac/#documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-102364-TPXREF106 [^]

per the Apple documents, the fields would become

    <key>CFBundleShortVersionString</key>
    <string>2.8.11</string>
    <key>CFBundleVersion</key>
    <string>2.8.11</string>

(0033909)
Brad King   
2013-09-27 09:58   
Please try out attached 0001-OS-X-Set-CMake.app-bundle-version-fields-in-Info.pli.patch
(0033910)
Sean McBride   
2013-09-27 11:04   
That Apple document is wrong. :(

For one, it doesn't make sense that both CFBundleShortVersionString and CFBundleVersion should be the same. For another, you just have to look at the Info.plist of Apple's own applications.

CFBundleShortVersionString is indeed as described, that is, the "marketing version". Pedantically, as per Apple UI, it should only ever be x.y.z but since CMake sometimes gets to x.y.z.w I would go ahead and use all 4 digits there.

CFBundleVersion is meant as an "internal" version number. For svn-based projects, people often use the svn revision. Since it's supposed to be a number though, a git hash is not appropriate. IIRC, it's also supposed to be monotonically increasing. You could use something like YYYYMMDD I suppose.

Cocoa's default 'about box' displays the app's version as "Version <CFBundleShortVersionString> (<CFBundleVersion>)". See attached.
(0033921)
--marc   
2013-09-28 02:33   
(edited on: 2013-09-28 02:34)
I think Sean's observation that the Apple documentation is not current with practice is correct.

Vienna RSS reader (http://www.vienna-rss.org [^]) has an example of what works OK on OS X ...
  <key>CFBundleGetInfoString</key>
  <string>Vienna version 3.0.0 Beta 11 :9d8d6f6:, Copyright 2004-2012 Contributors. See Help/Acknowledgements for list of contributors.</string>

  <key>CFBundleShortVersionString</key>
  <string>3.0.0 Beta 11 :9d8d6f6:</string>

  <key>CFBundleVersion</key>
  <string>4790</string>

Note:
1. CFBundleGetInfoString begins with CFBundleShortVersionString.

2. CFBundleShortVersionString is not actually restricted to x.y.z, so x.y.z.w or other string would be OK.

3. CFBundleVersion is some internal, build-specific string. If CMake has some build identifier besides the x.y.z.x, that would make sense to add here ... otherwise a datetime stamp would also be reasonable.

(0033931)
Brad King   
2013-09-30 08:27   
For CFBundleVersion, does it have to be an integer, or can it be multiple components?

The top-voted answer here looks interesting:

 http://stackoverflow.com/questions/4933093/cfbundleversion-in-the-info-plist-upload-error [^]

Also interesting:

 http://stackoverflow.com/questions/9754691/cfbundleversion-must-be-higher-than-previous-version [^]

A question from the latter is whether the upload site's version comparison will understand 4-component version ordering.
(0033932)
Brad King   
2013-09-30 08:29   
For reference, CMake's version scheme is:

 <major>.<minor>.<patch>[.<tweak|date>]

where a <tweak> of less than 20000000 is considered a release version and otherwise is treated as a <date> of a development version. The components are kept in Source/CMakeVersion.cmake and the date is maintained by a nightly commit update using Source/CMakeVersion.bash. The date is not available for release versions in the current scheme.
(0033938)
Sean McBride   
2013-09-30 11:01   
As I reread Apple's docs, I realize I was too harsh to say they are "wrong", "confusing" would be a better word.

Marc, looking at 'Vienna RSS reader' is not necessarily helpful, since 3rd parties often get these things wrong.

Brad, both CFBundleVersion and CFBundleShortVersionString can be x.y.z format; CFBundleShortVersionString pretty much always is, CFBundleVersion is often a single integer. Each of x, y, and z must be integers and not have leading zeros.

CFBundleVersion is meant to be machine-comparible and as such must always be increasing. CFBundleShortVersionString is meant to be prominently user-visible. It's generally always increasing too, but sometimes marketing departments change versioning schemes like MyApp 5.0 -> MyApp 2013.

Neither needs to resemble the other. ex: Preview.app uses 6.0.1 and 765.6.

For CMake, CFBundleShortVersionString should definitely be 2.8.12. If ever you need the .tweak part... well, technically it's not allowed, but as I said, it's the 'marketing' string, so the OS is more forgiving.

You should be more conforming in your CFBundleVersion though, as the OS (and probably MacUpdate.com) do machine-comparisions with it to decide which is the newest version of the app (ex: choosing the app to launch when double-clicking a document). I'm not sure what would be best. It's only user-visible in the About Box (for tech support) so could be a Mac-only scheme. I guess you can't go wrong with YYYYMMDD.

You should also provide:
 NSHumanReadableCopyright = "© Kitware Inc., 2013"
 LSApplicationCategoryType = "public.app-category.developer-tools"

and remove:
 CFBundleLongVersionString
 LSRequiresCarbon
(0033941)
Brad King   
2013-09-30 11:18   
I don't like CCYYMMDD because:

* Once we use it we can never go with M.m.p[.t] because the major number will never be as large as a date.

* In release versions right now the source code doesn't know its date.

* No one will remember the mapping of date to version.

I'd like to know if the 3-component versions are ordered via integer component-wise comparison like "if(VERSION_LESS)" does, if this is reliable, and ideally if 4 components can be used and still compare correctly.
(0033943)
Sean McBride   
2013-09-30 11:33   
Good points. Though I don't see that 'mapping of date to version' comes into play. Remember, CFBundleVersion is just an 'internal build number', not a version the user sees or cares about.

Another problem with YYYYMMDD occurs to me: when you get to CMake 3.0, you may release a patch 2.x release, it should have lower CFBundleVersion than CMake 3.0, but wouldn't using only YYYYMMDD.

I'll sleep on CFBundleVersion, but for all the others, the way forward is clear... you could start with them perhaps? Again:

set:
 CFBundleShortVersionString = "2.8.12"
 NSHumanReadableCopyright = "© Kitware Inc., 2013"
 LSApplicationCategoryType = "public.app-category.developer-tools":

remove:
 CFBundleLongVersionString
 LSRequiresCarbon
 CFBundleGetInfoString
(0033945)
Brad King   
2013-09-30 11:49   
Re 0011694:0033943: None of this will happen for 2.8.12. We're already approaching -rc4 and this is not a regression.

See 0001-OS-X-Set-CMake.app-bundle-Info.plist-fields-11694.patch for a draft that uses the 3 components for CFBundleVersion.
(0033946)
Brad King   
2013-09-30 13:16   
For reference, here is an old definition of CFBundleVersion:

http://www.dribin.org/dave/blog/archives/2006/08/02/versioning_os_x_apps/ [^]

 Quoting the Runtime Configuration Guidelines:

  This key specifies the exact build version of the bundle. This
  string is usually of the form nn.n.nxnnn where n is a digit and x
  is a character from the set [abdf]. The first number is the major
  version number of the bundle and can contain one or two digits to
  represent a number in the range 0-99. The second and third numbers
  are minor revision numbers and must be a single numeric digit. The
  fourth set of digits is the specific build number for the release.
(0034072)
Sean McBride   
2013-10-07 14:18   
Yes, changing for 2.8.12 is obviously not appropriate. I was using it just as an example value.

0001-OS-X-Set-CMake.app-bundle-Info.plist-fields-11694.patch

I think if you removed the CFBundleVersion part it could be committed (post 2.8.12). CFBundleVersion perhaps needs more thought, as we've discussed...
(0034076)
Brad King   
2013-10-08 11:29   
Re 0011694:0034072: By "removed the CFBundleVersion part" do you mean the field should be empty or not present at all?
(0034077)
Sean McBride   
2013-10-08 11:48   
I meant the latter, but checking 2.8.12rc4 I see that it's currently present and empty, so may as well keep it as such. Obviously it should be set eventually, but doing the other stuff first is a good conservative first step.
(0034079)
Brad King   
2013-10-08 12:39   
Applied with TBD comment for CFBundleVersion:

 http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dcf1b645 [^]
(0035007)
Brad King   
2014-01-27 14:11   
While most of the Info.plist entries are now populated, CFBundleVersion is still empty due to lack of understanding/agreement of exactly what value should go in there.

I'm removing this issue from the roadmap for CMake 3.0 for now.

(0041778)
Kitware Robot   
2016-06-10 14:28   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.