I am trying to install some fonts that are common to several of our applications, so it seems like putting them in a single shared merge module is the way to go. But I can't get the precise Wix syntax. Here is what I have in the my merge module config file:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Module Id="TS3DFontsMerge" Language="1033" Version="1.0.0.0">
<Package Id="F6029400-FD05-4213-A0B2-1755387595BF" Manufacturer="Tech Soft 3D" InstallerVersion="200" />
<DirectoryRef Id="FontsFolder">
<Component Id="TechSoft3DFonts" Guid="0B9C43FC-3835-42DE-80F6-1DB2A912BEE5">
<File Id="ts3d.ttf" Source="..\..\..\samples\fonts\ts3d.ttf" TrueType="yes" />
<File Id="MyriadCAD.otf" Source="..\..\..\samples\fonts\MyriadCAD.otf" TrueType="yes" />
</Component>
</DirectoryRef>
</Module>
</Wix>
I'm following the model described here. In this case, I get this error:
ts3d_fonts_merge.wxs(5,0): error CNDL0205: The Directory with Id 'FontsFolder' is not a valid root directory. There may only be a single root directory per product or module and its Id attribute value must be 'TARGETDIR' and its Name attribute value must be 'SourceDir'. ts3d_fonts_merge.wxs(5,0): error CNDL0025: The Directory element requires the Name attribute because there is no parent Directory element.
So my get-to-the-point question is: How can I get Wix to recognize the FontsFolder predefined ID in a merge module? I am using WixToolset v3.10.
Here are a couple other things I tried...
When I had this directly in the main product installer, I had to use the <directory> tag instead of <DirectoryRef>, and that worked. But when I use that in the merge module, I get this error message:
ts3d_fonts_merge.wxs(5,0): error LGHT0094: Unresolved reference to symbol 'Directory:FontsFolder' in section 'Module:TS3DFontsMerge'.
And if I wrap the FontsFolder in a TARGETDIR tag (as was suggested by the first error?), I get warnings that the fonts are being installed to the wrong place. Here is the error message:
light.exe(0,0): warning LGHT1076: ICE07: 'ts3d.ttf.F6029400_FD05_4213_A0B2_1755387595BF' is a Font and must be installed to the FontsFolder. Current Install Directory: 'FontsFolder.F6029400_FD05_4213_A0B2_1755387595BF' light.exe(0,0): warning LGHT1076: ICE07: 'MyriadCAD.otf.F6029400_FD05_4213_A0B2_1755387595BF' is a Font and must be installed to the FontsFolder. Current Install Directory: 'FontsFolder.F6029400_FD05_4213_A0B2_1755387595BF'
Any ideas?