Latest version of WiX contains NAnt tasks

It was very interesting to see version 2.0.3719.0 of WiX, which was released January 19, 2006, contains NAnt tasks for the candle and light command line tools. This replaces the <exec> tasks you had to do before.

I didn't see any documentation for them, but they are easy to use. Here's a very simple example:

<target name="package" description="Create the installer package">
   
  <property name="wix.dir" value="${base.dir}\WiX" />
  <loadtasks assembly="${wix.dir}\Microsoft.Tools.WindowsInstallerXml.NAntTasks.dll" />

  <candle out="${nant.project.basedir}\" exedir="${wix.dir}">
    <sources>
      <include name="MyApp.wxs" />
    </sources>
  </candle>

  <light out="MyApp.msi" exedir="${wix.dir}"
    locfile="${wix.dir}\lib\WixUI_en-us.wxl" rebuild="true">
    <sources>
      <include name="MyApp.wixobj" />
      <include name="${wix.dir}\ca\wixca.wixlib" />
      <include name="${wix.dir}\lib\wixui_featuretree.wixlib"/>
    </sources>
  </light>

</target>

The documentation also mentions that there's a way to customize the WixUI, which earlier I was wondering how to do but sadly the referenced samples seem to have been left out of the distribution. If anyone knows where to find these files mentioned in the Wix chm file, let me know: CustomDialogSet.build, CustomDialogSet.wxs, CustomDlg.wxs, and TestCustom.wxs.

2 Comments

  • I'm glad you like the NAntTasks. They are still in their early stages and don't have all of the options that you can pass into candle, light, and lit. I will add them as people need them or I may just add the rest all at once. Basically, I just fleshed them out enough to get our WiX builds working for the Votive.msi and ClickThrough.msi.

  • I am really happy to hear about Wix has NAnt task, I really love both tools, it is really cool to use direct NAnt tasks instead of exec task

Comments have been disabled for this content.