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. How to command line build a proper dmg from a Qt app
Forum Updated to NodeBB v4.3 + New Features

How to command line build a proper dmg from a Qt app

Scheduled Pinned Locked Moved Solved Installation and Deployment
13 Posts 2 Posters 2.0k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #4

    Just use a recent version of macdeployqt. The option is -fs.

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

    N 1 Reply Last reply
    1
    • SGaistS SGaist

      Just use a recent version of macdeployqt. The option is -fs.

      N Offline
      N Offline
      Nelson_Piquet
      wrote on last edited by Nelson_Piquet
      #5

      @SGaist

      Looks like -fs did somthing with filestystem. I can see it logged the follwing extra thing. But its still the same issue

      Log: Image will use "HFS+"
      

      But, If I open MyApp/MyApp.app/Contents/MacOS/MyApp then it complains the following on console and gives up with a crash

      QQmlApplicationEngine failed to load component
      qrc:/qml/main.qml:1 module "QtQuick" is not installed
      qrc:/qml/main.qml:4 module "QtWebView" is not installed
      qrc:/qml/main.qml:2 module "QtQuick.Window" is not installed
      qrc:/qml/main.qml:3 module "QtQuick.Controls" is not installed
      qrc:/qml/main.qml:1 module "QtQuick" is not installed
      qrc:/qml/main.qml:4 module "QtWebView" is not installed
      qrc:/qml/main.qml:2 module "QtQuick.Window" is not installed
      qrc:/qml/main.qml:3 module "QtQuick.Controls" is not installed
      qrc:/qml/main.qml:1 module "QtQuick" is not installed
      qrc:/qml/main.qml:4 module "QtWebView" is not installed
      qrc:/qml/main.qml:2 module "QtQuick.Window" is not installed
      qrc:/qml/main.qml:3 module "QtQuick.Controls" is not installed
      qrc:/qml/main.qml:1 module "QtQuick" is not installed
      qrc:/qml/main.qml:4 module "QtWebView" is not installed
      qrc:/qml/main.qml:2 module "QtQuick.Window" is not installed
      qrc:/qml/main.qml:3 module "QtQuick.Controls" is not installed
      
      [1]    57951 segmentation fault  /Volumes/MyApp/MyApp.app/Contents/MacOS/MyApp
      
      1 Reply Last reply
      0
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on last edited by
        #6

        You did not use the qmldir option when running macdeployqt.

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

        N 1 Reply Last reply
        1
        • SGaistS SGaist

          You did not use the qmldir option when running macdeployqt.

          N Offline
          N Offline
          Nelson_Piquet
          wrote on last edited by Nelson_Piquet
          #7

          @SGaist
          Ah superb ! This made a difference. Now if I doubled clicked on the dmg and opened MyApp/MyApp.app/Contents/MacOS/MyApp that is inside it. It works and I am able to launch my app.

          Thanks a lot till here.

          But I am still curious why just double clicking on MyApp dies not work? Why do I have to run MyApp/MyApp.app/Contents/MacOS/MyApp instead of just MyApp ?

          1 Reply Last reply
          0
          • SGaistS Offline
            SGaistS Offline
            SGaist
            Lifetime Qt Champion
            wrote on last edited by
            #8

            Do you have any error message ?

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

            N 1 Reply Last reply
            1
            • SGaistS SGaist

              Do you have any error message ?

              N Offline
              N Offline
              Nelson_Piquet
              wrote on last edited by
              #9

              @SGaist
              The error message says following with a pop up

              You can’t open the application “MyApp.app” because it is not
              supported on this type of Mac.

              1 Reply Last reply
              0
              • SGaistS Offline
                SGaistS Offline
                SGaist
                Lifetime Qt Champion
                wrote on last edited by
                #10

                Are you using a pre-built version of Qt to build your application ?

                By the way, why not use a more recent version of 5.9 ?

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

                N 1 Reply Last reply
                0
                • SGaistS SGaist

                  Are you using a pre-built version of Qt to build your application ?

                  By the way, why not use a more recent version of 5.9 ?

                  N Offline
                  N Offline
                  Nelson_Piquet
                  wrote on last edited by
                  #11

                  @SGaist

                  Do you mean 5.9.6 ? I am using 5.9.4 but this error occurs even if I build with 5.11.2.

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on last edited by
                    #12

                    Can you show your .pro file ?

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

                    N 1 Reply Last reply
                    0
                    • SGaistS SGaist

                      Can you show your .pro file ?

                      N Offline
                      N Offline
                      Nelson_Piquet
                      wrote on last edited by
                      #13

                      @SGaist

                      My .pro file has so many things which is due to multiple stuff and it would not make much sense to share it here. But I have set QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.12 and QML_IMPORT_PATH is set to nothing. Plus, following are some more settings I have in my .pro which might be relevant to this question

                      CONFIG += c++14
                      CONFIG -= bitcode
                      

                      I am marking this Topic as solved. Do let me know if have a suggestion on this last error.

                      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