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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on 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 last edited by moVir
      #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
      • SGaistS Offline
        SGaistS Offline
        SGaist
        Lifetime Qt Champion
        wrote on 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
        0
        • SGaistS SGaist

          Did you create a command line application ?

          M Offline
          M Offline
          moVir
          wrote on 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.HilkJ 1 Reply Last reply
          0
          • M moVir

            @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.HilkJ Offline
            J.HilkJ Offline
            J.Hilk
            Moderators
            wrote on 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
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on 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
              1
              • SGaistS SGaist

                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 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
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 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
                  0
                  • SGaistS SGaist

                    Sorry, I misread that.

                    Can you share your cmake file ?

                    M Offline
                    M Offline
                    moVir
                    wrote on last edited by
                    #10

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

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 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
                      1
                      • SGaistS SGaist

                        You need to set the MACOSX_BUNDLE property on your application.

                        M Offline
                        M Offline
                        moVir
                        wrote on 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