views:

1333

answers:

4

The Question

Newly initiated into WiX, I researched and found that v3 uses a tool (heat.exe) to "harvest" information into WiX fragments. I have managed to stumble about and find information on this tool, but none of it seems up to date for the latest heat.exe. Either i am looking in the wrong location, or this is thinly documented. So my question is:

What is the best way to autogenerate a WiX fragment (likely using heat.exe) for a complex folder structure that contains media files:

  • Of varying types (ico/png/xaml/etc)
  • That may change regularly (names/locations/adds/removes)
  • That are classified as "Content" and included in a .csproj

...such that they can be built into an installer via WiX and would withstand upgrades and patches with decorum?

Background Information

  1. I found heat.exe, which seems to solve the autogenerate WiX fragment requirement
  2. In getting the "dir" harvester working, I noticed the "project" harvester (commandline help)
  3. Media is already in C# project file, and so noted that "-pog:Content" might do very well
  4. Cursory search found out of date documentation that didn't mention "project" harvester
  5. Realized entire project installer could probably done with "project" harvester, but was unsure how well this was supported, and what the pitfalls were.
  6. Saw the generation of "PUT-GUID-HERE" and realized that autogeneration of guids would likely have upgrade/patch implications.
  7. Realized that there must be people who use these tools for similar purposes and could probably point me in the right direction.

Update

It was (fairly) pointed out that v3 is not yet "done" (thus the scarceness of documentation and tutorials). The sense that I get now is that it is non-trivial to automate this in my build scripts, and the tools are growing right now to ease this.

A: 

Hi,

Thanks for the background, I wasn't aware that they were working on a new version of Wix. According to the project page, it isn't RTM yet, so that may explain the problems you're having. I hope to hear from the WIX developers in one of the replies.

I can't help you use the under-development heat.exe features. However, I have been in your situation and my solution was to create a tool that took directory and file information as input and generated valid wix project files as output. A .vsproj file is just an XML file, and you can use XSL, C#'s LINQ, PowerShell, or a number of other tools to do the work. I personally have used (pre-LINQ) C#/XMLDOM to parse VS project files for this purpose.

Good Luck,

Dave

David Gladfelter
A: 

For documentation, check out the help file that is installed with WiX - WiX.chm provides the most up to date information (along with the command line -help option).

sascha
The only place I could find mention of heat.exe was in Gábor DEÁK JAHN's tutorial, and it was very brief and not up to date with regard to parameters and implications. The -help option was really my only clue that more advanced approaches were available in v3.
ee
Look in the "DOC" directory of where you installed WiX. Along with the wix-users mailing list and you'll be on your way :)
sascha
I started with the chm in the doc directory. The only mention was: "Heat"-"Generates WiX authoring from various input formats". Was there something else that you were referring to? My knowledge of the command line parameters came from the -help command (as mentioned in the background section)
ee
+1  A: 

For the upgrade implications of auto-generated setups, read this. The take-home message:

Windows Installer doesn’t let you remove components in a minor upgrade

It is hard to guarantee that components continue to exist if you generate your setup automatically. Therefore you have to chose between auto-generation of components and the ability to do minor upgrades.

If you have some auto-generated components, then just stick to major upgrades. You can use this sample by Rob as an example.

Wim Coenen
Thanks, that did formalize the nagging doubts about autogeneration.
ee
+1  A: 

In my experience John Robbins' Paraffin solves alot of the issues with tallow.exe (heat.exe in v3). I'm not sure if Paraffin plays nicely with v3, but it might be worth checking out.

FYI, I've used Paraffin in a build process and it allowed me to remove the previous 2-3 step cleanup process that involved a powershell script.

Richard Szalay
I dug a bit, and Paraffin does now support v3. http://www.wintellect.com/CS/blogs/jrobbins/archive/2008/12/22/paraffin-3-0-now-with-full-wix-3-0-support.aspx This looks to be a potentially useful approach as it is capable of "remembering" some of the state of the autogeneration.
ee
I would have commented the new link before, but I wasn't sure how links in comments were supported...Looks like a URL is recognized. I guess it supports the same wiki syntax as an answer/question?
ee