Can I install WixUiBannerBmp in wixlib?

I am currently trying to move WixUIBannerBmp, WixUIDialogBmp and WixUILicenseRtf WixVariables and their respective binaries to wixlib. Unfortunately, when building it, it ignores them and uses the default values.

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 refer to the Library.wxs file.

Anyone have any ideas why this is not working?

thanks

+1
windows-installer wix wixlib
source share
1 answer

Skillfully handle this! :)

First, a snippet is not automatically included in the main Product.wxs file unless explicitly indicated. In this case, I use the ARPPRODUCTICON property. If you have nothing that you can use, you can simply add a dummy property that will never be used.

Also, the paths to the binary files will be incorrect, since the path will relate to the Product.wxs file. Therefore, you need to use the Preprocessor variable for 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> 
+6
source share

All Articles