So here's the basic setup. I have an existing WIX project that builds a bunch of individual fragments in to a larger MSI. I'm trying to change the project around to allow you to select individual pieces to install. The program I've run in to is that when I run heat on the smaller directories to create the individual components, the Source path isn't correct. I'll give an example as hopefully that will make more sense.
So I have basic folder structure like this:
C:\ProjDir\Foo\Bar1
C:\ProjDir\Foo\Bar2
I used to a command to simply harvest C:\Foo (Heat.exe dir Foo -dr FOO_DIR_REF -out File.wxs), and now I've changed it to to harvest each individual Bar folder (Heat.exe dir Foo\Bar1 -dr BAR1_DIR_REF -out File1.wxs) and (Heat.exe dir Foo\Bar2 -dr BAR2_DIR_REF -out File2.wxs). The problem I'm having is that the output of the harvest looks like this:
<Component Id="cmpblablabla" Guid="{stuff-here}">
<File Id="filblabla" KeyPath="yes" Source="SourceDir\Bar1\file.here" />
</Component>
And when trying to build the msi it complains because it can't find SourceDir\Bar1. Basically what I need is a way to make it look something like this:
<Component Id="cmpblablabla" Guid="{stuff-here}">
<File Id="filblabla" KeyPath="yes" Source="SourceDir\Foo\Bar1\file.here" />
</Component>
This seems like a very simple problem, that I'm sure is easily done, but all the searching I've done has not come up with anything useful.
Note that light
will search additional SourceDir
's for your file if you add them to the search path with -b
e.g.
light.exe -b Foo ...
It should be
<Component Id="cmpblablabla" Guid="{stuff-here}">
<File Id="filblabla" KeyPath="yes" Source="$(var.ProjectName.TargetPath)\Bar1\file.here" />
</Component>
Different properties available are
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With