0

I have created a small Cocoa application and built a Mach-O file using cross-platform tools. It is working Ok.

If I bring the Mach-O file to Mac (MacBook Pro OSX 10.11) it appears with Terminal icon in the Finder. If I double-click it, it opens unix Terminal window and starts the application from within the Terminal. Once my app starts, it opens its own window and works as expected. Of course, the Terminal window besides the application looks ugly. How do I make it start without opening the Terminal window?

My guess there should be some flag in Mach-O file to indicate it's a GUI application and doesn't need a Terminal, but I haven't found anything like that.

PineForestRanch
  • 473
  • 2
  • 11
  • 2
    No you should create an Application Bundle (have a look at the documentation for a minimal Application Bundle structure). – Jean-Baptiste Yunès Apr 02 '16 at 16:44
  • I see. I'll try that. So, if my software has 3 executables, I would need to create 3 separate bundles. Correct? How about the installer. I need to ask the user which components to install, ask for some options. But I obviously cannot create the bundle for the installer. What do I do about this. What about un-installer. Do I need a separate bundle for the uninstaller? – PineForestRanch Apr 02 '16 at 17:53
  • Are they 3 applications? If yes, then 3 bundles, if not then have a look at bundle structure to embed different kind of things in your app. – Jean-Baptiste Yunès Apr 02 '16 at 18:02
  • I think I understand. Unlike other platforms, on OS X a program is not a single file, but a directory tree which embeds the executable - a bundle. When the Finder sees a directory with extension .app, it doesn't let you look inside, but treats it as a whole. Quite interesting. Thank you. – PineForestRanch Apr 02 '16 at 19:10

0 Answers0