Over the past couple of weeks I decided it was high time to switch to WiX for the EiffelEnvision installation package. A .NET code generation issue has given me time to break away from developing EiffelEnvision to get to grips with the WiX tool set.
I was amazed how easy it was to start to develop installer packages using XML. It seems it was just a horrible nightmare using Wise and lesser evil InstallShield to build our installation packages. The days of rebuilding merge module of packages from scratch because the builder had in someway corrupted it's project file. and was building bad MSIs. are gone, somewhat. I rarely need to even enter the MSI database tables and do things by hand. Now the crux - MSI sucks!
I've had to use a combination of Votive and SharpDevelop for developing/compiling and designing the user interface respectively. SharpDevelop helped a lot to see what the UI would look like but it has a long way to come before it can really be used. It's still supporting 2.0 only so it generates deprecated elements and attributes and it uses a similar designer to the Windows Forms designers in Visual Studio .NET, which makes you believe you have a lot more to play with. In addition some UI elements are not size correctly because of the corresponding Windows Forms control defaults. Finally it does not order my user interface elements correctly so my tab order is destroyed and so it my z-ordering. However, it does give me instance feedback on what my dialogs look like. Votive on the other hand is much better in the 3.0 release of Wix than the 2.0 but it does not have a user interface designer. It's in Visual Studio .NET 2005 so I have element and attribute completion thanks to the schema and it's project system is based on MsBuild, which allows me to customize the build process of the projects.
I wanted to do a lot more with the installer, such as background installation and using modern looking user interfaces but as I said MSI sucks! The API calls just are not there for interacting with the user interface. Even through a custom WEL-based framework used to hack into the user interface I could not pull it off without too many risk factors. I've also had to drop some of the graphics from dialogs because the MSI controls are not customizable enough. No z-ordering puts a folder browsing control (used in selecting folders) behind a resident bitmap when refreshing. In addition only text labels can be transparent so the bitmaps used in the new installers could not be effectively used because of the big gray boxes generated for other control backgrounds.
But here I am, on the edge of completion to the installers. Hopefully you will be able to take a look at the new install this weekend.
If you are interested, here are the list of things that went wrong:
- Started developing with WiX 2.0
- Developed a tool, called hallow, like tallow and mallow but with more features, some including regular expression inclusion of files and directories
- Found a problem with FragmentRef so I upgraded to WiX 3.0
- Most of the stuff I developed in hallow would not work anymore because of deprecations of 2.0 elements/attributes
- Adapted hallow and authored wsx/wxi files to work for 3.0
- Started developing UI in SharpDevelop only to discover they package WiX themselves and it's 2.0
- Make changes to UI generated code and hack SharpDevelop's installation to use 3.0
- Found out that when compiled and run the tab a z-ordering is messed up when using SharpDevelop's generated XML
- Light.exe from 3.0 stops working and just throws and exception. I have to build the package from sourceforge, but it does not build out of the box
- Custom builds of select 3.0 tools and assemblies cause problems that require me to build more than the essentials. It seems the version numbers and public key tokens do not match up with the release binaries
- Start using Votive for builds and switch to developing in Votive
- Start developing a WEL framework for interacting with MSI user interface elements but soon discover the only way to really do this is to hack with no real guarantees so end-user functionality
- Make a desperate final attempt to try and user WEL/Win32 folder browser dialogs from the installer but MSI does not provide a way to manipulate user interface controls
- Scraped the WEL framework and opted to use just what MSI will give me
- Discover big problems with MSIs z-ordering that hide controls
- Redesigned a number of dialogs to look like pop-up dialogs and removed bitmaps because of z-ordering or non-transparent controls