Re: Best approach to write an uninstaller for osx
Re: Best approach to write an uninstaller for osx
- Subject: Re: Best approach to write an uninstaller for osx
- From: Jens Alfke <email@hidden>
- Date: Sat, 21 Nov 2009 16:50:08 -0800
On Nov 21, 2009, at 12:21 AM, Parimal Das wrote:
> My app needs to install a firefox addon to work.
> This i am doing in a postinstall script in the packaged install, copying my xpi file to firefox designated place
I'd call that a legitimate case for an uninstaller :)
> Now sending my app to trash will not delete that xpi, and i need to do it from my app.
> So either this can be done when my app is moved to trash. But did not find any event for that.
No; your app's probably not even running at that point.
> Or there is a second app(uninstaller) which will delete my main app and my firefox addon and then delete itself.
Sure, you can do that. As I said, there's no particular trick for deleting the uninstaller. The filesystem won't stop you from deleting your own binary (or moving it to the trash.)
I've seen uninstallers in the form of AppleScripts. They're easy to package up in double-clickable form and they can easily tell the Finder to move things to the trash.
—Jens_______________________________________________
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