Search code examples
c++macosbundleterminology

What is an App Bundle on Mac?


I have a basic C++ applicatin build using g++ and -framework ...

when I run it, I get a :

Working in unbundled mode.  You should build a .app wrapper for your Mac OS X applications.

(which is not std::couted by any of my application).

What causes this, and how can I get rid of it?

Thanks!


Solution

  • You need to create a folder structure and place the binary in a special location. For an example with explanation see this Qt page

    Mac OS X handles most applications as "bundles". A bundle is a directory structure that groups related files together. Bundles are used for GUI applications, frameworks, and installer packages. These are presented to the user as one file in the Finder. When set up correctly, bundles make for easy deployment. All one needs to do is to archive the application using some preferred method. Users then open the archive and drag the application to wherever they please and are ready to go.

    There is something written about this for wxWidgets too

    MacOSX introduces a new way of putting together an application. Instead of adding a resource fork to the executable file, you can simply create a special directory (folder). This is the preferred method for OSX.