PDA

View Full Version : Un-install script for application




satyam90
Dec 6, 2007, 12:15 AM
I found in Mac that none of the applications have uninstall facility.
But I want to provide it in my application. Can I provide it? Does it make sense to have uninstall script for my application? By placing uninstall script in my application, will I be following Mac standards or not?



HiRez
Dec 6, 2007, 02:33 AM
I found in Mac that none of the applications have uninstall facility.
But I want to provide it in my application. Can I provide it? Does it make sense to have uninstall script for my application? By placing uninstall script in my application, will I be following Mac standards or not?Some Mac apps do have uninstallers. The reason most don't is that all the resource files they need (images, strings, UI layouts, misc data, etc.) are kept inside the application bundle itself (if you right-click or control-click on an application in the Finder and choose Show Package Contents you can see all the files). That makes an uninstaller unnecessary because all a user has to do is trash the application and everything goes with it (except the preferences, but those are usually very small files).

Applications which spread their files out more (such as in one of the Application Support directories) might use an uninstaller to make cleanup easier. Apple is not very good about this, as Final Cut Pro, for example, puts huge files all over your hard drive and does not provide an uninstaller. If your app does this, it should provide one. This can just be a simple standalone app, and AppleScript is actually a pretty good choice for creating an uninstaller.

satyam90
Dec 6, 2007, 06:23 AM
As said by HiRez, My application is not a big one occupying different places in HD. All the necessary libraries, images, strings etc are made into one bundle. But the thing is that I am making it as *.mpkg and then making as dmg file.
When installing the dmg, it will open a window showing my *.mpkg file. When I double click it, it is creating a dir in /Library/Receipts with my *.pkg file. So, how to supply a un-install script to remove the application as well as *.pkg file. I can write it in shell script. But how to provide along with my package as I have only one bundle of application.........

lancestraz
Dec 6, 2007, 10:02 AM
If your application is self contained why do you need to package it?

mcjohn87
Aug 10, 2009, 11:13 PM
thanks so much for useful info
script install (http://globolstaff.com/)