I'm new to WiX. Very new. Is there a way to define both a ComponentGroup and a Directory at the same time?
I have a large number of files, on the order of 300 or so total, that need to be split into a number of groups, with each group having somewhere around 50 files.
Using heat.exe, I was able to create a Fragment that creates Components for each file. I would like to avoid having to re-list each and every one of these components in a separate ComponentGroup definition. I would love to be able to wrap the list of components generated by heat in a ComponentGroup definition, then simply use that ComponentGroupRef inside of a DirectoryRef structure.
I hope this clears it up. I currently must do:
<DirectoryRef Id="FilesDir">
<Component Id="a.txt" Guid="YOUR-GUID">
<File Id="a.txt" KeyPath="yes" Source="SourceDir\a.txt" />
</Component>
<Component Id="b.txt" Guid="YOUR-GUID">
<File Id="b.txt" KeyPath="yes" Source="SourceDir\b.txt" />
</Component>
...
<Component Id="z.txt" Guid="YOUR-GUID">
<File Id="z.txt" KeyPath="yes" Source="SourceDir\z.txt" />
</Component>
</DirectoryRef>
<ComponentGroup Id="FilesGroup">
<ComponentRef Id="a.txt">
<ComponentRef Id="b.txt">
...
<ComponentRef Id="z.txt">
</ComponentGroup>
I have to list every file twice. That stinks.
I'd like to be able to do:
<ComponentGroup Id="FilesGroup">
<Component Id="a.txt" Guid="YOUR-GUID">
<File Id="a.txt" KeyPath="yes" Source="SourceDir\a.txt" />
</Component>
<Component Id="b.txt" Guid="YOUR-GUID">
<File Id="b.txt" KeyPath="yes" Source="SourceDir\b.txt" />
</Component>
...
<Component Id="z.txt" Guid="YOUR-GUID">
<File Id="z.txt" KeyPath="yes" Source="SourceDir\z.txt" />
</Component>
</ComponentGroup>
<DirectoryRef Id="FilesDir">
<ComponentGroupRef Id="FilesGroup">
</DirectoryRef>
Is that possible? Is there some other way of making this easier that I'm just not seeing?