views:

239

answers:

3

Hi,

Is it possible to have two executables each with its own plist to share the same bundle. Then depends on the way app is executed (parameters) to load the appropriate executable.

Imagine the case where we have a main application (executable with UI) and the mini application (shorter version of the main app also with its own UI) and then depend on the parameters user used for starting the application execute the appropriate executable in the same bundle.

Cheers

A: 

I think I understand you. You want to share a plist between two executables. Just refer to the same plist in each case: tutorial for single executable plist.

mcandre
Don't think so. What the OP wants is to have two independent executables to live inside the same .app folder, with two unrelated plist information.
Stefano Borini
I do not want to share one plist for two executables. What I want is to embed one app with its own plist and resources in the same bundle with another app and then according to the provided parameters to start appropriate application which is going to use its own plist.CheersDejan
A: 

Don't know if it's possible. Honestly I doubt it because the plist information is also used to define the icon and so on, so you would confuse the Finder if this would be possible (which icon should it display?). However, I am not an expert in Bundles, at all.

I give you a workaround. Create a demultiplexing script that runs the proper executable according to your parameters, and then associate the script with the plist information.

Stefano Borini
+1  A: 

Not exactly, but you could achieve something similar.

You could have a master Application bundle, which figures out which version of the code to run, and then have multiple plug-in bundles (as resources of the application) which actually implement the different versions. Each plug-in bundle would have its own Info.plist / nib files / etc.

See the documentation for NSBundle for details of how to load bundles and run their code.

Nick Dowell