0

how do i use NAnt to build the msi file

thanks

saschabeaumont
  • 22,080
  • 4
  • 63
  • 85
nikky
  • 1,835
  • 3
  • 18
  • 19

2 Answers2

6

You can use the Nant tasks provided with WiX, see this blog post and search for "Nant" in the WiX help file (WiX.chm)

Simple example from the above blog post for your reference, my own actual .build file is over 500 lines long and is mostly associated tasks such as building bootstrappers, extracting sources, code signing, integration with Lingobit for localization, etc, etc, etc. Building the actual MSI is possibly the simplest part of the code :)

<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>
saschabeaumont
  • 22,080
  • 4
  • 63
  • 85
0

Uh, what? Are you trying to create an MSI? In that case you'd want to trigger the build tool, perhaps Wix. If you're trying to run an existing MSI, the executable to use is called "msiexec".

Promit
  • 3,497
  • 1
  • 20
  • 29