Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. [SOLVED] Mac deployment Qt Quick 2.0 Qt 5.3.1
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] Mac deployment Qt Quick 2.0 Qt 5.3.1

Scheduled Pinned Locked Moved QML and Qt Quick
30 Posts 3 Posters 12.3k 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.
  • shavS Offline
    shavS Offline
    shav
    wrote on last edited by
    #6

    Thanks for your feedback! I'll check it and fix it as fast as possible.

    Mac OS and iOS Developer

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gbgsoft
      wrote on last edited by
      #7

      Hi Shav: Fantastic. I have Qt 5.3.1 installed. Would it be helpful to send you the dump file that gets optionally created?

      1 Reply Last reply
      0
      • shavS Offline
        shavS Offline
        shav
        wrote on last edited by
        #8

        Hi gbgsoft,

        I've checked the application and fixed the bug with open QML folder. Also I've added a new flag which give you to create the shell script after first deploy. It will help to you when you will send the next build of app. But when you use the script don't change any paths (QML, Qt Install, your Application, Entitlements.plist, etc.)

        The last version you can find "here":http://www.dshav.com/apps/QtAppMacDeploy.dmg.

        P.S. I don't see any crashes when using open folder dialog. Could you send to me crash report by mail thanks.

        Mac OS and iOS Developer

        1 Reply Last reply
        0
        • G Offline
          G Offline
          gbgsoft
          wrote on last edited by
          #9

          Thanks, I'll try the new build and get back to you. I can't attach the file here. What's your email so that I can send it to you?

          1 Reply Last reply
          0
          • shavS Offline
            shavS Offline
            shav
            wrote on last edited by
            #10

            Please check my profile and you find the link "Send Mail"

            Mac OS and iOS Developer

            1 Reply Last reply
            0
            • G Offline
              G Offline
              gbgsoft
              wrote on last edited by
              #11

              Hi Shav: I download the upgrade which said that it included the source, but in inspecting the dmg and the package, I couldn't find the source. Where would that be located?

              I ran the upgraded from and it crashed when I tried to select on of the paths (I forget which one), so I'd like to build the program from source and try to see what's happening. Alternatively, is there a git repository for the project. Thanks

              1 Reply Last reply
              0
              • shavS Offline
                shavS Offline
                shav
                wrote on last edited by
                #12

                Hi gbgsoft,

                Sorry I've forgot add the sources to DMG file when upload a new version of project. Please re-download the DMG file. Also you can use the repos from "github":https://github.com/dshav/qtappmacdeploy.

                P.S. Thanks for the crash report. I'll check it.

                Mac OS and iOS Developer

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  gbgsoft
                  wrote on last edited by
                  #13

                  Hi Shav: I have cloned and built the project. As shown,

                  !http://www.gbgsoft.com/downloads/screen.png(Screen Shot)!

                  But the app just continues to run an run and never generates a script.
                  I have made up values for the 2 certs and the entitlements path. Not sure if I understand the entitlements purpose, so this is probably wrong.

                  Is there something here that you can see that's amiss?

                  (Project built on the first go, you got to love git).

                  1 Reply Last reply
                  0
                  • shavS Offline
                    shavS Offline
                    shav
                    wrote on last edited by
                    #14

                    Hi gbgsoft,

                    For now you need to set real certificates because application used them to add codesign to your app and all plugins/libs/frameworks. This needs to open application as certificated on another Mac.

                    Now I trying implement code to remove this requirements (certivicates). Give me a few time and I commit the new version. Thanks for you help to create this app :-)

                    Mac OS and iOS Developer

                    1 Reply Last reply
                    0
                    • G Offline
                      G Offline
                      gbgsoft
                      wrote on last edited by
                      #15

                      Hi Shav: I await the next build. In the interim, I shall start the process if getting certs from Apple.

                      1 Reply Last reply
                      0
                      • G Offline
                        G Offline
                        gbgsoft
                        wrote on last edited by
                        #16

                        Hi Shav. Used the new build and found a couple of issues. The function getQtFolder() was not returning the correct folder, which I corrected as per below:

                        QString QmdSettings::getQtFolder()
                        {
                        m_qtFolder =getenv("QTDIR");
                        return m_qtFolder;
                        }

                        Once corrected the app ran through to completion. Here are the scripts it generated:

                        "/Users/user/Qt5.3.1/5.3/clang_64/bin/macdeployqt" ("/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/canvas_eagles.app", "-verbose=1", "-qmldir=/Users/user/Documents/vcpp/qtquick/canvas_eagles", "-executable=/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/canvas_eagles.app/Contents/MacOS/canvas_eagles")

                        "rm" ("-rf", "/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/canvas_eagles.app/Contents/Resources/qml/com")

                        "ls" ("-al", "/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/canvas_eagles.app/Contents/Frameworks/")

                        "chmod" ("+x", "/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/script.sh")

                        "sh" ("/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/script.sh")

                        "rm" ("-rf", "/Users/user/Documents/vcpp/qtquick/build-canvas_eagles-Desktop_Qt_5_3_clang_64bit-Release/script.sh")

                        My app when run reports that it is unable to locate the several files, so obvisously the qmldir param in the first script is wrong. In your app, I pointed to the folder containing main.qml, but there are other folders containing qml files. What should those -qmldir parameters look like?

                        Application output from my app.
                        rc:///main.qml:4 module "QtQuick.Controls" is not installed
                        qrc:///main.qml:5 module "QtQuick.Window" is not installed
                        qrc:///main.qml:6 module "QtQuick.Controls.Styles" is not installed
                        qrc:///main.qml:3 module "QtQuick" is not installed
                        qrc:///main.qml:4 module "QtQuick.Controls" is not installed
                        qrc:///main.qml:5 module "QtQuick.Window" is not installed
                        qrc:///main.qml:6 module "QtQuick.Controls.Styles" is not installed
                        qrc:///main.qml:3 module "QtQuick" is not installed
                        qrc:///main.qml:4 module "QtQuick.Controls" is not installed
                        qrc:///main.qml:5 module "QtQuick.Window" is not installed
                        qrc:///main.qml:6 module "QtQuick.Controls.Styles" is not installed

                        1 Reply Last reply
                        0
                        • shavS Offline
                          shavS Offline
                          shav
                          wrote on last edited by
                          #17

                          Hi gbgsoft,

                          Function getenv(“QTDIR”) works only when you build your app in debug/release mode. But if you close app and try to load your app as user (not from QtCreator) you can't get result of call getenv(“QTDIR”).

                          About issues:

                          1. Why in your script all commands have the symbol (")? In my code I didn't see this symbol in command name. The script must looks like this:
                            @
                            /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/bin/macdeployqt /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app -verbose=1 -executable=/Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/MacOS/QtAppMacDeploy
                            rm -rf /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Resources/qml/com
                            cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtCore.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Frameworks/QtCore.framework/Resources
                            cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtGui.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Frameworks/QtGui.framework/Resources
                            cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtNetwork.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Frameworks/QtNetwork.framework/Resources
                            cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtPrintSupport.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Frameworks/QtPrintSupport.framework/Resources
                            cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtQml.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Frameworks/QtQml.framework/Resources
                            cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtQuick.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Frameworks/QtQuick.framework/Resources
                            cp /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64/lib/QtWidgets.framework/Contents/Info.plist /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/Frameworks/QtWidgets.framework/Resources
                            dsymutil /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/Contents/MacOS/QtAppMacDeploy -o /Volumes/Documents/MyWork/PROJECTS/TEST_DEPLOY/QtAppMacDeploy.app/../QtAppMacDeploy.app.dSYM
                            @

                          2. You must select root folder of all your QML files. More information "here":http://qt-project.org/doc/qt-5/macosx-deployment.html#macdeploy.

                          P.S. Also I've found critical bug with app. When I added the codesing to app with my certificate the application can't run subprocess (and all functions doesn't work) for now I don't know how fix this bug. I need more time to research some solution for this.

                          Mac OS and iOS Developer

                          1 Reply Last reply
                          0
                          • G Offline
                            G Offline
                            gbgsoft
                            wrote on last edited by
                            #18

                            Hi Shav - I think the extra symbol (") came as a result of me just copying the qDebug() output.

                            My folder was the root one of the app.

                            WRT the QtDir, I note your answer, but in the original form it was pulling my applications root folder, not Qt's.

                            Let me know when you've got a new build, I'll pull your changes from git and give it another whirl.

                            Thanks for your support. It is appreciated.

                            1 Reply Last reply
                            0
                            • shavS Offline
                              shavS Offline
                              shav
                              wrote on last edited by
                              #19

                              Hi gbgsoft,

                              Please update your copy from repo. But I still have a problem with certificated version of app.

                              Mac OS and iOS Developer

                              1 Reply Last reply
                              0
                              • N Offline
                                N Offline
                                nils_heidorn
                                wrote on last edited by
                                #20

                                Holy crap, shav, you made my day !
                                I was experiencing the macdeployqt problem and was googling for a solution and found this thread.
                                Download your source, used it and my app now works on a non-Qt Mac !

                                THANK YOU !!!!

                                Nils

                                1 Reply Last reply
                                0
                                • shavS Offline
                                  shavS Offline
                                  shav
                                  wrote on last edited by
                                  #21

                                  You are welcome!

                                  P.S. If you find issues post here.

                                  Mac OS and iOS Developer

                                  1 Reply Last reply
                                  0
                                  • G Offline
                                    G Offline
                                    gbgsoft
                                    wrote on last edited by
                                    #22

                                    Hi Shav: I downloaded from the latest commit in the repo. The program works just fine, if non-qml programs are used but shows the same QML errors as before, my app can't find the Qt Quick modules. Is there some output I could trap for you from the console. Alternatively I could put the app in question into Gitorious and you could pull a copy and see for yourself. Thanks.

                                    1 Reply Last reply
                                    0
                                    • shavS Offline
                                      shavS Offline
                                      shav
                                      wrote on last edited by
                                      #23

                                      Hi gbgsoft,

                                      As I remember your app using the Qt Quick right? If so you need to set QML files folder. It's need because macdeployqt will analyse your QML's files and found plugins which will be coped to your app bundle. If you doesn't set QML files macdeployqt tool doesn't copy any QtQuick plugins to your app and you will see the errors about "can’t find the Qt Quick modules". I think you should set QML files in app.

                                      I've added docs about my tool. You can find it "here":http://www.dshav.com/my_projects/qt-projects/qt-app-mac-deploy/documentation/. If you find some issues in doc let me know.

                                      Thanks!

                                      Mac OS and iOS Developer

                                      1 Reply Last reply
                                      0
                                      • G Offline
                                        G Offline
                                        gbgsoft
                                        wrote on last edited by
                                        #24

                                        Hi Shav: yes I'm using Qt Quick. The path I am specifying is the path to my applications source folder. This folder contains main.qml and other qml files. There is also a sub-folder which also contains qml files. Should I be specifying the path to the qml files or the fully qualified path to main.qml itself?

                                        e,g, ....myapp/src/main.qml

                                        1 Reply Last reply
                                        0
                                        • shavS Offline
                                          shavS Offline
                                          shav
                                          wrote on last edited by
                                          #25

                                          In your case path must be like myapp/src/

                                          Mac OS and iOS Developer

                                          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