[wix-users] Is there way to dynamically set HeatDirectory's Directory with DefinedConstants?

Edwin Castro egcastr at gmail.com
Fri Nov 18 15:38:10 PST 2016


In your wixproj, define a property with the HarvestPath then define
the DefineConstants property using that property. Something like this:

<PropertyGroup>
  <HarvestPath>C:\Path\To\Harvest\With\Heat</HarvestPath
  <DefineConstants>HarvestPath=$(HarvestPath)</DefineConstants>
</PropertyGroup>

Later...

<HeatDirectory NoLogo="true" ToolPath="$(WixToolPath)" VerboseOutput="true"
AutogenerateGuids="true" GenerateGuidsNow="false" OutputFile="output.wxs"
SuppressFragments="true" Directory="$(HarvestPath)"
ComponentGroupName="coreComponentGroup" DirectoryRefId="INSTALLLOCATION"
PreprocessorVariable="var.HarvestPath" SuppressCom="true"
SuppressRootDirectory="true" SuppressRegistry="true" Condition="
'$(UpToDate)' != 'Equal' " />

--
Edwin G. Castro

On Fri, Nov 18, 2016 at 2:51 PM, Shintaro Takechi <devst119 at gmail.com> wrote:
> Hi,
>
> I know HeatDirectory requires Directory parameters, and I have been
> hardcoding the value in the wixproj file.
> However, since PreprocessorVariable already uses variable defined in the
> project property, I would like to re-use it.
>
> Basically following is the HeatDirectory I am trying to use.
>
> <HeatDirectory NoLogo="true" ToolPath="$(WixToolPath)" VerboseOutput="true"
> AutogenerateGuids="true" GenerateGuidsNow="false" OutputFile="output.wxs"
> SuppressFragments="true" Directory="var.HarvestPath"
> ComponentGroupName="coreComponentGroup" DirectoryRefId="INSTALLLOCATION"
> PreprocessorVariable="var.HarvestPath" SuppressCom="true"
> SuppressRootDirectory="true" SuppressRegistry="true" Condition="
> '$(UpToDate)' != 'Equal' " />
>
> However, this seems to not recognize Directory properly.
>
> Is there any good alternative? Or would I have to hardcode the Directory?
>
> Thank you.
>
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list