Execute a pre-starting script first, when the App bundle is launched, then the main executable
Execute a pre-starting script first, when the App bundle is launched, then the main executable
- Subject: Execute a pre-starting script first, when the App bundle is launched, then the main executable
- From: eveningnick eveningnick <email@hidden>
- Date: Thu, 6 Jan 2011 18:12:25 +0200
Hi
I have an application, which is located in a bundle (like any other
cocoa app) and can be installed in a mac-way: by dragging its bundle
to /Applications (or elsewhere).
I have been asked to create an "addition" to this application, that
adds some functionality, but needs to be installed using an installer
(or a script, that requires superuser) - in short, it can't be simply
dragged.
I came up with the following, which seems reasonable to me:
i will copy the pkg installer of my Addin-application into the Main
application's bundle. The user will be able to drag the bundle to
/Applications as usual, but after he doubleclicks this application,
instead of a binary executable from
/Applications/MyMainApp.app/Contents/MacOS/MyMainApp, a script will be
launched, which will first detect if my Addin-application has been
already installed (and if not, launches an installer), or just
launches the executable from
/Applications/MyMainApp.app/Contents/MacOS/MyMainApp.
This approach would require very few changes from the MyMainApp
developers, which is my goal.
I am wondering, what changes have i to make to the bundle's plist - i
want my script to be launched first, but the Main application should
find its definitions of Principal Class, Main nib file, etc.
How can it be done?
Thanks!
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden