My WiX experience

Published 20 July 5 11:45 AM | Ramon Smits

Most people use the setup routines supplied with Visual Studio or something like Wise or Installshield to create their setup packages. My current project needed some setup routines and I needed this excuse for sometime to finally see that WiX is all about. Well one thing you don't get is an easy 1,2,3 click and go experience to create your MSI installers.
The stuff you get are basically some command line tools candle, light, dark and recently tallow. Candle is the compiler to create object files from xml input. Light is the linker that does the magic to create an installer or merge module. Dark can decompile an msi which comes in quite handy when you know that some installer of some program has cool functionality in ther setups and last but not least tallow which can create input xml based on the files on the file system. This is very handy in combination with automated builds.

They are currently busy with Votive which is a very interesting Visual Studio add-on that can create easy setups. One of Votive cool features is that acts like a preprocessor. It can replace placeholders in the WiX xml files. This way you can create templates to easily create setup's for small applications. However... it really needs the ability to have 'tallow like' functionality to automatically add all output files. Just as adding some merge modules within a nice gui would be a blessing. I would really like to see those features added in the future maybe I will add them myself when I can 'create' some time.

What do most installers have in common? Generally they have a Welcome screen, an EULA, a destination selection, a full, common or custom selection, progress indication and a result screen. Some applications have the ability to launch the application and/or show the read me when finished. These are quite common for normal desktop applications but when it comes to most applications I work on professionally we need extra functionality. Like to be able to install dependencies as the .net framework, setup a web project, windows services, a database, com+ and/or msmq. Believe it or not but this can all be done with WiX! I got most information to get these thing done is from the excellent WiX Tutorial by Gábor DEÁK JAHN .

What really is cool is the way tallow works. Tallow is a tool to create a wxs xml input file for candle. It scans a directory and imports all files. It is able to add/remove/configure the full range of entities in the COM+
catalog which is still very important because loads of dependencies are still com based and application services are installed in com+. So tallow is my friend as trees are for Bob Ross. The best thing about tallow is that you can merge it into your build engine with for example nAnt. You can create a nAnt task that launches tallow and then let candle compile that output together with a standard template for that specific project type. Then we only need to links all that stuff together and voila there is the msi.

The WiX toolset is very flexible and most things can be customized to suit your needs. One thing I have already learned it that you need to create some good basis WiX templates and use those to create most installer types. I will definitely recommend to use WiX especially within automated build environments.

Filed under:

Comments

# bestcomy said on September 9, 2005 1:37 AM:

it's a really cool stuff.
do you have a web setup template based on WIX