[wix-users] passing in multiple directories to Directory itemgroup to the HeatDirectory task

John Zajac jzajac2 at gmail.com
Sun Jan 31 09:34:03 PST 2021


whoops. + mailing list in case I find a solution that helps someone else
later.

%(DirectoryRefId) - yep that's what I was missing. However each batching of
the task is overwriting the generated wxs so I have only <DirectoryRef
Id="Third"> in my fragment.
Am I expected to set the ComponentGroupName to be unique for each batch?
For example: ComponentGroupName="Litera.BestAuthority.*%(DirectoryRefId)*
.Outputs"

And the other alternatives are to generate a separate wxs file for each
directory e.g.:  OutputFile="Litera.BestAuthority.g.wxs"
or I could start the build process with powershell and use the heat.exe
directly.

(And yes, I will likely be reaching out to firegiant very soon as we have a
goal of consolidating away from other vendors and it's getting easier and
easier to make the case for moving to be more of a wix shop )

On Sun, Jan 31, 2021 at 11:15 AM John Zajac <jzajac2 at gmail.com> wrote:

> %(DirectoryRefId) - yep that's what I was missing. However each batching
> of the task is overwriting the generated wxs so I have only <DirectoryRef
> Id="Third"> in my fragment.
> Am I expected to set the ComponentGroupName to be unique for each batch?
> For example: ComponentGroupName="Litera.BestAuthority.*%(DirectoryRefId)*
> .Outputs"
>
> And the other alternatives are to generate a separate wxs file for each
> directory e.g.:  OutputFile="Litera.BestAuthority.g.wxs"
> or I could start the build process with powershell and use the heat.exe
> directly.
>
> (And yes, I will likely be reaching out to firegiant very soon as we have
> a goal of consolidating away from other vendors and it's getting easier and
> easier to make the case for moving to be more of a wix shop )
>
>
> On Sun, Jan 31, 2021 at 10:08 AM Rob Mensching <rob at firegiant.com> wrote:
>
>> You're going to need to do Task batching because IIRC the HeatDirectory
>> won't expand the ItemGroup for you. I _think_ (without testing) this will
>> work better (notice the %(DirectoryRefId))
>>
>>   <HeatDirectory *Directory="@(DirectoryItem)"* Transforms="Filter.xslt"
>> PreprocessorVariable="var.HarvestPath"
>>   OutputFile="myapp.g.wxs" ComponentGroupName="myapp.g.Outputs"
>>   DirectoryRefId="%(DirectoryRefId)" AutogenerateGuids="true"
>> ToolPath="$(WixToolPath)"
>>   SuppressFragments="true" SuppressRegistry="true"
>> SuppressRootDirectory="true" />
>>
>>
>> If you want an even simpler solution (albeit commercial), we (FireGiant)
>> provide advanced harvesting technology that (IMHO) works way better:
>> https://www.firegiant.com/wix/wep-documentation/harvesting/harvestfolder/
>>
>>
>> ---
>> Short replies here. Complete answers here:
>> https://www.firegiant.com/services/
>>
>> -----Original Message-----
>> From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of
>> John Zajac via wix-users
>> Sent: Saturday, January 30, 2021 5:06 PM
>> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
>> Cc: John Zajac <jzajac2 at gmail.com>
>> Subject: [wix-users] passing in multiple directories to Directory
>> itemgroup to the HeatDirectory task
>>
>> following a snippet from this closed issue:
>> https://github.com/wixtoolset/issues/issues/6020
>>
>>   <ItemGroup>
>> <DirectoryItem Include="somepath\bin\Release">
>> <DirectoryRefId>First</DirectoryRefId>
>> </DirectoryItem>
>> <DirectoryItem Include="somepath\bin\Release">
>> <DirectoryRefId>Second</DirectoryRefId>
>> </DirectoryItem>
>> <DirectoryItem Include="sompath\bin\Release">
>> <DirectoryRefId>Third</DirectoryRefId>
>> </DirectoryItem>
>> </ItemGroup>
>>
>> Unable to figure out how to pass that into Directory param below in
>> whatever format heat requires. If i were to hardcode multiple directories
>> as  test - what would that look like so I don't get the:
>>
>> heat.exe(0,0): error HEAT0001: The given path's format is not supported.
>> > error.
>>
>>
>>
>>   <HeatDirectory *Directory="@(DirectoryItem)"* Transforms="Filter.xslt"
>> PreprocessorVariable="var.HarvestPath"
>>   OutputFile="myapp.g.wxs" ComponentGroupName="myapp.g.Outputs"
>>   DirectoryRefId="INSTALLFOLDER" AutogenerateGuids="true"
>> ToolPath="$(WixToolPath)"
>>   SuppressFragments="true" SuppressRegistry="true"
>> SuppressRootDirectory="true" />
>>
>> If this is just me forgetting how item passing works in msbuild then I'll
>> try to dust off the ole msbuild chops, but it's been years.
>>
>> ____________________________________________________________________
>> WiX Toolset Users Mailing List provided by FireGiant
>> http://www.firegiant.com/
>>
>
>
> --
> -John
>


-- 
-John



More information about the wix-users mailing list