I am having problems figuring out the correct way to organize an application that uses other helper applications.
I am writing a cross-platform application that uses other applications to accomplish some tasks. At various points (depending on user input), application A (the primary application) may start up other applications (lets say B and C) to accomplish various tasks. Originally, applications B and C were built as command line applications (not bundles), and copied into the /Contents/MacOS/ directory when application A is built. However, when applications B and C are launched, a dock icon is automatically shown. These applications should be run without the user knowing that other apps are being opened.
After some searching, I found the LSUIElement plist item that can be used to prevent the dock icon from showing up. However, when building the command line applications, I wasn't able to figure out how to tell the applications to use the plist.
So I reconfigured applications B and C to be built as bundles, gave them each their own plist, and everything worked. However, applications B and C both use the same frameworks as application A. After compiling applications B and C as bundles, I had to give them their own copies of all of the frameworks, causing application A to triple in size (as the bundles for B and C are embedded in A).
So that's were I am now. A few questions:
- Is there a way for a command line application to use a plist (and not have any conflicts if there are multiple command line applications in the same directory, each with their own plist). Or is their another method to hide the dock icon that doesn't use plists?
- Is there a way to specify the location that an application looks for frameworks (ie, applications B and C could look in the Frameworks directory for application A).
- A more general question - what is the point of the Install Directory build setting? Currently, our frameworks are built with it set to @executable_path/../Frameworks (which I'm guessing is what allows the frameworks to be embedded in the application bundle). If a framework with that Installation Directory is copied to the /Library/Frameworks location on a users computer, would it still work? Is there a way to build a framework that works no matter where it's located (like a DLL on windows, for example).
Also, some constraints:
- This application is cross-platform, so I can't really change the structure of how it works (ie, applications B and C have to remain separate applications that can be launched and passed command line arguments; I can't use any Apple specific technologies).
- Installing our frameworks to the users computer would solve the issue I'm having now, but it would be much preferred to keep the frameworks in our primary application's bundle if at all possible.
If any one has any ideas, please let me know! I'm very new to developing using xcode (and on OS X in general), so it's very possible that I've missed something simple.
Thank you!
Kelly