Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Qt Academy Launch in California!

    Solved Deploying 3rdparty Qt Quick plugins on macOS

    3rd Party Software
    3
    13
    2081
    Loading More Posts
    • 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.
    • I
      Ilya Bizyaev last edited by

      Hello,

      I am trying to build a macOS application which uses KDE's Kirigami framework for its UI. On Linux I am able to install Kirigami to a standard location so that Qt could automatically locate it. On macOS I use macdeployqt, but it only copies Qt's own Qt Quick libs (e.g. QQC2), so I have to script cp/ln/install_name_tool.

      Is it possible to make macdeployqt add Kirigami automatically? Or, alternatively, can I use CMake or some macOS tools to do the job?

      1 Reply Last reply Reply Quote 0
      • I
        Ilya Bizyaev last edited by

        Starting from Qt 5.13, there will be a -qmlimport macdeployqt option to specify additional QML module search directories.

        1 Reply Last reply Reply Quote 1
        • AndyS
          AndyS Moderators last edited by

          Hi @Ilya-Bizyaev,

          Provided that your QML imports it and you have your QML2_IMPORT_PATH environment variable set to include the location of the import then macdeployqt should take care of this for you and pick it up as a result. This way macdeployqt can see that it requires it and will deploy it with the other plugins.

          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply Reply Quote 1
          • I
            Ilya Bizyaev last edited by

            Thank you for your reply!

            Unfortunately, macdeployqt does not seem to take QML2_IMPORT_PATH into account. I managed to make it find Kirigami by symlinking from inside Qt's qml folder to the library's location, but it feels hacky.

            1 Reply Last reply Reply Quote 0
            • SGaist
              SGaist Lifetime Qt Champion last edited by

              Hi,

              There's the -qmldir option of macdeployqt that you can use but AFAIK, it only takes one path currently.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply Reply Quote 0
              • I
                Ilya Bizyaev last edited by

                Thanks for the reply :)

                According to the macdeployqt manual:
                -qmldir=<path> : Scan for QML imports in the given path.

                This argument is used to specify the application's qml source directory to be scanned for import * statements. It can accept multiple paths, but these are not used as library search paths.

                To specify a library search path, macdeployqt would need to pass it as an -importPath argument to qmlimportscanner, but it only passes Qt's default library location: http://code.qt.io/cgit/qt/qttools.git/tree/src/macdeployqt/shared/shared.cpp#n1236

                As a hack one can create a link to the custom location from inside the Qt installation, and that's what I use for now, but I think there has to be a better way.

                1 Reply Last reply Reply Quote 0
                • SGaist
                  SGaist Lifetime Qt Champion last edited by

                  A feature to add to macdeployqt: an option to give additional import paths.

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply Reply Quote 0
                  • I
                    Ilya Bizyaev last edited by

                    Should I open a feature request?

                    1 Reply Last reply Reply Quote 0
                    • SGaist
                      SGaist Lifetime Qt Champion last edited by

                      If you don't find any yet, yes. If you can provide a minimal buildable sample application that shows that behaviour it would be great.

                      Out of curiosity, how did you got Kirigami for macOS ?

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply Reply Quote 0
                      • I
                        Ilya Bizyaev last edited by

                        @SGaist I reported the issue as https://bugreports.qt.io/browse/QTBUG-70977 and opened a revision at https://codereview.qt-project.org/#/c/242083/

                        1 Reply Last reply Reply Quote 0
                        • I
                          Ilya Bizyaev last edited by

                          Kirigami works just right on macOS, here are some screenshots:

                          0_1538845873930_photo_2018-10-06_20-10-18.jpg
                          1_1538845873930_photo_2018-10-06_20-10-20.jpg

                          The app is on its early stages, though.

                          1 Reply Last reply Reply Quote 0
                          • SGaist
                            SGaist Lifetime Qt Champion last edited by

                            Thanks for the submission !

                            One small fix to the commit message to do :)

                            Interested in AI ? www.idiap.ch
                            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply Reply Quote 0
                            • I
                              Ilya Bizyaev last edited by

                              Starting from Qt 5.13, there will be a -qmlimport macdeployqt option to specify additional QML module search directories.

                              1 Reply Last reply Reply Quote 1
                              • SGaist
                                SGaist Lifetime Qt Champion last edited by

                                If needed earlier, macdeployqt can be manually built from the dev branch.

                                Interested in AI ? www.idiap.ch
                                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                1 Reply Last reply Reply Quote 0
                                • First post
                                  Last post