So I have this in my .wixproj
<DefineConstants>ProductVersion=$(ProductVersion);backendDir=backend;frontendDir=frontend;hardwareDir=hardware</DefineConstants>
.....
<ItemGroup>
<Compile Include="Product.wxs" />
</ItemGroup>
<HarvestDirectory Include="frontend">
<DirectoryRefId>frontendDir</DirectoryRefId>
<ComponentGroupName>frontendComp</ComponentGroupName>
<PreprocessorVariable>var.frontendDir</PreprocessorVariable>
</HarvestDirectory>
<HarvestDirectory Include="backend">
<DirectoryRefId>backendDir</DirectoryRefId>
<ComponentGroupName>backendComp</ComponentGroupName>
<PreprocessorVariable>var.backendDir</PreprocessorVariable>
</HarvestDirectory>
<HarvestDirectory Include="hardware">
<DirectoryRefId>hardwareDir</DirectoryRefId>
<ComponentGroupName>hardwareComp</ComponentGroupName>
<PreprocessorVariable>var.hardwareDir</PreprocessorVariable>
</HarvestDirectory>
And then in the Product.wxs I have:
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFilesFolder">
<Directory Id="INSTALLDIR" Name="FlexxEdge">
<Directory Id="frontendDir" Name="frontend"/>
<Directory Id="backendDir" Name="backend"/>
<Directory Id="hardwareDir" Name="hardware"/>
</Directory>
</Directory>
...
<Feature Id="Software"
Title="testInstaller"
Level="1"
ConfigurableDirectory="INSTALLDIR">
<ComponentGroupRef Id="frontendComp" />
<ComponentGroupRef Id="backendComp" />
<ComponentGroupRef Id="hardwareComp" />
</Feature>
So it works and it installs, but for some reason the frontend and hardware folders are nested when they shouldn't be. The backend folder is fine. File structure - what it should be:
- frontend
- - Files
- backend
- - Files
- hardware
- - Files
What it is after the installer:
- frontend
- - frontend
- - - Files
- backend
- - Files
- hardware
- - hardware
- - - Files
And I checked the actual dirs and they don't have this issue in the project.