Saturday 29 September 2007

WiX

It's been a long time since my last post, and if I've any excuse it's being busy with several of my projects (among other things), about which I hope to make some blog posts soon, but for the moment I have a bit of promoting to do for WiX. If you haven't come across it before, it stands for Windows Installer XML and is a toolset for creating Windows Installer packages (probably best known to you in the context of MSI setups) from XML source. It's an official Microsoft product but it's hosted on SourceForge, so it's open source and has dedicated developer base. In the past I've experimented with Inno Setup before and I know many developers use this tool or other popular ones like Nullsoft to create their setup packages. Despite their advantages of being well supported and simple to use programs to create installers, I've found WiX has a lot to offer. Here's a few of the reasons I've switched over:
  • WiX takes a declarative approach to installing packages on a system, rather than the traditional imperative approach taken by most installer systems on Windows. This basically means that instead of telling the system what to do in a step-by-step fashion, it tells it what state the system should end up in after installation: this includes files, shortcuts, registry entries, and all the other possible tasks you might want your installer to perform. The sorts of problems like unused files and shortcuts remaining on the user's system become virtually non-existent when taking this approach. As soon as you start learning WiX, you'll also soon see why XML is the perfect language for this. Admittedly, it is a slight downside that you have to write your installer source by hand, but a huge advantage is its powerful integrated build support. (I'm just using Powershell scripts to build the installer, but as a friend suggested you could take it the whole way and integrate it with the MSBuild XML files if you're using Visual Studio). Even so, the XML format is surprisingly simple and there are detailed schemas to help write the code accurately. If you still prefer to develop installers by GUI (although I'd probably recommend against it as it may limit you in some ways and hide the true versatility of WiX), there's a few GUI interfaces currently being developed.
  • Developers of the installer can independently write their own WXS source files, and then compile and link them without any moving around of XML code.
  • Great support for localisation/custom languages, as far as I can see - though I must admit I've only read sections about it and not actually tested it out yet.
  • I was amazed to read that the entire installer for MS Office 2007 was created using WiX - there really shouldn't be any reason to doubt its power!
  • If you need more convincing, try reading the tutorial (it assumes you're a complete beginner, and probably explains some of the points here better than me) or even glancing at the manual.

This is just a brief outline of what WiX can do. I strongly recommend you head over to the site, download the toolset (v2.0 is probably best for now, considering it's the most stable and the tutorial is written specifically for it). You can find the tutorial here, but also as a link on the page along with the official documentation. I'm still a total beginner at WiX myself - reading the tutorial, experimenting with a few of its more simple features, and looking at some interesting blog posts about it - but I can already undoubtedly say it's a good move away from the typical unreliable setup.exe installers that have plagued Windows users in the past.

4 comments:

Anonymous said...

Hi Alex,

Thank you for this blog post! Another reason to switch - there is a WiX toolset integration add-in for Visual Studio named Votive (see details: wix.sourceforge.net/votive.html). It is cool to have WiX based project within your solution!

Actually, quite soon this reason will not be a reason for Inno Setup projects because our team is close to releasing Lexpa - Inno Setup integration for Visual Studio (see details: www.lexpa.com).

Hope that information might be useful for you or those of your readers who do not want to use MSI-based installers.

Sincerely,
Lexpa Team!

Noldorin said...

Unfortunately Votive is only available if you have Visual Studio Standard or higher (not for those like me, with only the Express edition). However, I have found it fairly easy to develop with just the normal syntax editor support and XML schema. Perhaps the only annoying thing of writing the installer this way is having to specify short (max 8 chars) filenames manually. I'm still trying to work out why it's necessary when Windows Installer is only supported on file systems that support long file names (as the tutorial states). Still, this is going to be automated in Wix 3.0, so that's something to look forward to. Anyway your Inno Setup integration tool looks interesting - it will certainly assist those developers who need to maintain big Inno scripts, although I'm curious why you are targeting Inno rather than Windows Installer/WiX...

Todaydownload.com said...

This valuable editorial was very useful to read, I savored it completely.
I'm about now to email it to my colleagues to permit them examine this too.
Thank you really
Inno Setup

Anonymous said...

[url=http://www.23planet.com]online casino[/url], also known as understood casinos or Internet casinos, are online versions of commonplace ("buddy and mortar") casinos. Online casinos legalization gamblers to spirits and wager on casino games from start to slay off rub out the Internet.
Online casinos normally rib unashamed odds and payback percentages that are comparable to land-based casinos. Some online casinos necessitate on higher payback percentages in the mending of status be known buggy games, and some phylum renowned payout apportionment audits on their websites. Assuming that the online casino is using an aptly programmed indefinitely amphitheatre troupe generator, details games like blackjack comprise an established congress edge. The payout part after these games are established erstwhile the rules of the game.
Differing online casinos lease or obtaining their software from companies like Microgaming, Realtime Gaming, Playtech, Supranational Alternate way Technology and CryptoLogic Inc.