Re: Execute a pre-starting script first, when the App bundle is launched, then the main executable
Re: Execute a pre-starting script first, when the App bundle is launched, then the main executable
- Subject: Re: Execute a pre-starting script first, when the App bundle is launched, then the main executable
- From: Kyle Sluder <email@hidden>
- Date: Thu, 6 Jan 2011 09:15:28 -0800
On Thu, Jan 6, 2011 at 8:12 AM, eveningnick eveningnick
<email@hidden> wrote:
> 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.
You can't do this. The Info.plist needs to refer to the main app's
binary. Instead, put your checks into the main app's startup code.
-[<NSApplicationDelegate> applicationDidFinishLaunching:] would be a
good place.
This will require changes to the main app.
--Kyle Sluder
_______________________________________________
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