Upcoming Events
Unite 2010
11/10 - 11/12 @ Montréal, Canada

GDC China
12/5 - 12/7 @ Shanghai, China

Asia Game Show 2010
12/24 - 12/27  

GDC 2011
2/28 - 3/4 @ San Francisco, CA

More events...
Quick Stats
105 people currently visiting GDNet.
2406 articles in the reference section.

Help us fight cancer!
Join SETI Team GDNet!
Link to us Events 4 Gamers
Intel sponsors gamedev.net search:

Introduction

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
Due to the large number of submissions we are expecting this year, we are requiring that all games (for both the IGF Competition and IGF Student Showcase) include an install/uninstall feature."

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?

Introducing NSIS

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.

NSIS shares many of the same properties as commercial installers. This includes access to the Windows registry, an install and uninstall mechanism and extension of its functionality through plug-in DLLs. Rather than operating through a GUI oriented application (such as in InstallShield or Wise), all work is done through a scripting language. If you know a language such as C/C++ or scripting language like PHP and/or JavaScript you shouldn't have trouble picking up the syntax.

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,

http://nsis.sourceforge.net/archive/

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.


Fig 1. Screenshot of a NSIS installation package


Fig 2. Screenshot of an InstallShield package

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.

NSIS WinZip WinRAR
31.8 MB 32.1 MB 31.2 MB
Fig 3. Comparing file sizes using NSIS, WinZip, and WinRAR

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.

  NSIS InstallShield Wise WinZip WinRAR
Open source Yes No No No No
Cost Free Varies per package and features, approx $350 - $2400 Varies per package, starting at $450 Starting at $29 Starting at $29
Custom DLL plug-ins Yes Yes Yes No No
User community Yes, through discussion forums Yes, through discussion forums Yes, through newsgroups No No
Installer & uninstaller Yes Yes Yes N/A N/A
Multi-language support Yes Yes Yes No No
Standalone package after creation Yes Yes Yes Yes, extra charge for this functionality Yes
Customizable user interface Yes Yes Yes N/A N/A
Multi-platform support Windows 95, 98, ME, NT4, 2000, XP Windows 95, 98, ME, NT4, 2000, XP, Mac OS X, OS/400, Windows, AIX, Solaris, Linux, HP-UX, or any other flavor of UNIX Windows 95, 98, ME, NT, 2000, XP Windows 95, 98, ME, NT, 2000, XP

There are applications that will allow you to unzip WinZip files on Unix platforms

Windows 95, 98, ME, NT, 2000, XP

There are applications that will allow you to unzip WinRAR files on Unix platforms

IDE (Integrated Development Environment) Via user community tools and NSIS archive Yes Yes N/A N/A

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.

NSIS

Pros

  • Cost
  • It's open source
  • Upgrades are being made constantly to improve functionality, sometimes on a day by day basis
  • There are very strong ties between the NSIS developers and the user community. A feature will sometimes get requested and then end up in the latest distribution the next day.
  • One important difference between NSIS and other installers is the size of the installer overhead. While others installer add 200 KB or even several megabytes to your data, a full featured NSIS installer has a size of only 34 KB.
  • Cost

Cons

  • Changes that are made sometimes nullify previous scripts. You will have to occasionally modify them to comply with new functionality.
  • Everything needs to be done in the NSIS scripting language (but there are frontends available created by the user community)
  • Limits platform to Windows

InstallShield

Pros

  • Well known and have a good reputation
  • Multi platform solutions are available
  • Built-in debugger

Cons

  • Cost

Wise

Pros

  • A lot of the functionality is done through an interface so there is less chance for user error
  • Built-in debugger

Cons

  • Cost
  • Limits platforms to Windows

WinZip & WinRAR

Pros

  • Pretty much everyone has the ability to unzip these files
  • If all you want to do is compress your files you don't need to worry about any kind of user interface need to design
  • Files are extractable on Unix platforms

Cons

  • Not a complete installation package solution
  • Cost, this can be a con depending on how many licenses you need

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 rsegal@3dna.net

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)
Inno Setup - http://www.jrsoftware.org/isinfo.php (FREE)
INF Tool - http://www.inner-smile.com/dl_inf.htm (FREE)
Click Team Install Maker - http://www.clickteam.com (FREE)
Zip Genius - www.zipgenius.it (FREE)
InstallLib - http://sourceforge.net/projects/installlib/ (FREE)
Wise - http://www.wise.com
InstallShield - http://www.installshield.com
Ghost Installer - http://www.ginstall.com
WinZip - http://www.winzip.com
WinRAR - http://www.winrar.com





  Printable version
  Discuss this article