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
QtWS25 Last Chance

[SOLVED] Mac deployment Qt Quick 2.0 Qt 5.3.1

Scheduled Pinned Locked Moved QML and Qt Quick
30 Posts 3 Posters 11.7k Views
  • 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.
  • G Offline
    G Offline
    gbgsoft
    wrote on last edited by
    #1

    Has anyone created a successful bundle for a Qt Quick 2.0 app for Qt5.3.1?

    I have scoured the web looking for a working script and I still am getting 'QtQuick is not installed' error messages after running macdeployqt with the location of the qml dir's pointing to my app's qml folders, i.e.

    /Users/user/Qt5.3.1/5.3/clang_64/bin/macdeployqt myapp.app -verbose=1
    -qmldir=/Users/user/Documents/vcpp/qtquick/myapp
    -qmldir=/Users/user/Documents/vcpp/qtquick/myapp/controls

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

      Hi,

      I've created the app to prepare your application which you can send it to App Store. To get this application use "link":http://www.dshav.com/apps/QtAppMacDeploy.dmg.

      P.S. If you find some issues let me now. I've tried to fix it.
      P.S.S. To send your app to App Store you can use the App Loader from official "Apple Developer site":https://itunesconnect.apple.com/apploader/ApplicationLoader_3.0.dmg.

      Mac OS and iOS Developer

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

        Hi Shav: Awesome. Some usage questions:

        1. Are the Mac Certs required just to make the package.
        2. What is the entitlements path?
        3. What is the application path? Is it the app folder? e.g. myapp.app
        4. The QML path, is the path in my app or the path to Qt's QML folders?
        5. What is the install path? Is it where I want the output of the your tool to be placed?

        Thanks.

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

          Hi gbgsoft

          1. Mac Certs need to use codesign tool. This tool need to use if you want submit your app to App Store. Also this tool helped you remove message dialog about secure. This dialog you can see when try to open application which downloads from websites not from App Store.

          2. The entitlements plist is a manifest from Android (if you understand me). For more information please look "here":https://developer.apple.com/library/mac/documentation/Miscellaneous/Reference/EntitlementKeyReference/Chapters/EnablingAppSandbox.html#//apple_ref/doc/uid/TP40011195-CH4-SW1. Also you may need to "Info.plist keys":https://developer.apple.com/library/ios/documentation/general/Reference/InfoPlistKeyReference/Articles/AboutInformationPropertyListFiles.html#//apple_ref/doc/uid/TP40009254-SW4.

          3. Application path is a full path to you Application.app (in you case is myapp.app).

          4. QML path is a path to QML folder with you app QML files which you use in your app.

          5. You mean Qt Install Folder? If this is true this folder is a folder where you install your version of Qt. But you must select it something like this:
            @
            /Volumes/Documents/Applications/Qt/Qt5.3.2/5.3/clang_64
            @

          don't select bin folder because application append it itself.

          !http://dshav.com/apps/QtAppMacDeploy.png(QtAppMacDeploy)!

          Mac OS and iOS Developer

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

            Hi Shav: I'm having some problems running the tool.

            The picker buttons that invoke the path searches, eg QML path will not permit me to select folders. When I click on the desired folder, the 'Open' button remains disabled as do all the files in the display.

            The Qt install Folder control will only select the topmost Qt folder and not the clang_64 folder as your example shows.

            The app crashes in several spots, usual when return from a file open dialog, or when invoking it. This has happened from several different spots in the dialog.

            But the biggest problem is that where I want to select a folder, I cannot do so.

            1 Reply Last reply
            0
            • 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

                                          • Login

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