Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-112668

qmake QMAKE_APPLICATION_BUNDLE_NAME not work for mac

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.5.1, 6.6.0
    • 6.4.2, 6.4.3, 6.5.0
    • Build tools: qmake
    • None
    • macOS
    • f00280337 (dev), 3bb806fd1 (6.5)

    Description

      Steps
      ```qmake
      QMAKE_APPLICATION_BUNDLE_NAME = mybundle
      ```
      The qmake TARGET is `MacBundleId`

      Using default mac info.plist template
      (eg Qt/6.4.2/macos/mkspecs/macx-clang/Info.plist.app)
      In this template, the CFBundleExecutable value placeholder is ${EXECUTABLE_NAME}

      Expected
      (1) Qt Creator able to run mac project

      (2) According to doc for QMAKE_APPLICATION_BUNDLE_NAME, its value should replace the ${EXECUTABLE_NAME} placeholder,
      so info.plist should contain
      ```
      <key>CFBundleExecutable</key>
      <string>mybundle</string>
      ```

      Actual
      (1) The default run profile for mac created by Qt Creator doesn't work, because Qt Creator tries to run
      build-MacBundleId-Qt_6_5_0_for_macOS-Debug/MacBundleId.app/Contents/MacOS/MacBundleId
      whereas qmake created the executable at
      build-MacBundleId-Qt_6_5_0_for_macOS-Debug/mybundle.app/Contents/MacOS/MacBundleId
      My opinion: Qt Creator is right, qmake is wrong

      (2) Info.plist
      ```
      <key>CFBundleExecutable</key>
      <string>MacBundleId</string>
      ```

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtbuildsystem Qt Build System Team
            twj T W
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes