Wix, Heat and Wxi File

I use heat.exe to generate a list of files, I need to replace File / @ Source = "SourceDir" so I pass the name -var and the name of the directory, but these variables are defined in my .wxi file How to include a .wxi file in a heat generated file wxs . since this file will be generated every time I make an assembly.

+3
source share
2 answers

Why replace SourceDir?

You can simply transfer additional base folders for highlighting using the switch -band for all SourceDir links, WiX will search in the base folders you specify. It's easy to move things between machines and update a parameter in your build system, rather than edit an include file.

+1

wix 3.7, HeatDirectory wixproj heat.exe, PreprocessorVariable SourceDir.

<Target Name="BeforeBuild">
<HeatDirectory Directory="..\distribution"
               PreprocessorVariable="myVar"  <--- your variable name
               OutputFile="HeatGeneratedFileList.wxs"
               ComponentGroupName="HeatGenerated"
               DirectoryRefId="INSTALLFOLDER"
               AutogenerateGuids="true"
               ToolPath="$(WixToolPath)"
               SuppressFragments="true"
               SuppressRegistry="true"/>
</Target>

:

http://wix.sourceforge.net/manual-wix3/msbuild_task_reference_heatdirectory.htm

WIX HeatDirectory - Variable

+1

Source: https://habr.com/ru/post/1720644/


All Articles