close
The Wayback Machine - https://web.archive.org/web/20071106063658/http://www.gamedev.net:80/reference/programming/features/linuxprogramming3/
Image






ImageImage
Upcoming Events


ImageImage
Quick Stats
9113 people currently visiting GDNet.
2086 articles in the reference section.

Help us fight cancer!
Join SETI Team GDNet!



Link to us

  search:   

Linux Game Development Part 3
Installers


Contents
Image  Installer Options
Image  Additional Hints
Image  Misc Installation Topics

Image  Printable version
Image  Discuss this article

The Series
Image  Part 1: Introduction
Image  Part 2: Distributable Binaries
Image  Part 3: Installers
Image  Part 4: Testing
Image  Part 5: Marketing and Distribution

Welcome back!

So far, we�ve learned about the tools available for Linux development and how to build a binary executable that will run on any distribution. Now we need an installer for our game.

The need for a distribution-independent installer on Linux is important. Last time, I discussed why I believe you should not use a distribution-specific package manager, but it is worth repeating here. Essentially, you would have to provide a distribution-dependent package like rpm or deb to deliver your game, and allow the distribution�s package manager to resolve the library dependencies for you. While this sounds good in theory, in practice this can be a nightmare for both the developer and the end user. From the end user�s standpoint, it can be a very frustrating experience trying to find and install all of the dependent packages that the package manager says it needs � some package managers do this for you automatically, but some don�t. And when it doesn�t work, some users (particularly those new to Linux) will not know how to solve this problem. This is not the first impression you want a potential customer to have with your game.

From the developer standpoint, you would have to provide not only a package for every distribution that you want to support but also a package for every version of that distribution you want to support. New versions can be released several times a year. Plus there are so many distributions (and every one is different) that you can�t possibly support them all in this manner. It would be a full-time job. And if you choose to support only a handful of the more popular distributions, you will effectively shut out many potential customers who use other distributions. So delivering your game with a distribution-specific package manager is not an ideal commercial solution (unless you open your source code and let volunteers do the work for you).

But there are a growing number of distribution-independent installers to choose from. Here is the current set of options (as of mid-2007):

Loki Setup

Loki Setup is a free installer program built primarily for games, and it runs on just about any UNIX-like platform. I�ve never used it, but I�ve been told it works fairly well for what it does, though it does require some fiddling to get it working. In the past, it has been the installer of choice for games on Linux. The problem is that it is rather outdated, and nobody is maintaining it anymore.

For example, one of the issues with Loki Setup is the way it installs menu entries. When Loki original made Loki Setup, every Linux distribution had its own menu system. Loki Setup would put the menu entries in several places and then do some tweaking based on the specific desktop environment that was present. Obviously, this meant that Loki Setup would only work with a limited set of desktop environments, and users with less common environments would not have any menu entries. Nowadays, this method is obsolete because more and more distributions are becoming LSB-compliant. LSB stands for the Linux Standard Base, which defines a set of specifications for interoperability between distributions. The specifications dictate how and where menu entries should be installed on a compliant system. These specifications did not exist when Loki Setup was originally written, so on many LSB-compliant distributions it no longer works right.

Loki Setup could be fixed, of course, if someone would start maintaining it. But nobody has stepped forward to do so, which makes it hard to recommend using Loki Setup as an installer anymore, despite some of the good features it had built into it.

MojoSetup (Son of Loki Setup)

Ryan Gordon and the folks at icculus.org investigated the possibility of upgrading Loki Setup, and decided instead that is was too outdated. So they began building a brand new installer from scratch to replace Loki Setup. The new installer is called MojoSetup.

While it looks promising, it is not yet ready for prime-time use (at least not at the time of this writing). The user interface is very rough, there are bugs, and not all of the planned features are available yet. But it may become a viable option in the future.

Illwinter Game Installer

Illwinter Game Design made its own installer, the Illwinter Game Installer. This installer is free, but it is pretty basic. It doesn�t provide many options; it just installs the game. It does add menu entries, but since the installer was last updated in 2004, I suspect it probably uses the same outdated method that Loki Setup uses.

