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. [solved] Unable to deploy Qt Quick 2 application on Mac OS X 10.8.2
Forum Updated to NodeBB v4.3 + New Features

[solved] Unable to deploy Qt Quick 2 application on Mac OS X 10.8.2

Scheduled Pinned Locked Moved General and Desktop
32 Posts 7 Posters 20.9k 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.
  • sierdzioS Offline
    sierdzioS Offline
    sierdzio
    Moderators
    wrote on last edited by
    #4

    Run macdeployqt with highest level of verbosity. This tool does not bail out on errors, you can only be sure everything worked well if you read the log.

    (Z(:^

    1 Reply Last reply
    0
    • M Offline
      M Offline
      MaximAlien
      wrote on last edited by
      #5

      Tried macdeployqt with verbose=3 still not able to figure out what is the problem. Here is log using otool -L of my test.app
      Before macdeployqt:
      @Desktop/test.app/Contents/MacOS/test:
      /Users/maximmakhun/Qt5.0.1/5.0.1/clang_64/lib/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.0.0, current version 5.0.1)
      /Users/maximmakhun/Qt5.0.1/5.0.1/clang_64/lib/QtQml.framework/Versions/5/QtQml (compatibility version 5.0.0, current version 5.0.1)
      /Users/maximmakhun/Qt5.0.1/5.0.1/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.0.0, current version 5.0.1)
      /Users/maximmakhun/Qt5.0.1/5.0.1/clang_64/lib/QtCore.framework/Versions/5/QtCore (compatibility version 5.0.0, current version 5.0.1)
      /Users/maximmakhun/Qt5.0.1/5.0.1/clang_64/lib/QtGui.framework/Versions/5/QtGui (compatibility version 5.0.0, current version 5.0.1)
      /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
      /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
      /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
      /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)@

      After macdeployqt:
      @Desktop/test.app/Contents/MacOS/test:
      @executable_path/../Frameworks/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.0.0, current version 5.0.1)
      @executable_path/../Frameworks/QtQml.framework/Versions/5/QtQml (compatibility version 5.0.0, current version 5.0.1)
      @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.0.0, current version 5.0.1)
      @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore (compatibility version 5.0.0, current version 5.0.1)
      @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui (compatibility version 5.0.0, current version 5.0.1)
      /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
      /System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
      /usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 56.0.0)
      /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 169.3.0)@

      Maybe you're able to see what are the problems here.

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #6

        Nope, that does not help. I'm sure I've seen a solution to this somewhere, but I don't remember what it was. You can try pinging chrisadams I think he's quite fluent in that stuff.

        (Z(:^

        1 Reply Last reply
        0
        • M Offline
          M Offline
          MaximAlien
          wrote on last edited by
          #7

          Thanks a lot sierdzio. I'll ask him. If there is any progress with this issue I'll post solution here.

          1 Reply Last reply
          0
          • C Offline
            C Offline
            chrisadams
            wrote on last edited by
            #8

            Hi,

            Unfortunately, I know nothing about Mac or this deployment tool. Thiago mentioned on IRC that from the logs it looks like it's unable to find the QtQuick plugin (the QML import plugin) even though it's finding the QtQuick library (the library is what is shown in the logs).

            The plugin src is from qtdeclarative/src/imports/qtquick2
            It's installed to the QML2 plugins directory (which can be specified via QML2_IMPORT_PATH

            I don't know where that tool looks for the plugins, but the default install location is something like QT5DIR/qml/QtQuick.2 (or maybe QT5DIR/plugins/qml/QtQuick.2 I can't remember - oops).

            Cheers,
            Chris.

            1 Reply Last reply
            0
            • M Offline
              M Offline
              MaximAlien
              wrote on last edited by
              #9

              Thank you for your reply Chris. I'll try to manually copy all needed plugins and libs.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                MaximAlien
                wrote on last edited by
                #10

                Hey,

                This is working solution for deploying QML applications on MAC OS X: https://github.com/MaximAlien/macdeployqtfixed.git

                Hope it helps you guys.

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  miks131
                  wrote on last edited by
                  #11

                  hi Maxim, is there any way to get it works with QT 5.1 ?

                  Struggling with the same issues, can't deploy QtQuick app on Mac

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    MaximAlien
                    wrote on last edited by
                    #12

                    Hey,

                    Did you test code I provided? I tried deploying it for Qt 5.1 only once and there were some issues with paths. I'll try it more this evening.

                    If I manage to deploy it correctly I'll write here.

                    Cheers,
                    Max.

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      miks131
                      wrote on last edited by
                      #13

                      I'm testing it know, there is issue with a path, but I'm applying work around I described "here":http://stackoverflow.com/a/17591828/2370437

                      If I will manage to deploy, I will post here

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        miks131
                        wrote on last edited by
                        #14

                        Does not work for me.

                        macdeployqt MyApp.app/ -qmldir=../src/qml/

                        dynamic links information is changes inside executable and QtQuick modules were copied into the app bundle, near executable. But still getting an error:

                        main.qml:1 module "QtQuick" is not installed

                        Maybe it is connected with QML_IMPORT_PATH variable, or we need to specify somehow where application can find QtQuick modules

                        1 Reply Last reply
                        0
                        • sierdzioS Offline
                          sierdzioS Offline
                          sierdzio
                          Moderators
                          wrote on last edited by
                          #15

                          "Try this":https://codereview.qt-project.org/#change,47906.

                          (Z(:^

                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            MaximAlien
                            wrote on last edited by
                            #16

                            You suggested this hint sierdzio, thanks.

                            I tried it a couple of months ago and it doesn't work for me, even more it was updated Mar 19, 2013 9:43 AM, before Qt 5.1 release.

                            Cheers,
                            Max.

                            1 Reply Last reply
                            0
                            • sierdzioS Offline
                              sierdzioS Offline
                              sierdzio
                              Moderators
                              wrote on last edited by
                              #17

                              Yeah, not sure why Ivan suddenly went silent on this.

                              (Z(:^

                              1 Reply Last reply
                              0
                              • M Offline
                                M Offline
                                MaximAlien
                                wrote on last edited by
                                #18

                                miks131 you can try setting QML2_IMPORT_PATH in application pro file, this may help.

                                1 Reply Last reply
                                0
                                • M Offline
                                  M Offline
                                  miks131
                                  wrote on last edited by
                                  #19

                                  I'm using CMake ( have a lot of different components)

                                  Made a quick check.
                                  Tried to add a link to the directory which contains QtQuick and QtQuick.2 folders after deploy.

                                  @engine.addImportPath( QLatin1String("/Users/username/Projects/MyApp/bin/MyApp.app/Contents/MacOS/") );@

                                  Does not work, the same result if I specify two path to QtQuick and QtQuick.2 folders

                                  1 Reply Last reply
                                  0
                                  • M Offline
                                    M Offline
                                    MaximAlien
                                    wrote on last edited by
                                    #20

                                    Path is correct for QML plugins.
                                    Did you try copying all frameworks and plugins manually?

                                    1 Reply Last reply
                                    0
                                    • M Offline
                                      M Offline
                                      MaximAlien
                                      wrote on last edited by
                                      #21

                                      Looks like macdeployqt needs to be slightly changed for Qt 5.1 because using otool utility for dependencies search before and after macdeployqt nothing changes.

                                      App still uses dependencies from system, not in bundle.

                                      1 Reply Last reply
                                      0
                                      • M Offline
                                        M Offline
                                        miks131
                                        wrote on last edited by
                                        #22

                                        There is another bug - executable contains doble slash in path to Qt dynamic libraries. Take a look here https://bugreports.qt-project.org/browse/QTBUG-32379

                                        That's why macdeployqt does not change links. But you can work it around. Just use install_name_tool to get rid of double slashes, before you run macdeployqt.

                                        Well, I did try to copy QtQuick modules manually too.

                                        But not a frameworks, there are a lot of dependencies with linking which has to be resolved by install_name_tool - to get a self contain app bundle. So I'm using macdeployqt for copying Qt Framework.

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          MaximAlien
                                          wrote on last edited by
                                          #23

                                          I see. Thanks

                                          I'll try to check it this evening.

                                          1 Reply Last reply
                                          0

                                          • Login

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