Distribution and or deployment (however you want to refer to it), is a key phase of any software development process. When all the development is said and done there has to be some way for the end user to install and run software. In this article I will review some of the options available to development teams, and the reasons for implementing an install package solution.
Why do we need a way to package our files together for distribution? The most obvious reason is it makes installation for our happy users MUCH easier. Think of a game like Half-Life and think of all the files that are required to make it run properly. All files involved need to exist in a specific directory on your machine. Having one of the files in the wrong spot could result in lost functionality, a program crash, etc.
Another reason is it saves the time having to download third party software on your own. Your program may require GLUT (Graphics Library Utility Toolkit for OpenGL), the latest version of DirectX or other necessary libraries. If the user doesn't already have these software libraries they may not know or have the desire to go to get it. They may also not want to go searching on the internet for them. Having these libraries packaged in your install program saves the user time and work.
Say you have a file that you need to go in the Windows system directory. Your application is going to be installed on Windows 98/ME/2000 and XP. This operating system list is fairly common for many applications today. The Windows system directory exists in a different location for each of these different operating systems. An install package solution gives developers the ability to perform this functionality quickly and efficiently.
Game developers in particular will be interested in the install package solution. Head over to the International Games Festival home page (http://ww.igf.com). I recently took a quote off their front page. It reads as follows,
"New Submission Requirement For 2004: Install/uninstall
So all you hopefuls who are submitting you're games, read on! Hopefully this article will help point you in the right direction deciding on the right install package solution to meet your needs.
What is available?
For many people packaging their files using Winzip, WinRAR or other popular compression software is sufficient. While this function definitely helps to download just one zip file over multiple files the user must have the appropriate decompression software to be able to open it. If we consider WinZip specifically, it's likely that many of you have it. It's been around for quite a few years and its distribution is quite high. However, there isn't a 100% guarantee that our users are going to have this software. An ideal solution would be to package all of our required files into one standalone executable.
WinRAR and Winzip do allow you to package a set of files in a standalone executable but it doesn't allow much customization. Additionally, there is a supplementary charge for the functionality to make these standalone executables. This functionality gives us a way to install our files but not to uninstall them. Other nice features to have as I mentioned earlier would be to have the ability to detect an operating system. Common compression software applications like WinZip do not give us this functionality.
There are solutions available giving us this customization ability. They allow both an install and uninstall feature, the ability to write registry keys, operating system detection, etc. These solutions include most notably InstallShield and Wise. They exist to make it easy for end user's to install applications. For open source developers or small companies the cost for an InstallShield license may be too costly. On the negative side, InstallShield and Wise give you the customizability but again there is the added cost of a license. On the positive side, InstallShield and Wise make use of a scripting language which gives the application more versatility.
An ideal solution would be to have one package which has customization, the ability to create a standalone executable, an install/uninstall feature, operating system detection, minimal cost, etc. The "ideal" list could go on for quite some time. But, is there such a magical package available?
One such packager/compiler on the internet which meets these "magical" criteria is NSIS. For those of you who haven't heard of NSIS before it stands for Nullsoft Superpimp Installation System, developed by the good folks at Nullsoft. If you've downloaded Winamp, you've used an NSIS installation package.
One of the great benefits of NSIS is its fantastic user community. There's a very good chance that when you post a question on the discussion forum you receive a response within one hour. Very often the reply is from the NSIS developers themselves. You can't ask for a much better response time than that! A number of tools have been created for working with NSIS so you don't have to worry about dealing with the syntax of the scripting language at all if that's not your "bag". They work very much like Install Shield or Wise would.
Another great feature of NSIS is the user supported archive. It contains plug-ins, script editors, useful functions developed by and for the NSIS community and a great deal more. The archive can be found here,
But, what about cost? NSIS has many of the features I've mentioned in this discussion for in an install package but it's got to cost a fortune for all that functionality. Quite fortunately, NSIS is open source and is free for both personal and commercial use.
Examples of some NSIS installations
Below I've included two screenshots. One is of an NSIS installation package I have developed working at 3DNA and the other is a screenshot from an NVIDIA driver InstallShield package. The install package I have developed includes many of the features I've mentioned at several points in this article. If you'd like to check out my handiwork it's a free download off of the 3DNA website (www.3dna.net). I would love to hear any comments you may have about it. My contact information can be found at the end of this article.
There's not much of a difference which is great. One of the nice features about NSIS is it allows you to customize your application to give it that professional look.
To give you an idea of the compression NSIS is able to achieve I've included a comparison for you to look over. It's a table of file sizes from a website I work on. There's a good mix of JPEG, GIF, HTML, and regular text files. Approximately 615 files were compressed in all.
Generally it's pretty even across the board. I didn't do an extensive test trying out compression on all different file types and settings but it gives you a pretty good idea of the results. Additionally, WinZip and WinRAR are not install package creators, so they do not have the additional overhead of a step by step install process that is pretty much the standard today. NSIS of course does have all the nice install wizard features and yet NSIS still stacks up quite easily against WinZip and WinRAR.
Below I have included a table comparing the packages I've discussed in this article.
All of the packages I have listed here contain many, many more features than I would care to compare. This is a short reference only.
What follows are some notable features about each of the packages I've discussed throughout this article.
Factors which tend to uniquely distinguish them from the rest of the group. I've tried to keep the list fairly short; this is not meant to be a feature list just a short summary of some of the more important pros and cons for each package.
WinZip & WinRAR
I've included links at the end of this article to other install package libraries. Some are free; some aren't which I have noted for each link. Take a look through some of the other installers and see if any of the others suit your needs. I've concentrated on NSIS the most because I've used it the most extensively. Being a developer myself I found NSIS very easy to pick up and was beginning to look into its more advanced capabilities after a week or two. If you're familiar with the basics of Win32 programming alot of the NSIS script functions will look familiar.
The other install packages available should not be ruled out. It's a case of selecting the right tool for your needs. NSIS is nice but you may not want to concentrate on your installer/uninstaller that much. Making your software easily distributable will make it easier for more people to install and enjoy it. Hopefully this article will help get you pointed in the right direction.
Questions or comments can be directed to me (Rob Segal) at email@example.com
Special thanks to Amir Szekely and Joost Verburg for their reviews and contributions of this article.
Install package websites
NSIS - http://nsis.sourceforge.net (FREE)