Installer: WiX (Windows Installer XML) Tutorial

http://wix.tramontana.co.hu/tutorial

WiX Tutorial

Introduction to the Windows Installer XML Toolset

The Windows Installer XML (WiX) is a toolset that builds Windows installation packages from XML source code.

The toolset provides both a command line environment that developers may either integrate into their oldstyle Makefile build processes or use the newer MSBuild technology from inside integrated development environments like Microsoft’s Visual Studio or SharpDevelop to build their MSI and MSM setup packages.

WiX is an open source project, originally developed by Microsoft

To summarize the features and advantages of the toolset:

  • declarative approach
  • unrestricted access to Windows Installer functionality
  • source code instead of GUI-based assembly of information
  • complete integration into application build processes
  • possible integration with application development
  • support for team development, both in-house and third-party
  • free, open source

Microsoft itself is switching to WiX with all its major software packages. Just as an example, the setup of Microsoft Office 2007 was developed entirely with WiX.

Example:

All these will be described in the source files fed to the WiX compiler. The toolset consists of several parts and we will use two of them to compile our installation packages. Assuming we have prepared a Sample.wxs file, the command

candle.exe Sample.wxs

will perform the first phase of the compilation, creating Sample.wixobj, a half-digested file (this one is still XML but its internal structure is irrelevant to us; think about it as an object file in usual compiler parlance). The second command

light.exe Sample.wixobj

will turn this intermediate representation into our final package, a Sample.msi file. Much like a compiler and a linker.

Also note that WiX is not an installation environment of its own. To put it simply, it is a comfortable, XML-style way to describe your installation requirements that gets translated into Windows Installer .msi databases by its compiler and linker. In this respect, WiX is a relatively thin wrapper around Windows Installer technology.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s