Saturday, February 28, 2009

wix now on the resume

Due to a project at work, I've been forced to spend a considerable amount of time digging through the WiX documentation. I highly recommend that you use wixedit to build up the XML, because it's not very intuitive.

Some quick notes on what I found:

* you can specify multiple "media" tags to build up different cabs. The "DiskPrompt" value is what WiX uses to figure out if they should go on the same disk or if the installer should ask the user to drop in another disk.
* you can specify the 's id as the DiskId attribute for the Component in the Files section. This will let you split up multiple files across install media without a hassle
* filenames get converted to URL encoded strings if you use the Folder Import feature, and WiX will look for the URL encoded name on the filesystem (so, like "c:\foo%20bar.txt" instead of "c:\foo bar"), and this will be failurificious. Either remove spaces, or bundle it all up in a cab/zip/whatever ahead of time
* you can wedge in binaries and run them in CustomActions section, then pick which stage of the installer they should be run.
* everything you plan to put on the hard drive needs a reference in the features section... boo. This means you need to import files, and then create refs for each of them.

Not too bad, but it would have been nice to have some more examples out there.

Other tools for win devs that might be interesting/helpful:

MS's cabsdk program includes CABARC.EXE that lets you create/extract/look inside cab files

ilmerge let's you combine multiple assemblies into one (useful for include libs your software might need when dealing with people who can't handle heading to sourceforge... be sure to check the license, though)

7Zip is a free zip utility.. can create self extracting zip files (but they annoyingly have a popup prompt for where to extract to that I can't seem to figure out how to disable)

No comments: