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. Deploy application in macOS.
Forum Updated to NodeBB v4.3 + New Features

Deploy application in macOS.

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
12 Posts 3 Posters 2.1k 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.
  • M Offline
    M Offline
    moVir
    wrote on 3 Dec 2020, 17:38 last edited by moVir 12 Mar 2020, 17:41
    #1

    Hi everyone. Today I try to deploy my application with qt. I have no idea how to do this, because I'm using Cmake in my project. I already realise the project and have an exec file. But it doesn't work on other computer for more reason.
    I google for about 2 hour to find information, but nothing. Of course I try macdeployqt, but it doesn't build with such problem: " :-1: error: Could not find feature macdeployqt.". And as i understand it work only with qmake. But I have Cmake proj.
    Anybody have complete guide to solve this simple problem?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 3 Dec 2020, 17:56 last edited by
      #2

      Hi and welcome to devnet,

      The simple way is to call macdeployqt manually on the bundle you created.

      The tool itself does not depend on qmake.

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

      1 Reply Last reply
      0
      • M Offline
        M Offline
        moVir
        wrote on 4 Dec 2020, 04:44 last edited by moVir 12 Apr 2020, 07:12
        #3

        @SGaist, Ok in this folder I have my qt project release.
        e29d9910-4668-417c-bcfa-38749ebe411d-image.png
        Here what I try to do with terminal
        61235d72-ef1f-4bb1-815f-b4008b553048-image.png
        What I need to do?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 4 Dec 2020, 14:56 last edited by
          #4

          Did you create a command line application ?

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

          M 1 Reply Last reply 7 Dec 2020, 12:46
          0
          • S SGaist
            4 Dec 2020, 14:56

            Did you create a command line application ?

            M Offline
            M Offline
            moVir
            wrote on 7 Dec 2020, 12:46 last edited by
            #5

            @SGaist Can you please clarify what you are talking about?
            If you're talking about my app, no, it's a full GUI using QT.
            If you're talking about macdeployqt, I didn't create it, it was already there.

            J 1 Reply Last reply 7 Dec 2020, 12:53
            0
            • M moVir
              7 Dec 2020, 12:46

              @SGaist Can you please clarify what you are talking about?
              If you're talking about my app, no, it's a full GUI using QT.
              If you're talking about macdeployqt, I didn't create it, it was already there.

              J Offline
              J Offline
              J.Hilk
              Moderators
              wrote on 7 Dec 2020, 12:53 last edited by
              #6

              @moVir provide the full path to the macdeployqt tool in the terminal
              pathToQt/5.15.2/clang_64/bin/macdeployqt

              in case of a QML based application, do not forget to provide the path to your qml files via --qmldir


              Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


              Q: What's that?
              A: It's blue light.
              Q: What does it do?
              A: It turns blue.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                SGaist
                Lifetime Qt Champion
                wrote on 7 Dec 2020, 13:08 last edited by
                #7

                You seem to have only the executable created where you should have an application bundle.

                Do you have CONFIG -= app_bundle in your .pro file ?
                If so remove it. If not, then that is strange and you shall add CONFIG += app_bundle.

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

                M 1 Reply Last reply 8 Dec 2020, 06:28
                1
                • S SGaist
                  7 Dec 2020, 13:08

                  You seem to have only the executable created where you should have an application bundle.

                  Do you have CONFIG -= app_bundle in your .pro file ?
                  If so remove it. If not, then that is strange and you shall add CONFIG += app_bundle.

                  M Offline
                  M Offline
                  moVir
                  wrote on 8 Dec 2020, 06:28 last edited by
                  #8

                  @SGaist Yea, here the main problem. I don't have .pro. Because I work with Cmake, not with Qmake, this what I mean here:
                  6bbe10ea-bcbe-44bd-a0b4-c6776d41d41d-image.png
                  So I want to know, is it possible to create application bundle with CMake.

                  1 Reply Last reply
                  0
                  • S Offline
                    S Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 8 Dec 2020, 07:28 last edited by
                    #9

                    Sorry, I misread that.

                    Can you share your cmake file ?

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

                    M 1 Reply Last reply 8 Dec 2020, 09:29
                    0
                    • S SGaist
                      8 Dec 2020, 07:28

                      Sorry, I misread that.

                      Can you share your cmake file ?

                      M Offline
                      M Offline
                      moVir
                      wrote on 8 Dec 2020, 09:29 last edited by
                      #10

                      @SGaist
                      https://github.com/Geridok/StatisticsOfElectronicHoles/tree/main/QT Part
                      Here u can find it.

                      1 Reply Last reply
                      0
                      • S Offline
                        S Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 8 Dec 2020, 12:29 last edited by
                        #11

                        You need to set the MACOSX_BUNDLE property on your application.

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

                        M 1 Reply Last reply 15 Dec 2020, 14:56
                        1
                        • S SGaist
                          8 Dec 2020, 12:29

                          You need to set the MACOSX_BUNDLE property on your application.

                          M Offline
                          M Offline
                          moVir
                          wrote on 15 Dec 2020, 14:56 last edited by moVir
                          #12

                          @SGaist Thank u! It's work!
                          For everybody who not understand:
                          U need add this to your CmakeList.txt:

                          set(CMAKE_MACOSX_BUNDLE ON)
                          

                          After u need build your project in release with QT Creator (I hope u understand this step)

                          Next u can find folder (in folder of your project) with name like: "build_projName_Desktop_Qt_5_15_2_clang_64bit-Release"

                          And there u can find file with extension: " .app"

                          After open terminal and go to folder ONE STEP BEFORE ur Release folder.

                          Next u need to open Terminal and ATTENTION, as @J-Hilk said:
                          "provide the full path to the macdeployqt tool in the terminal

                          pathToQt/5.15.2/clang_64/bin/macdeployqt
                          

                          "
                          DO NOT PRESS ENTER

                          After u provide path to macdeployqt, press "Space" and write :" build_projName_Desktop_Qt_5_15_2_clang_64bit-Release/projname.app"
                          If u still not understand, here my example(only terminal part).
                          c4e1f4b9-880e-40d7-973d-ded6e1f823dc-image.png
                          Good luck and thanks to @J-Hilk and @SGaist .
                          And my full proj: https://github.com/Geridok/StatisticsOfElectronicHoles
                          There we solve some interesting problem in physics. (If u understand Russian, special welcome😅)

                          1 Reply Last reply
                          1

                          • Login

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