Using files 'included' in a wixlib

373 Views Asked by At

We use a wixlib that has all the dialogs (most of which can be shared with other products on our portfolio). One of these dialogs will show a EULA. This EULA is added to the wixlib project as (RTF) content (Build Action: Content, Copy to output: DontNotCopy)

Now next to showing the EULA, I must also install it with all the products. Can I some how reference the EULA that (has to be?) is embedded in the wixlib?

Or do I need to copy this file to all the wixproj of all products? Given it's a EULA, which won't change that much, it's still a hassle if it does change. I trying to avoid that.

I'm guessing, I need to copy it to all products, but I wanted to double check.

1

There are 1 best solutions below

0
On

In hindsight, I overthought this. I simply added the file to a component in the wixlib project which can be referenced from the consuming Wix project.

In the wixlib:

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
    <Fragment>
      <Component Id="C_General_EULA" Directory="INSTALLFOLDER" Guid="{INSERT_GUID}" KeyPath="yes">
        <File Id="F_General_EULA" Source="Localization\EULA_en-us.rtf"/>
      </Component>
    </Fragment>
</Wix>

In the consuming Wix project:

<Feature Id="EULAFeature" Level="1" Display="hidden">
      <ComponentRef Id="C_General_EULA"/>
</Feature>

Again, in hindsight really simple.