简体   繁体   English

Windows Installer xml WIX,在控件中,文本元素可以是什么? 有些语法我不明白

[英]windows installer xml WIX, in a control, what can the text element be? there are some syntax that I don't understand

I already know that this is Formatted text, I already read the msdn, but still, I don't understand some of things. 我已经知道这是格式化文本,我已经阅读了msdn,但仍然不了解某些内容。

First: 第一:

    <Control Id="BannerBitmap" Type="Bitmap" X="0" Y="0" Width="370" Height="44" TabSkip="no" Text="!(loc.LicenseAgreementDlgBannerBitmap)" />

what does this Text="!(loc.LicenseAgreementDlgBannerBitmap)" means? 此Text =“!(loc.LicenseAgreementDlgBannerBitmap)”是什么意思? what means "!" 什么意思是“!” ? and what means "loc."? 什么是“ loc”? How can I define my own "loc."? 我如何定义自己的“位置”?

Second: 第二:

<Control Id="Cancel" Type="PushButton" Cancel="yes" Text="!(loc.WixUICancel)"
                     X="304" Y="243" Width="56" Height="17">
                <Publish Event="SpawnDialog" Value="CancelDlg">1</Publish>

what does the innertext "1" means? 内部文本“ 1”是什么意思? must we put an "1" into the innertext of a Publish element? 我们是否必须在Publish元素的内文中添加“ 1”? because if I put nothing there, this event won't work properly. 因为如果我什么都没放,则此事件将无法正常进行。

Third: I want to set a value of a property as a text of one of my file, I mean, I want to use a Text in a file as a value of a property. 第三:我想将属性的值设置为文件之一的文本,我的意思是,我想在文件中使用Text作为属性的值。 Can I do that? 我可以这样做吗?

Forth: Can I show HTML text in a Text or ScrollableText Control? Forth:我可以在Text或ScrollableText控件中显示HTML文本吗? I mean, how to show HTML Context? 我的意思是,如何显示HTML上下文?

  1. You can use the syntax !(loc.someVariable) to store strings as variables in order to localize the installer. 您可以使用语法!(loc.someVariable)将字符串存储为变量,以便本地化安装程序。 The WiX manual has a section on How To: Make your installer localizable WiX手册包含有关如何:使安装程序可本地化的部分
  2. The inner text of a Publish element is a conditional expression. Publish元素的内部文本是条件表达式。 In this case, a '1' always evaluates to true. 在这种情况下,“ 1”始终等于true。
  3. If you want to set the value of a property to text in a file, you would have to create a custom action to read that file and then set the value of the property. 如果要将属性的值设置为文件中的文本,则必须创建一个自定义操作以读取该文件,然后设置属性的值。
  4. I don't think there is any way to render HTML in the built in WiX controls. 我认为没有任何方法可以在内置的WiX控件中呈现HTML。 You would most likely have to create your own UI using WiX Burn. 您很可能必须使用WiX Burn创建自己的UI。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM