So now that you have a code ready, next question is how you are going to ship it as a product to end users. The easiest and user friendly solution, is to build the Installer for your product!
Building an installer has many advantages, like:
- User don't have to be worried about the installation steps (the user has to just follow laymen's instructions to get ready to use the product).
- It eliminates human errors.
- Makes the product easy to install and use.
So now that we have idea of WHY we need Installers, let see what packages offer us to build installers for mac. Packages is a tool developed for mac.
- Packages can be either flat or bundle. As per my observations, flat packages cannot be inspected to view the contents of the package. But there are ways to extract the contents for viewing purpose using pkgutil utility. In case of Bundle packages, user can view the contents of the bundle directly. Its like a directory.
- Packages have presentation editor which allows you to design the screen that your installer needs to show. These are plain html mark-up files which you can edit as per your needs.
- Since you may have more than on components that you need to install on users machine, _packages_ have the concept of bundle/package where each package is the component. You can add as many packages as you want and even control which packages the user needs to see and check mark while installation and which ones should be mandatorily installed.
- Each package that you add in the installer can have payload and pre/post install scripts.
- Payload is the actual component and you can specify where exactly in users machine you need to copy that component. Pre install script is the script that runs before installing the component. So this script can be leveraged to check the compatibility or some pre settings that you need to do. Post install scripts run after the package is installed.
- Also there is global level pre script that allows is run even before proceeding with the Introduction/Read me screen of the installer.
- It also provides feature to check for requirements such as processor, RAM, etc on users machine before installation.
- Packages provide the facility to add new screens to the installer in the form of Installer plugins. Installer plugins can be developed in the xcode. I personally used objective C to develop a Registration panel plugin that allows user to add license key and verify with the backend before proceeding with the installation.
Comments
Post a Comment