Sunday, September 13, 2009

Creating packages and installing

There are many great ways to easily create packages.  The 2 that I mainly use are InstallEase and Iceberg.

InstallEase is a snapshot package creator that allows you to snapshot your machine.  You can then install, run, modify and configure your application.  Once finished you run InstallEase again and take a second snapshot of your machine.  You are then presented with what has changed.

You can now make changes or add/remove items from this list and proceed to make a package.  You can also have InstallEase create a DMG with all the files in their folder heiarchy, create an uninstaller and create a project folder and file for Iceberg.  It also copies all the source files to source folder for the Iceberg project.

The uninstaller simply is a dummy package with a script that uninstalls the items installed with your package.

InstallEase can also create an "uninstaller" for any package you feed it.  This uninstaller will only delete files installed, and not undo changed made to your system by script or other installer plug-ins.

In Iceberg, you can now make more changes and do things like add/modify license agreements and add different scripts (prefight, postflight etc etc).

Package making is an art form in that you need to understand what goes where, what you need, and what you don't need.  You also need to dig a little deeper into the guts of what makes OSX do what it does.  Simple applications are easy, but repackaging applications like Adobe CS3 take many attempts and testing.

Always have a test machine with your current image on it to install.  This allows you to install and test your applications in the same environment you will be deploying to.

Also a little tip.  We keep our packages on a network volume and you can NOT install packages from the GUI installer if they are located on a network volume without dragging it down to your local HD first, or putting everything on a disk image.  The way around this is to mount your network volume, then open the terminal and type

sudo installer -package /path/to/package -target /

This will run the installer with admin priv's and install on the root of the HD.  It works directly off of a network volume and is quicker (in my opinion) than the GUI installer.