Question

Currently I'm trying to move the WixUIBannerBmp, WixUIDialogBmp and WixUILicenseRtf WixVariables and their corresponding binary files to a wixlib. Unfortunately when building it ignores these and uses the defaults.

My Library.wxs:

<Fragment>
    <WixVariable Id="WixUILicenseRtf" Value="licence.rtf" />
    <WixVariable Id="WixUIBannerBmp" Value="binaries/bannrbmp.bmp" />
    <WixVariable Id="WixUIDialogBmp" Value="binaries/dlgbmp.bmp" />
</Fragment>

where the rtf and bmp files are included in the wixlib project and the paths are relative to the Library.wxs file.

Anyone have any ideas why this isn't working?

Thanks

Was it helpful?

Solution

Managed to work this out myself! :)

Firstly the fragment is not automatically included into the main Product.wxs unless something is explicitly referenced. In this case I'm using the ARPPRODUCTICON property. If you don't have anything that you can use you can just add a dummy property that will never be used.

Also the paths to the binaries will then be incorrect as the path will be relative to the Product.wxs file. Therefore you need to use the Preprocessor variable to the current project path.

Product.wxs

<Wix>
    <PropertyRef Id="ARPPRODUCTICON" />
</Wix>

Library.wxs

<Fragment>

    <WixVariable Id="WixUILicenseRtf" Value="$(var.ProjectDir)\adastra-licence.rtf" />
    <WixVariable Id="WixUIBannerBmp" Value="$(var.ProjectDir)\Bitmaps\bannrbmp.bmp" />
    <WixVariable Id="WixUIDialogBmp" Value="$(var.ProjectDir)\Bitmaps\dlgbmp.bmp" />

    <Property Id="ARPPRODUCTICON" Value="icon.ico" />
    <Icon Id="icon.ico" SourceFile="$(var.ProjectDir)/App.ico"/>

    <UIRef Id="WixUI_Common" />
</Fragment>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top