WIX 中的整数变量
我想根据品牌安装一项功能。
所以在我的brand.wxi中我定义了:
<?define brand.FeatureLevel = 1 ?>
在我的wxs中我写道:
<Feature Id="FF" Title="FF" Level="$(var.brand.FeatureLevel)">
<ComponentRef Id="..." />
<ComponentRef Id="..." />
</Feature>
这个定义工作得很好(无论我将0还是1作为FeatureLevel)。 我唯一的问题是在编译时收到的警告:
“Level”属性无效 - 根据其数据类型“http://www.w3.org/2001/XMLSchema:integer”,值“$(var.brand.FeatureLevel)”无效 - 字符串“ $(var.brand.FeatureLevel)' 不是有效的整数值。
有办法解决这个警告吗? 我可以定义整型变量吗?我找不到办法...
I would like to install a feature according to the brand.
So in my brand.wxi I defined:
<?define brand.FeatureLevel = 1 ?>
And in my wxs I wrote:
<Feature Id="FF" Title="FF" Level="$(var.brand.FeatureLevel)">
<ComponentRef Id="..." />
<ComponentRef Id="..." />
</Feature>
This definition works fine (wheather I've placed 0 or 1 as FeatureLevel).
My only problem is a warning I get at compilation time:
The 'Level' attribute is invalid - The value '$(var.brand.FeatureLevel)' is invalid according to its datatype 'http://www.w3.org/2001/XMLSchema:integer' - The string '$(var.brand.FeatureLevel)' is not a valid Integer value.
Is there a way to fix this warning?
Can I define integer variable? I couldn't find a way...
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以安全地忽略此警告。它只是提醒您注意该预处理器变量必须计算为整数。否则,如果将brand.FeatureLevel修改为上面示例中的字母,它将抛出错误并且根本无法编译。
You can safely ignore this warning. It just points your attention that this preprocessor variable must evaluate to integer. Otherwise, if you modify brand.FeatureLevel to a letter in the sample above, it will throw an error and simply won't compile.