Eitherway, I try to keep my options and opinions as open as possible so occasionally I'll evaluate other tools. Recently I look at WiX to see how it's going.
Derek Cicerone once wrote in his blog:
"Heat has the capability, today, to capture IIS web sites. Simply run 'heat.exe
website "My WebSite Name" -out sourceFile.wxs' to harvest a web site and all its
files. You can then compile and link with the WixIIsExtension to create an
entire web site setup in minutes! "
Wow, such glowing optimistic comments. Ok, so let's give it a try: ( Website name changed to product the innocent )
C:\data> heat website MyWebSite -out sourceFile.wxsHmmmm, ok maybe I'm passing the website name wrong. Lets's see what it does with a site that I know doesn't exist:
Microsoft (R) Windows Installer XML Toolset Harvester version
3.0.2211.0Copyright (C) Microsoft Corporation 2006. All rights
reserved.
heat.exe : error HEAT0001 : Exception from HRESULT:
0x80005006.
Exception Type:
System.Runtime.InteropServices.COMException
Stack Trace: at
System.DirectoryServices.Interop.IAds.GetEx(String bstrName) at
System.DirectoryServices.PropertyValueCollection.PopulateList() at
System.DirectoryServices.PropertyValueCollection..ctor(DirectoryEntry entry,
String propertyName) at
System.DirectoryServices.PropertyCollection.get_Item(String
propertyName) at
Microsoft.Tools.WindowsInstallerXml.Extensions.IIsWebSiteHarvester.HarvestWebSite(DirectoryEntry
webSiteEntry) at
Microsoft.Tools.WindowsInstallerXml.Extensions.IIsWebSiteHarvester.HarvestWebSite(String
name) at
Microsoft.Tools.WindowsInstallerXml.Extensions.IIsWebSiteHarvester.Harvest(String
argument) at
Microsoft.Tools.WindowsInstallerXml.Harvester.Harvest(String
argument) at
Microsoft.Tools.WindowsInstallerXml.Tools.Heat.Run(String[] args)
Ok, that's different. So obviously the first time it did find my website. So what happens if you don't pass a web site name? Let's see......
C:\data> heat website foo -out sourceFile.wxs
Microsoft (R) Windows Installer XML Toolset Harvester version
3.0.2211.0Copyright (C) Microsoft Corporation 2006. All rights
reserved.
heat.exe : error HEAT5158 : The web site 'foo' could not be
found. Please check that the web site exists, and that it is spelled
correctly (please note, you must use the correct case).
Microsoft (R) Windows Installer XML Toolset Harvester versionWow, that's pretty. Don't even bother trying to catch the error and give the user something useful to work with. Just throw an exception and blog chunks. And the InstallShield haters say the quality of InstallShield is bad.
3.0.2211.0Copyright (C) Microsoft Corporation 2006. All rights
reserved.
heat.exe : error HEAT0001 : Value cannot be null.Parameter name:
argument
Exception Type: System.ArgumentNullException
Stack
Trace: at
Microsoft.Tools.WindowsInstallerXml.Harvester.Harvest(String
argument) at
Microsoft.Tools.WindowsInstallerXml.Tools.Heat.Run(String[] args)
Heat still obviously needs a lot of work around error handling. When you see announcements from the core WiX developers about a brand new tool, you should be very wary of the error handling. ClickThrough (another tool under massive development) has similar error handling issues.
ReplyDeleteHeat is in particularly rough shape because Derek (who did all the work on it) left Microsoft and chose not to continue development in the WiX community. If you're interested in helping making the tool handle error cases better that would be fantastic. Otherwise, we'll have to wait for a new owner to show up or for the rest of the tools to stabilize so I can get around to fixing the bugs.
In the very least, an opened bug plus with even just a link to this blog would be great... although this problem is pretty easy to find. :)