Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Mac Application version help
Forum Updated to NodeBB v4.3 + New Features

Mac Application version help

Scheduled Pinned Locked Moved General and Desktop
9 Posts 2 Posters 6.1k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Ketan Shah
    wrote on 14 Oct 2011, 07:08 last edited by
    #1

    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 ?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on 14 Oct 2011, 07:40 last edited by
      #2

      Have a look at this "wiki article":http://developer.qt.nokia.com/wiki/OS_X_application_without_menu_bar. 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.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • K Offline
        K Offline
        Ketan Shah
        wrote on 14 Oct 2011, 08:24 last edited by
        #3

        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>
        <string>Created by Qt/QMake</string>
        <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>
        <string>This file was generated by Qt/QMake.</string>
        </dict>
        </plist>@

        What changes I should make ?

        1 Reply Last reply
        0
        • G Offline
          G Offline
          goetz
          wrote on 14 Oct 2011, 08:42 last edited by
          #4

          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:

          bq. ...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

          http://www.catb.org/~esr/faqs/smart-questions.html

          1 Reply Last reply
          0
          • K Offline
            K Offline
            Ketan Shah
            wrote on 14 Oct 2011, 09:45 last edited by
            #5

            Ya I have done that changes also, I have added the path of customised Info.plist in MyApp.pro, have also deleted the bundle and recompiled, but than too its not showing when I right click MyApp.app and check Get Info.

            1 Reply Last reply
            0
            • G Offline
              G Offline
              goetz
              wrote on 14 Oct 2011, 10:22 last edited by
              #6

              So what's in the Info.plist file inside the application bundle? Does that reflect the changes you made?

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • K Offline
                K Offline
                Ketan Shah
                wrote on 14 Oct 2011, 10:29 last edited by
                #7

                Ya it shows the changes, and thanks, now the version problem is solved, I have to use CFBundleShortVersionString.
                But do you know how can I show Copyright and Organisation's name ?

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  goetz
                  wrote on 14 Oct 2011, 10:32 last edited by
                  #8

                  You can use the NSHumanReadableCopyright key for this.

                  http://www.catb.org/~esr/faqs/smart-questions.html

                  1 Reply Last reply
                  0
                  • K Offline
                    K Offline
                    Ketan Shah
                    wrote on 14 Oct 2011, 10:43 last edited by
                    #9

                    Thanks a lot, it worked.

                    1 Reply Last reply
                    0

                    1/9

                    14 Oct 2011, 07:08

                    • Login

                    • Login or register to search.
                    1 out of 9
                    • First post
                      1/9
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved