Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

What does CONFIG -= app_bundle do?


  • Moderators

    When we create a new Qt Console Application using Qt Creator's project wizard, the auto-generated .pro file contains CONFIG -= app_bundle.

    Is this line strictly necessary? What happens if it were removed? (I don't have a macOS machine so I can't experiment myself)

    Thanks!


  • Lifetime Qt Champion

    Hi,

    To the best of my knowledge, a console application is a *nix command line tool which you call by its name directly.

    On macOS, app bundles are usually started with:

    • A click on the dock
    • A double click in the finder
    • Using the open command from the terminal on the bundle name
    • Calling the application directly in the bundle: ./my_app.app/Content/MacOS/my_app

    AFAIK, application bundles are meant for applications which provides a GUI however they can contain command line tools and a lot of stuff (take for example the Xcode app bundle). You can imagine adding the path to these tools to your PATH environment variable to make them accessible directly in the terminal.

    But I think that it would fit the definition of a console application.


  • Qt Champions 2017

    It build application bundle instead of standalone executable. Bundle will have the meta information details like Info.list


  • Moderators

    @dheerendra said in What does CONFIG -= app_bundle do?:

    It build application bundle instead of standalone executable. Bundle will have the meta information details like Info.list

    Thanks, @dheerendra.

    It's still not clear to me though: Why does a console application needs CONFIG -= app_bundle on macOS? Is there a reason why a console app cannot (or should not) be placed inside a bundle?


  • Lifetime Qt Champion

    Hi,

    To the best of my knowledge, a console application is a *nix command line tool which you call by its name directly.

    On macOS, app bundles are usually started with:

    • A click on the dock
    • A double click in the finder
    • Using the open command from the terminal on the bundle name
    • Calling the application directly in the bundle: ./my_app.app/Content/MacOS/my_app

    AFAIK, application bundles are meant for applications which provides a GUI however they can contain command line tools and a lot of stuff (take for example the Xcode app bundle). You can imagine adding the path to these tools to your PATH environment variable to make them accessible directly in the terminal.

    But I think that it would fit the definition of a console application.


Log in to reply