Reputation: 760
We use heat to generate wix code to deliver files in the same hierarchy as the project. We recently decided to change the delivery location of some tutorial and documentation files, but I'm having an issue with wix just refusing to deliver files. I changed the build action from 'content' to none so that heat would ignore these files and and manually editing the product.wxs file to deliver these files to the specified location as we don't want to move them in source control and risk losing version history, etc.
my directory structure (CustomerDirectory and ProgramDirectory are placeholder names for confidentiality):
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="$(var.PlatformProgramFilesFolder)">
<Directory Id="CustomerDirectory" Name="Customer">
<Directory Id="INSTALLFOLDER" Name="ProgramName">
<Directory Id="ResourcesFolder" Name="Resources">
<Directory Id="DocumentationFolder" Name="Documentation"/>
<Directory Id="TutorialsFolder" Name="Tutorials"/>
</Directory>
</Directory>
</Directory>
</Directory>
and the below fragment located at the bottom of product.wxs
<Fragment>
<ComponentGroup Id="DocumentationComponents" Directory="DocumentationFolder">
<Component Id="Installation_Guide.pdf">
<File Id="Installation_Guide.pdf" Source="$(var.GUI.ProjectDir)\Documentation\Installation Guide.pdf" KeyPath="yes"/>
</Component>
</ComponentGroup>
</Fragment>
I've played around with KeyPath, GUID, and many other possibilities with no luck. I just recently added log4net assemblies to this file and they are getting delivered no problem, using basically the same code posted here.
Upvotes: 0
Views: 210
Reputation: 760
Delivering a "Content" file to a different location other than where heat wanted to put it turned out to be extremely difficult. With enough digging around I might have found a solution within Wix. Unfortunately, Wix is not intuitive at all, not very well though out from conception, and I've seen better documentation on a chinese made filing cabinet. Unfortunately many of us still have to use this forsaken product, so if you run into a similar issue THIS IS WHAT I SUGGEST:
Upvotes: 1