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

macdeployqt does not copy QtQuickControls2Impl.framework inside the app bundle

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 6.0.0
    • None
    • macOS v11.1
    • macOS

    Description

      I am building an application using Qt/QML with cmake. These are the packages I am using:

      find_package (Qt6 COMPONENTS Core Qml Quick Svg REQUIRED)

      I am generating a DMG installer with macdeploy with the command below

      add_custom_target(pack COMMAND ${CMAKE_PREFIX_PATH}/bin/macdeployqt ${PROJECT_NAME}.app -qmldir=${CMAKE_SOURCE_DIR}/qml -no-strip -dmg)

      After installation the application fails to start with the error below

      QQmlApplicationEngine failed to load component
      qrc:/qml/main.qml:2:1: Cannot load library /Applications/wol.app/Contents/PlugIns/quick/libqtquickcontrols2plugin.dylib: (dlopen(/Applications/wol.app/Contents/PlugIns/quick/libqtquickcontrols2plugin.dylib, 133): Library not loaded: @rpath/QtQuickControls2Impl.framework/Versions/A/QtQuickControls2Impl
      Referenced from: /Applications/wol.app/Contents/PlugIns/quick/libqtquickcontrols2plugin.dylib
      Reason: image not found)

      Manually copying QtQuickControls2Impl.framework in wol.app/Contents/Frameworks before generating the dmg solves this problem

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            cristeab Bogdan Cristea
            Veli-Pekka Heinonen Veli-Pekka Heinonen
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes