ISWIX, LLC View Christopher Painter's profile on LinkedIn profile for Christopher Painter at Stack Overflow, Q&A for professional and enthusiast programmers

June 13, 2008

Maybe I Should Roll My Own

I've been wondering, maybe I should just roll my own WiX designer.

Yes, I'm serious.


Sure, I'll wait for you to pick yourself up from the floor.


OK, seriously. Can it really be that hard? Let me share with you a screenshot of a program that yours truly (who happens to be a very, very junior .NET developer ) was able to throw together in just a few hours thanks to a few pointers from an experienced .NET developer that I work for:





So let's assume I'm not trying to write a full blown authoring tool. My requirements and needs are fairly straight forward. I use InstallShield in a product line development environment to consume merge modules to build multiple product configurations with various setup.exe requirements. The merge modules come from upstream builds and could easily be broken out further into WiX fragments. Therefore, much of the integration work could still be done in InstallShield while splitting out much of the remaining component authoring to WiX.


I currently have the infrastructure in place to bring all of this together as TFS/TeamBuild can just call Votive/WiX and InstallShield projects to build the fragments, merge modules and installer packages.


The problem I face is that Votive only comes with a simple text editor with basic IntelliSense support. I find it to be very clumsy to use and now I understand why. I read a few articles yesterday on External Domain Specific Languages in XML and one comment that really stuck with me was that XML can be an easy language to read by domain experts but much more difficult to author.


What if I could just have a simple designer without a lot of heavy abstraction to help me bring against the code?


Well, I've just realized that it really wouldn't be that hard to do. I'm sure the .NET developers reading this are laughing but remember, I write installers for a living, not applications. My skill sets and experiences are generally optimized for a different purpose. For those who aren't laughing, let me explain what I learned today.


WiX distributes an XSD schema ( and others for various extensions ) called WiX.xsd. You can run the XSD files through a utility called from Microsoft called XSD.EXE and get a class file that contain classes describing your schema. There are ways to bind these classes to a XML document that allow you to then import and export valid XML. You can also associate the classes to various WinForms controls to give you a visual representation of your document.


If a rank .NET amateur can do something this simple in a day, I can only imagine what a group of experts could do if only given the right user story and resources.

So now I have a decision to make, should I try to organize and take this any further? I read all over that there is demand for this type of tool, but I keep wishing that Microsoft, InstallAware or Acresso would just fill the void with a top quality and affordable tool.

WiXAware is a good start but it's based on WiX v2, is buggy as hell and is incorrect in certain areas. For example, WiXAware makes you define a feature before you can define a component when authoring a fragment. This is clearly incorrect and a simple exercise in reflection reveals that each element class has an Items property that has custom XmlElementAttributes describing the allowable child elements.

Perhaps Microsoft will wow the world with Rosario.

Either way the future is becoming very clear to me, if someone would just take the time to make it happen.

3 comments:

Anonymous said...

My WiX designer is Vim. ViEmu if I'm using VS.

Christopher Painter said...

Maybe you could put a presentation together to try to convince me that vi is better. After all, I did spend a number of years coding on unix systems using vi.

Neil Sleightholm said...

Have you seen WiXEdit http://wixedit.sourceforge.net/, it hasn't been touched in a while and but it might make a good starting point.