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

Use qt_generate_deploy_qml_app_script MACOS_BUNDLE_POST_BUILD in QML examples

    XMLWordPrintable

Details

    • Task
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 6.3.0
    • Build System: CMake
    • None
    • a6bd1dc3e (dev), 442665fd9 (6.7), f267ed7b1 (dev), cde9cfb96 (dev), 1a74168c8 (6.7), e59ac7556 (6.7)

    Description

      We should use qt_generate_deploy_qml_app_script's MACOS_BUNDLE_POST_BUILD option in our QML examples to simplify their code and ensure that the examples run from inside a macOS app bundle in the build dir.
      We should include a comment above each usage of the option telling why it's needed and shouldn't be removed.

      Here are some examples that currently handle all the bundle-specific magic manually

      https://github.com/qt/qtdeclarative/blob/6e8f6f446ac8854fd23cb3cbf0fc1f3646299ca6/examples/quick/text/CMakeLists.txt#L67
      https://github.com/qt/qtdeclarative/blob/6e8f6f446ac8854fd23cb3cbf0fc1f3646299ca6/examples/quick/shared/CMakeLists.txt#L38
      https://github.com/qt/qtdeclarative/blob/6e8f6f446ac8854fd23cb3cbf0fc1f3646299ca6/examples/quick/shared/QtBundleQmlModuleForMacOS.cmake

      https://github.com/qt/qtdeclarative/blob/6e8f6f446ac8854fd23cb3cbf0fc1f3646299ca6/examples/qml/tutorials/extending-qml/chapter6-plugins/Charts/CMakeLists.txt#L19

      Proposed here
      https://git.qt.io/alcroito/qt6-cmake-api-review/-/blob/master/api_review_qt_6_3_deploy.md#L284

      Split from QTBUG-100925

      Attachments

        Issue Links

          For Gerrit Dashboard: QTBUG-101340
          # Subject Branch Project Status CR V

          Activity

            People

              alexandru.croitor Alexandru Croitor
              alexandru.croitor Alexandru Croitor
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There is 1 open Gerrit change