Autopackage

Autopackage is designed to be a replacement for rpm, deb, and other distribution-specific package systems. Autopackage builds a binary package that will run on any distribution and will automatically resolve dependencies.

It looks great, but it has its own share of problems. First, it does not provide a way to display a README or EULA during install, nor does it provide any install options. Second, installing requires Internet access because the binary package files don�t actually contain the installer itself - they only contain a stub that downloads the installer if it�s not already on the system.

Zero Install

Like Autopackage, Zero Install was designed to be a replacement for rpm, deb, and other distribution-specific package systems.

It has some of the same problems Autopackage has, like the inability to display a README or EULA during install. The other big drawback with Zero Install is that it provides no mechanism for installing as root, which means each user on the system has to install his or her own copy of the game.

InstallJammer

Formerly known as InstallBase, InstallJammer is a free, open source, multi-platform installer that currently supports Windows and most versions of UNIX. It claims to be highly configurable, with support for multiple themes.

I know of two commercial games that use this installer: �Lunar Domination� by Valen Games, and �Runes of Avalon� by Anawiki. For a free installer, it does a pretty decent job. Both developers for these games told me they were quite satisfied with InstallJammer. I�m told there is excellent documentation for it, though it does require some tweaking to get it to work properly. Also it has a few bugs, like when you try to create a new directory to install the game in, you MUST press Enter when you�re done typing the directory name or it doesn�t actually create the directory. Hopefully these bugs will be fixed before long.

Bitrock InstallBuilder

If you want a professional installer for your commercial Linux applications, then Bitrock is the way to go. I used Bitrock as the installer for Dirk Dashing, and I�m very happy with it. I understand Garage Games also uses it. Bitrock is cross-platform, and it provides a nice, easy-to-use installer that looks the same on all platforms. This is a major benefit on Linux, especially for the growing number of Windows users who are migrating to Linux. The Bitrock installer provides a familiar install experience for them.

Bitrock is highly configurable, though most of the more advanced options are not currently available through the user interface. On the positive side, the installer project file is an XML file, and the file format is well documented. The Bitrock customer support staff is also very friendly, and when I had to tweak the XML, they answered all of my questions and even provided some examples. I tweaked the XML, for instance, to auto-generate our game�s startup script using the install path provided by the user.

The main downside of choosing Bitrock is the price, and I noticed they have raised the price since I originally purchased it. You can download a trial version of it for evaluation purposes, but if you decide to use it, you�ll have to pay for a commercial license. However, Bitrock is still much cheaper than our final option, which is�

InstallAnywhere

This is the top-of-the-line, professional multi-platform installer. It is powerful and has a lot of advanced features. It�s also insanely expensive. Plus, it is based on Java, so there is a lot of overhead associated with running it.



That�s about it for installers. There are some Java-based multi-platform installers for Java applications, such as JInstaller and install4j, but they probably don�t support C/C++ programs.

And there�s Klik, a non-installer that is actually a mechanism for downloading and running software without installing it. But Klik has some issues that make it undesirable for distributing commercial software. First, it is currently regarded as �usable alpha� quality (according to the Klik wiki), so I would be hesitant to trust it with my game distribution. Second, it is designed for use with live CD systems, for beta testing new versions of software without affecting your production software, and for other cases where installation is not desired or doesn�t make sense (also according to the Klik wiki � look under the FAQs). Third, users first have to install the Klik client itself (if they don�t already have it) before they can install your game � I personally don�t like to make potential customers jump through extra hoops to install a program. Fourth, Klik delivers applications as a single compressed .cmg file, which must be decompressed each time the program is run � for games (especially those with lots of assets), this can mean slow start-up times. And fifth, like Zero Install, Klik doesn�t appear to provide any mechanism for installing as root, which means each user on the system has to install his or her own copy of the game. For these reasons, I did not list Klik with the other installers because I do not consider it a viable option for distributing commercial games.


Image
Additional Hints