Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QT 5.1 Deployment on mac OS X, macdeployqt does not change a links to qt libs inside application
Forum Updated to NodeBB v4.3 + New Features

QT 5.1 Deployment on mac OS X, macdeployqt does not change a links to qt libs inside application

Scheduled Pinned Locked Moved Installation and Deployment
35 Posts 9 Posters 28.5k 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.
  • S Offline
    S Offline
    stereomatching
    wrote on last edited by
    #12

    miks131 thanks.Maybe Qt5 really not as stable as Qt4
    I use Qt4 9 months, encountered one bug
    shift to Qt5 about 3 months ago but already encountered 4~5 bugs
    I can understand why there are many people don't want to shift to Qt5 yet

    I don't know I should wait for the bug fix or try to find some workaround for this bug
    it may take more than one day to find out a workable ad-hoc solution.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      stereomatching
      wrote on last edited by
      #13

      Take a look on this link(on the last answer of stackOverflow)
      "deploy Qt5 apps to mac":http://www.stringcat.com/company_blog/2013/07/04/failed-to-load-platform-cocoa/

      Pretty complicated procedures, I am very new to mac and very surprise
      that deploy third parties dylib on mac could be so complicated, do anyone
      know what kind of benefits or reasons let mac os become so hard to
      deploy 3rd parties dll?Deal with those dependencies make me frustration.

      1 Reply Last reply
      0
      • S Offline
        S Offline
        stereomatching
        wrote on last edited by
        #14

        I am sure the QtQuick Frameworks already copied to the bundle
        But the program can't find any components related to QtQuick control
        QtQuick control is under another module?

        Ah, find out the problem, the QtQuick control, layout and dialog are plugins under other folders

        The script do change the path of qml folder
        @for F in find $QTDIR/lib $QTDIR/plugins $QTDIR/qml -perm 755 -type f @
        But the macdeploy do not copy and configure the id and change the reference path of the dll
        I guess that despite of the bug, macdeploy do not support QtQuick control and QtQuick dialog yet
        or this is another bug of Qt5.1?

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

          As far as I can see - it does not. Currently I'm struggling with QtQuick deployment. I got an error -

          @module "QtQuick" is not installed@

          I copied QtQuick and QtQuick.2 folders to app bundle, and added path to it, by using AddImportPath function inside my code. But anyway - it is not flying at the moment :/

          1 Reply Last reply
          0
          • S Offline
            S Offline
            stereomatching
            wrote on last edited by
            #16

            [quote author="miks131" date="1373878229"]As far as I can see - it does not. Currently I'm struggling with QtQuick deployment. I got an error -

            @module "QtQuick" is not installed@

            I copied QtQuick and QtQuick.2 folders to app bundle, and added path to it, by using AddImportPath function inside my code. But anyway - it is not flying at the moment :/ [/quote]

            I have the same problem too, and I also copy the QtQuick.2 folders and
            part of the QtQuick folders to app bundle.Can't find a single success
            example of deploying QtQuick2 apps on mac.

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

              Yep, another thread with the same "discussion ":http://qt-project.org/forums/viewthread/25903/

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

                Finally managed to get it work, checkout this "answer":http://stackoverflow.com/a/17591828/2370437

                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  stereomatching
                  wrote on last edited by
                  #19

                  miks131, thanks for your answer, thanks for macdeploy of MaximAlien, and the script from lasconic, they work like magic.
                  Have you add you answer to the bug report you mention before?

                  Hope your answer could help the developers solve this annoying bug, never
                  though that deploy a simple app on mac is so painful, it is a real pain without
                  the help of macdeployqt.

                  After peeking into the bundle, I find out the folder of QtQuick.2 is place
                  at the same folder as the exe, maybe this is why the project can't find
                  the dylib before, because I put all of the plugins into the PlugIns folder

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    sfilippidis
                    wrote on last edited by
                    #20

                    The important think here is that a solution MUST be included in a next version of Qt SDK as soon as possible! Until then, I will stick to Qt 4.8.5, and I would guess that I will not be the only one! ;-)

                    https://www.filippidis.name/

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

                      @steriomatching, just added answer to the bug report

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        stereomatching
                        wrote on last edited by
                        #22

                        Thanks, miks131

                        I try your solution on a bigger project, the macdeployqt of MaximAlien provided do not
                        copy the QtQuick folder into the bundle.Any possible reason would
                        stop it copy the QtQuick folder into the bundle?

                        I find out it is related to the qmldir, what is the correct way to set it?

                        My folder layout

                        "layout":http://www.flickr.com/photos/92283971@N04/9292932353/

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

                          how did you run it? Did you specify -qmldir=<path_to_your_qml> flag?

                          1 Reply Last reply
                          0
                          • S Offline
                            S Offline
                            stereomatching
                            wrote on last edited by
                            #24

                            I specify it like this

                            @macdeployqt.app/Contents/MacOS/macdeployqt/
                            /Users/Qt/program/experiment_apps_and_libs/qmlTest2/qmlTest2.app/
                            -qmldir=/Users/Qt/program/experiment_apps_and_libs/qmlTest2/qml/colorCorrection/
                            -verbose=3@

                            I update the layout of my folder on my previous post

                            1 Reply Last reply
                            0
                            • S Offline
                              S Offline
                              stereomatching
                              wrote on last edited by
                              #25

                              bq. I will stick to Qt 4.8.5, and I would guess that I will not be the only one! ;-)

                              I have the same opinion as yours, using Qt5.1 and QtQuick2 on a fun project, I would not recommend my colleague to pick Qt5.1 before it is stable enough.

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

                                Well, I can see only one reason - qml files inside colorCorrection folder does not have any import statements, or it is empty.

                                Can't guess other reason.

                                I dont think that size of project matters, I have quite a few files inside qml dir, and it works fine for me.

                                1 Reply Last reply
                                0
                                • S Offline
                                  S Offline
                                  stereomatching
                                  wrote on last edited by
                                  #27

                                  I find out the reason, I load an old shell, that is why the deployment always fail.Thanks for your helps and deeply hope this bug could be fixed on the next version(5.1.1), deal with the dependencies of Qt on mac is a real pain.

                                  Anybody know why the mac os make 99% of the dylib come with absolute path?

                                  1 Reply Last reply
                                  0
                                  • Q Offline
                                    Q Offline
                                    qtnext
                                    wrote on last edited by
                                    #28

                                    is there a fix for this that will come for Qt5.1.1 ? it seems a verious serious issue for using Qt on Mac ?

                                    1 Reply Last reply
                                    0
                                    • U Offline
                                      U Offline
                                      Uflex
                                      wrote on last edited by
                                      #29

                                      I just started looking at Mac deployment and am a bit confused about how hard it seems to be. I am not even a Mac user so might have missed or not understood things.

                                      I tried using the macdeployqt tool but it seems to leave a lot of work for the developer (modifying the paths, etc), if I understood what's written above, this is a bug in Qt 5.1 and will be corrected soon, right? I don't see any recent work on "git":https://qt.gitorious.org/qt/qttools/trees/stable/src/macdeployqt , does the tool need some love/contribution?

                                      I was wondering as well why the dylibs are burried deep inside Frameworks/QtX.framework/Versions/5/QtX and not directly copied in a Libraries directory in the root of the bundle (aside the MacOS folder)? Having this long path is a bit annoying when you have to manually fix the paths with install_name_tools. Is there a particular reason to have all this hierarchical directories? Aren't Frameworks for developers, containing the headers as well?

                                      1 Reply Last reply
                                      0
                                      • Q Offline
                                        Q Offline
                                        qtnext
                                        wrote on last edited by
                                        #30

                                        some news about this issue in the post on the Qt dev mailing list with thread
                                        "
                                        [Development] Puzzled by desktop development priorities, Mac OS specifically "

                                        1 Reply Last reply
                                        0
                                        • M Offline
                                          M Offline
                                          MrJoshua
                                          wrote on last edited by
                                          #31

                                          I'm using Qt 5.1.1, and deploying to OSX, but I am still getting errors similar to these.
                                          Specifically the qml imports:

                                          QQmlApplicationEngine failed to load component
                                          module "QtQuick.LocalStorage" is not installed
                                          module "QtQuick.Layouts" is not installed
                                          module "QtQuick.Controls" is not installed
                                          module "QtQuick" is not installed
                                          module "QtQuick.Dialogs" is not installed
                                          module "QtQuick.Controls.Styles" is not installed

                                          I'm using qtcreator & macdeployqt, but there is not a -qml option. Most sources say the macdeployqt command just works now in 5.1.1, but that still does not seem to be the case with qml. After all the debugging in this thread what is the canonical way to deploy to mac now?

                                          Thanks

                                          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