Mac Application version help
Hi,
I am making an application for Mac OS 10.6.2 using Qt 4.7.
How can I set my application’s version and organisation name using Qt ?
8 replies
Have a look at this wiki article [developer.qt.nokia.com]. Just ignore the menubar stuff and leave out the LSUIElement entry, but change com.yourcompany to the desired value.
For the version you need to add a CFBundleShortVersionString and CFBundleVersion entries.
I have made changes in the info.plist file, but its still not displaying the version number, when I right the MyApp.app application and check for Get Info. Below is my Info.plist file code,
- <?xml version="1.0" encoding="UTF-8"?>
- <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
- <plist version="1.0">
- <dict>
- <!-- start of standard entries -->
- <key>CFBundleIconFile</key>
- <string>my.icns</string>
- <key>CFBundlePackageType</key>
- <string>APPL</string>
- <key>CFBundleGetInfoString</key>
- <key>CFBundleSignature</key>
- <string>????</string>
- <key>CFBundleVersion</key>
- <string>1.0</string>
- <key>CFBundleShortVersionString</key>
- <string>1.0</string>
- <key>CFBundleExecutable</key>
- <string>MyApp</string>
- <key>CFBundleIdentifier</key>
- <string>com.yourcompany.MyApp</string>
- <key>NOTE</key>
- </dict>
- </plist>
What changes I should make ?
Where did you do the changes? As stated in the wiki article, you must tell qmake via the QMAKE_INFO_PLIST variable that you have a customized Info.plist file and you must delete the application bundle, as Info.plist is not copied automatically over an existing one!
I described the changes you should do in my first response already:
…change com.yourcompany to the desired value.
I’m not aware of a separate organization value for the property file. Make sure that the CFBundleIdentifier contains your organization doman and the app name!
You can get an overview of the keys at Apple’s web site:
http://developer.apple.com/library/mac/#documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
You must log in to post a reply. Not a member yet? Register here!


