cav*_*ick 1 windows-installer wix wixlib wix3.5
目前我正在尝试将WixUIBannerBmp,WixUIDialogBmp和WixUILicenseRtf WixVariables及其相应的二进制文件移动到wixlib.不幸的是,在构建时忽略这些并使用默认值.
我的Library.wxs:
<Fragment>
<WixVariable Id="WixUILicenseRtf" Value="licence.rtf" />
<WixVariable Id="WixUIBannerBmp" Value="binaries/bannrbmp.bmp" />
<WixVariable Id="WixUIDialogBmp" Value="binaries/dlgbmp.bmp" />
</Fragment>
Run Code Online (Sandbox Code Playgroud)
其中rtf和bmp文件包含在wixlib项目中,路径相对于Library.wxs文件.
任何人都有任何想法为什么这不起作用?
谢谢
管理自己解决这个问题!:)
首先,除非明确引用某些内容,否则该片段不会自动包含在主Product.wxs中.在这种情况下,我正在使用ARPPRODUCTICON属性.如果你没有任何可以使用的东西,你可以添加一个永远不会被使用的虚拟属性.
此外,二进制文件的路径将不正确,因为路径将相对于Product.wxs文件.因此,您需要将Preprocessor变量用于当前项目路径.
<Wix>
<PropertyRef Id="ARPPRODUCTICON" />
</Wix>
Run Code Online (Sandbox Code Playgroud)
<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>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
4002 次 |
| 最近记录: |