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. Application on MacOS not producing a .app gile so I can create a shippable executable
Forum Updated to NodeBB v4.3 + New Features

Application on MacOS not producing a .app gile so I can create a shippable executable

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
23 Posts 4 Posters 5.4k Views 4 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.
  • D DiBosco

    @SGaist said in Application on MacOS not producing a .app gile so I can create a shippable executable:

    Hi,

    How is your project configured ?
    Do you happen to have something like CONFIG -= app_bundle ?
    If not, seeing the outdated version of Qt you are using you might have to write the opposite CONFIG += app_bundle.

    Adding the +app_bundle makes no difference, sadly. I had tried that on the M1 Mac, should have mentioned that. I should also have said there is no -app_bundle.

    Do I have this right: the build is in build-MV01SW03-Desktop_Qt_5_6_3_clang_64bit-Release. On Linux and Windows' equivalent directory there is an executable in it. The MV01SW03.app file (folder?) should also be there on Mac?

    jsulmJ Offline
    jsulmJ Offline
    jsulm
    Lifetime Qt Champion
    wrote on last edited by
    #5

    @DiBosco said in Application on MacOS not producing a .app gile so I can create a shippable executable:

    Adding the +app_bundle makes no difference

    Did you rerun qmake after chaning the pro file? Better to do a complete rebuild: delete build folder, run qmake and build

    https://forum.qt.io/topic/113070/qt-code-of-conduct

    D 1 Reply Last reply
    0
    • jsulmJ jsulm

      @DiBosco said in Application on MacOS not producing a .app gile so I can create a shippable executable:

      Adding the +app_bundle makes no difference

      Did you rerun qmake after chaning the pro file? Better to do a complete rebuild: delete build folder, run qmake and build

      D Offline
      D Offline
      DiBosco
      wrote on last edited by
      #6

      @jsulm said in Application on MacOS not producing a .app gile so I can create a shippable executable:

      @DiBosco said in Application on MacOS not producing a .app gile so I can create a shippable executable:

      Adding the +app_bundle makes no difference

      Did you rerun qmake after chaning the pro file? Better to do a complete rebuild: delete build folder, run qmake and build

      Yes. :) (I'm not quite THAT green around the gills! :D )

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DiBosco
        wrote on last edited by
        #7

        Is it possible this is a system-wide issue?

        I created an hello world app on the Mac (rather than using one that was originally created on Linux) and that also doesn't create the .app file.

        I had hours and hours of "fun" getting Qt even working on Mac OS (even more than the palava you go through on Windows to get it going) and I suppose it's possible something is wrong there. The original installer told me I needed xcode 5, but of course that won't run on this version of Mac OS) and I had to uninstall stuff and resinstall in a specific order to even get it to run Qt at all.

        I can't use Qt6 because this program uses Qextserial port and we need to run 5.6.3 because of the licence situation. This all works on Windows with some effort as long as you use mingw, and with total ease and grace on Linux, it's just MacOS it's being a total pain with.

        Could there be some global file in MacOS that tells it not to create the .app file for example?

        1 Reply Last reply
        0
        • artwawA Offline
          artwawA Offline
          artwaw
          wrote on last edited by
          #8

          Might be that old Xcode doesn't work well anymore? Never been in this situation.
          Can you show us your .pro file please?

          For more information please re-read.

          Kind Regards,
          Artur

          D 1 Reply Last reply
          0
          • artwawA artwaw

            Might be that old Xcode doesn't work well anymore? Never been in this situation.
            Can you show us your .pro file please?

            D Offline
            D Offline
            DiBosco
            wrote on last edited by DiBosco
            #9

            @artwaw

            I doubt it's xcode, because with the latest xcode on my M1 Macbook and 5.6.3 it doesn't produce the .app file (which I have tried with and without CONFIG +app_bundle). Pro file is:

            #-------------------------------------------------
            #
            # Project created by QtCreator 2024-09-02T14:56:42
            #
            #-------------------------------------------------
            
            QT += core gui
            CONFIG += static
            
            QT += widgets
            greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
            
            TARGET = MV01SW03
            TEMPLATE = app
            
            include(qextserialport/src/qextserialport.pri)
            
            SOURCES += main.cpp \
                       mainwindow.cpp
            
            HEADERS += mainwindow.h
            
            FORMS   += mainwindow.ui
            
            D 1 Reply Last reply
            0
            • D DiBosco

              @artwaw

              I doubt it's xcode, because with the latest xcode on my M1 Macbook and 5.6.3 it doesn't produce the .app file (which I have tried with and without CONFIG +app_bundle). Pro file is:

              #-------------------------------------------------
              #
              # Project created by QtCreator 2024-09-02T14:56:42
              #
              #-------------------------------------------------
              
              QT += core gui
              CONFIG += static
              
              QT += widgets
              greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
              
              TARGET = MV01SW03
              TEMPLATE = app
              
              include(qextserialport/src/qextserialport.pri)
              
              SOURCES += main.cpp \
                         mainwindow.cpp
              
              HEADERS += mainwindow.h
              
              FORMS   += mainwindow.ui
              
              D Offline
              D Offline
              DiBosco
              wrote on last edited by
              #10
              This post is deleted!
              1 Reply Last reply
              0
              • artwawA Offline
                artwawA Offline
                artwaw
                wrote on last edited by
                #11

                I can't debug this on my end (no access to static qt, much less such an old version). app_bundle is default on macOS, so specifying it explicitly should alter nothing.

                • have you tried to play with the DESTDIR variable to verify if anything is being copied over?
                • I noticed you left out any DEPENPATH and LIBS, so I presume they just work? At any rate, this should not have any influence.
                • verify that Xcode-select outputs all the right things you would expect it?
                  And finally, I'd try to run qmake manually from the terminal, looking for any suspicious/ unusual output.

                I am sorry I can't be more specific but what you do is rather unusual setup.

                For more information please re-read.

                Kind Regards,
                Artur

                1 Reply Last reply
                0
                • D Offline
                  D Offline
                  DiBosco
                  wrote on last edited by DiBosco
                  #12

                  I think the static thing is a red herring because I tried creating a non-static hello world up on both Macs using the standard template and it still does nothing in terms of a .app being generated. In this particular instance STATIC being in the pro file is because because it was built on Windows as a static app and put back on to svn like that, I tried taking that out on the Mac and it made no difference.

                  I haven't touched DESTDIR directory, is this one of the build environment settings in Creator?

                  In terms of DEPENPATH and LIBS, I've not touched them, and actually, not sure what they relate to either.

                  I know nothing about Xcode-select or what it should do. I don't really know what Xcode is, I general don't use Macs other than for making music, I do development on Linux mainly and Windows when I am forced to and it is 95% embedded stuff I do; so I know C well and can knock up very simple GUIs for things like production test, debugging etc which although I write on Linux 99% of the time, it gets recompiled on Windows because it's all for engineery stuff for production and engineers very, very rarely use Macs.

                  This particular app is a Noddy program to update a binary file in a unit in the field by squirting out ASCII serial data to a bootloader I wrote for an embedded system. It has nothing but MainWindow.cpp and its associated file (and main.cpp). It's real Mickey Mouse stuff.

                  I'm so used to working on Linux where everything just works straight from repository installs that I've probably done something stupid on the installs on both Mac systems. I do remember about seven years ago I created a stand alone app for Mac using Qt on my old Intel Macbook, but I can remember absolutely nothing whatsoever about how I did it and at the time I likely just installed the latest verion of Qt and I suppose I must have installed Xcode - whatever that is - but I have zero recollection of what I did.

                  The one thing I could do at this point is delete 5.6.3 from the M1 Mac, install the latest version of Qt and see if that creates the app file, but as we have to build against 5.6.3 for licence reasons I'm not really sure that helps.

                  I did run qmake from the command line and it worked fine. I think what fell over was make install because it couldn't find make at which point I either gave up or got distracted trying something else.

                  Really appreciate you trying to help, thank you, Artur.

                  artwawA 1 Reply Last reply
                  0
                  • D DiBosco

                    I think the static thing is a red herring because I tried creating a non-static hello world up on both Macs using the standard template and it still does nothing in terms of a .app being generated. In this particular instance STATIC being in the pro file is because because it was built on Windows as a static app and put back on to svn like that, I tried taking that out on the Mac and it made no difference.

                    I haven't touched DESTDIR directory, is this one of the build environment settings in Creator?

                    In terms of DEPENPATH and LIBS, I've not touched them, and actually, not sure what they relate to either.

                    I know nothing about Xcode-select or what it should do. I don't really know what Xcode is, I general don't use Macs other than for making music, I do development on Linux mainly and Windows when I am forced to and it is 95% embedded stuff I do; so I know C well and can knock up very simple GUIs for things like production test, debugging etc which although I write on Linux 99% of the time, it gets recompiled on Windows because it's all for engineery stuff for production and engineers very, very rarely use Macs.

                    This particular app is a Noddy program to update a binary file in a unit in the field by squirting out ASCII serial data to a bootloader I wrote for an embedded system. It has nothing but MainWindow.cpp and its associated file (and main.cpp). It's real Mickey Mouse stuff.

                    I'm so used to working on Linux where everything just works straight from repository installs that I've probably done something stupid on the installs on both Mac systems. I do remember about seven years ago I created a stand alone app for Mac using Qt on my old Intel Macbook, but I can remember absolutely nothing whatsoever about how I did it and at the time I likely just installed the latest verion of Qt and I suppose I must have installed Xcode - whatever that is - but I have zero recollection of what I did.

                    The one thing I could do at this point is delete 5.6.3 from the M1 Mac, install the latest version of Qt and see if that creates the app file, but as we have to build against 5.6.3 for licence reasons I'm not really sure that helps.

                    I did run qmake from the command line and it worked fine. I think what fell over was make install because it couldn't find make at which point I either gave up or got distracted trying something else.

                    Really appreciate you trying to help, thank you, Artur.

                    artwawA Offline
                    artwawA Offline
                    artwaw
                    wrote on last edited by
                    #13

                    @DiBosco said in Application on MacOS not producing a .app gile so I can create a shippable executable:

                    The one thing I could do at this point is delete 5.6.3 from the M1 Mac, install the latest version of Qt and see if that creates the app file, but as we have to build against 5.6.3 for licence reasons I'm not really sure that helps.

                    Unless I am mistaken you can just download and install using online installer into a different folder and it should not interfere. should not

                    Xcode is Apple SDK, think of it as all the -dev packages in Linux plus toolkits (compilers, debuggers, whatnot). It is essential.

                    So, give it a go - if it still fails to build a proper .app on the fresh Qt we know it's something we can probably fix with a means to reproduce errors and hopefully that could fix your main issue. If on the other hand it works just fine... We'll see.

                    For more information please re-read.

                    Kind Regards,
                    Artur

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

                      If you are locked to that old version of Qt, you might want to consider virtualization and run an older version of macOS + Xcode that was officially supported by that version of Qt.
                      That said, as other pointed out, a static Qt version on macOS is really unusual. This platform rather uses frameworks and dynamic libraries in their bundles.

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

                      D 1 Reply Last reply
                      1
                      • SGaistS SGaist

                        If you are locked to that old version of Qt, you might want to consider virtualization and run an older version of macOS + Xcode that was officially supported by that version of Qt.
                        That said, as other pointed out, a static Qt version on macOS is really unusual. This platform rather uses frameworks and dynamic libraries in their bundles.

                        D Offline
                        D Offline
                        DiBosco
                        wrote on last edited by DiBosco
                        #15

                        @SGaist said in Application on MacOS not producing a .app gile so I can create a shippable executable:

                        That said, as other pointed out, a static Qt version on macOS is really unusual. This platform rather uses frameworks and dynamic libraries in their bundles.

                        As I said in my previous post, the static thing is a red herring. Whether it is built dynamic or static, I get the the same lack of .app.

                        I'll try the latest version on the M1 Mac and see what happens next week, have run out of time this week to try it.

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          DiBosco
                          wrote on last edited by DiBosco
                          #16

                          OK, I ended up with unexpected spare time this evening so installed the latest version of Qt and it still doesn't produce a .app file.

                          At least with this latest version I can click on the executable from the build directory and it runs, with 5.6.3 I get a crash report that gives some Rosetta data.

                          artwawA 1 Reply Last reply
                          0
                          • D DiBosco

                            OK, I ended up with unexpected spare time this evening so installed the latest version of Qt and it still doesn't produce a .app file.

                            At least with this latest version I can click on the executable from the build directory and it runs, with 5.6.3 I get a crash report that gives some Rosetta data.

                            artwawA Offline
                            artwawA Offline
                            artwaw
                            wrote on last edited by
                            #17

                            @DiBosco said in Application on MacOS not producing a .app gile so I can create a shippable executable:

                            I can click on the executable from the build directory

                            So doesn't produce the .app but does produce executable? Just plain binary?

                            For more information please re-read.

                            Kind Regards,
                            Artur

                            D 1 Reply Last reply
                            0
                            • artwawA artwaw

                              @DiBosco said in Application on MacOS not producing a .app gile so I can create a shippable executable:

                              I can click on the executable from the build directory

                              So doesn't produce the .app but does produce executable? Just plain binary?

                              D Offline
                              D Offline
                              DiBosco
                              wrote on last edited by DiBosco
                              #18

                              @artwaw said in Application on MacOS not producing a .app gile so I can create a shippable executable:

                              @DiBosco said in Application on MacOS not producing a .app gile so I can create a shippable executable:

                              I can click on the executable from the build directory

                              So doesn't produce the .app but does produce executable? Just plain binary?

                              Yes, that's right.

                              This is, for clarity, on the M1 Mac. The 5.6.3 program executable crashes, the latest version 6.something exectutable runs if you click on it in the build directory.

                              Also for clarity, this is just an hello world program I've tried it with, written from scratch.

                              artwawA 1 Reply Last reply
                              0
                              • D DiBosco

                                @artwaw said in Application on MacOS not producing a .app gile so I can create a shippable executable:

                                @DiBosco said in Application on MacOS not producing a .app gile so I can create a shippable executable:

                                I can click on the executable from the build directory

                                So doesn't produce the .app but does produce executable? Just plain binary?

                                Yes, that's right.

                                This is, for clarity, on the M1 Mac. The 5.6.3 program executable crashes, the latest version 6.something exectutable runs if you click on it in the build directory.

                                Also for clarity, this is just an hello world program I've tried it with, written from scratch.

                                artwawA Offline
                                artwawA Offline
                                artwaw
                                wrote on last edited by
                                #19

                                @DiBosco what if you try the default GUI widgets application template from the creator?

                                For more information please re-read.

                                Kind Regards,
                                Artur

                                D 1 Reply Last reply
                                0
                                • artwawA artwaw

                                  @DiBosco what if you try the default GUI widgets application template from the creator?

                                  D Offline
                                  D Offline
                                  DiBosco
                                  wrote on last edited by
                                  #20

                                  @artwaw said in Application on MacOS not producing a .app gile so I can create a shippable executable:

                                  @DiBosco what if you try the default GUI widgets application template from the creator?

                                  That's what I tried when I made my hello world app.

                                  1 Reply Last reply
                                  0
                                  • artwawA Offline
                                    artwawA Offline
                                    artwaw
                                    wrote on last edited by
                                    #21

                                    Ah, sorry, written from scratch - I misunderstood that.

                                    Might be weird and it's been ages since I tried, but: what about two-step approach? You can ask qmake to prepare build files for the Xcode with qmake -spec macx-xcode project.pro or qmake ~/src/myapp -spec macx-xcode - the open the result in Xcode and try to build there?

                                    I am running out of ideas...

                                    For more information please re-read.

                                    Kind Regards,
                                    Artur

                                    1 Reply Last reply
                                    0
                                    • D Offline
                                      D Offline
                                      DiBosco
                                      wrote on last edited by DiBosco
                                      #22

                                      I finally sussed this. It was a number of things. In case it helps anyone on the future:

                                      I found an article that suggested doing this on the command line in the source code folder:

                                      make clean
                                      qmake -config release
                                      make

                                      I still didn't have a .app in Finder but I did have one in the console so I am guessing ******** Finder is one of the biggest issues here. Probably does that really annoying thing Windows Explorer does by hiding extensions. Have never understood why a file explorer would do that. I could at this point run the macdeploy tool from the command line and produce an exxecutable.

                                      At this point the STATIC build was a problem. Taking that out, meant it would run as a stand alone app.

                                      This is all on 5.6.3 so the Qt version was also nothing to do with it.

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

                                        Application bundle on macOS are indeed a special case. They are basically a folder with an extension following a special structure.

                                        Here you have the complete explanation in the Apple documentation.

                                        The Qt macOS deployment guide also talks about it.

                                        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
                                        1

                                        • Login

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