Un-install script for application

Discussion in 'Mac Programming' started by satyam90, Dec 5, 2007.

  1. satyam90 macrumors regular

    satyam90

    Joined:
    Jul 30, 2007
    Location:
    Bangalore, India
    #1
    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?
     
  2. HiRez macrumors 603

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #2
    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.
     
  3. satyam90 thread starter macrumors regular

    satyam90

    Joined:
    Jul 30, 2007
    Location:
    Bangalore, India
    #3
    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.........
     
  4. lancestraz macrumors 6502a

    lancestraz

    Joined:
    Nov 27, 2005
    Location:
    RI
    #4
    If your application is self contained why do you need to package it?
     
  5. mcjohn87 macrumors newbie

    Joined:
    Aug 10, 2009

Share This Page