qt put multiple executables into one bundle on mac OSX

2.2k views Asked by At

We have 4 mac applications that form part of a 'suite', each for use with a different scientific instrument connected via USB.

My colleagues on Windows have developed a splash screen app that lets you choose one of the four separate programs to run, depending on what instrument you are using. On Windows this splash screen app is in the same folder as the other executables and all the dependencies and libraries are included in the same folder as well. So its as easy as clicking the required radio button and then that program will launch.

What I was hoping to do on Mac OS X was to bundle the 4 separate programs into one app bundle and also the splash screen, so that when the application is launched the user will be presented with the splash screen, then when you choose the appropriate app it gets launched automatically.

The dependencies and libraries are common for all the apps.

I'm comfortable building an app bundle with all the dependencies using the mac deployment tool but i'm unsure if its possible to build multiple binaries into one app bundle, and how to set the default app to be launched (the splash screen).

Thanks in advance :)

Mitch

1

There are 1 answers

5
TheDarkKnight On BEST ANSWER

Yes, multiple app bundles inside another app bundle is possible.

how to set the default app to be launched

As you're probably aware, when you build a bundle, the main executable binary file is resident in the bundle's Contents/MacOS folder.

Also in the bundle is the Info.plist file, which is a manifest that OS X uses, amongst other things, to know which binary to execute when the user runs the application. In this case, the key CFBundleExecutable names the binary in the Contents/MacOS folder.

If you copy the other application bundles to the Resources folder, you can then locate them from the Splash Screen app and execute as required.