Sunday, October 16, 2005

Installers (a plug for WiX)

I know, it has been very quiet here in the past months. Consider it a symptom of a lot of work in progress. The last week of that work I spent a considerable amount of time debugging and (re-)building our installation package.

We started of a while ago with an evaluation version of Installshield. That seemed to do the trick. However, success has an expiry date. An early one of course when you depend on an evaluation version. Reluctant to spend a lot of money on a tool with little reputation of user-friendliness and that does not seem to fit well into our development and build processes, I started looking at the alternatives.

First try was a look at the NAnt MSI task, as we are using NAnt already to build C++ and VB6 code. Google didn't highlight much usage of this task and its documentation is pretty terse as well, so that inspired insufficient confidence to pursue this option any further.

While searching for info on the MSI task a post from Loren Halvorson mentioned WiX (Windows Installer XML), a toolkit that was open-sourced by Microsoft just over a year ago. Together with the reminiscence of a positive post from Ramon Smits a few months ago, this was enough incentive to give it a further look.

The WiX documentation is not completely there yet, but was certainly enough to get started. Using Gabor Deak Jahn's WiX tutorial, I built and debugged a MSI file that deploys 50+ COM components, a number of system dll's and an ODBC data source within a couple of days. Along the way I learnt more about the Microsoft Installer and its rules and weaknesses, than I would have done using higher level tools such as InstallShield and Wise. I consider that a good thing. Smooth deployment (and upgrade/patching) is too important too leave to chance and there are plenty of pitfalls on the way.

I also like the philosophy behind WiX to make deployment authoring a development task. The deployment definition is captured in a (XML) text format that can be updated as soon as components are added or removed by the responsible developer (me). Changes in the deployment script are easily traced using standard version control tools. Two command line tools transform the installation script into the desired MSI file, which was very easy to integrate into our build scripts using NAnt Exec tasks. We are now at a point that we can build from source code to MSI in one go. I already look forward to the day that we can automatically run the installer in one or more clean environments for automated testing!

Finally, WiX seems a pretty safe bet for the future: if WiX is good enough to build MS Office (and a number of other MS products), it certainly should be good enough for us. Active use within Microsoft is a reasonable warranty that the toolkit will remain up-to-date. And the growing open-source community around it is likely to shave off any rough edges that still exist.

1 Comments:

Blogger Mike Russell said...

thanks for providing context re WIX> I'd read several things about it, and even downloaded it, but did not know it came from MS!

I've been looking around for something that supports installing an ODBC data source, and it looks like WIX is the way to go.

Mon Jul 27, 06:35:00 am BST  

Post a Comment

<< Home