Skip to content

Instantly share code, notes, and snippets.

Created October 7, 2013 15:26
Show Gist options
  • Save BartDM/6869801 to your computer and use it in GitHub Desktop.
Save BartDM/6869801 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="3.5" DefaultTargets="Build"
<!-- Defining group of temporary files which is the content of the web site. -->
<WebSiteContent Include="$(WebSiteContentCode)" />
<!-- The list of WIX input files -->
<WixCode Include="Product.wxs" />
<WixCode Include="$(WebSiteContentCode)" />
<!-- The list of WIX after candle files -->
<WixObject Include="Product.wixobj" />
<WixObject Include="$(WebSiteContentObject)" />
<!-- Define default target with name 'Build' -->
<Target Name="Build">
<!-- Compile whole solution in release mode -->
Properties="Configuration=Release" />
<Target Name="PublishWebsite">
<!-- Remove complete publish folder in order to
be sure that evrything will be newly compiled -->
<Message Text="Removing publish directory: $(SetupF)"/>
<RemoveDir Directories="$(SetupF)" ContinueOnError="false" />
<Message Text="Start to publish website" Importance="high" />
$(Publish);Configuration=Release" />
<!-- Define creating installer in another target -->
<Target Name="Harvest">
<!-- Harvest all content of published result -->
Command='$(WixPath)heat dir $(Publish) -dr INSTALLFOLDER -ke -srd -cg MyWebWebComponents -var var.publishDir -gg -out $(WebSiteContentCode)'
WorkingDirectory="." />
<Target Name="WIX">
<!-- At last create an installer -->
<Message Text="TEST: @(WixCode)"/>
Command='"$(WixPath)candle" -dpublishDir=$(Publish) -dMyWebResourceDir=. @(WixCode, &apos; &apos;)'
WorkingDirectory="." />
Command='"$(WixPath)light" -out $(MsiOut) @(WixObject, &apos; &apos;)'
WorkingDirectory="." />
<!-- A message at the end -->
<Message Text="Install package has been created." />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment