简体   繁体   English

如何使用wix在MSI安装程序的欢迎消息中添加具有对齐的自定义消息

[英]How to add custom message with alignment in Welcome message of MSI installer using wix

I used this line in wxl file to add custom message but still not able to align the version number properly 我在wxl文件中使用此行添加自定义消息但仍无法正确对齐版本号

  <String Id="WelcomeDlgDescription" Overridable="yes">The Setup Wizard will install [ProductName] on your computer. Click Next to continue or Cancel to exit the Setup Wizard.&#13;&#10;&#13;&#10;&#13;&#10;{\WixUI_Font_Title}Version - [ProductVersion]</String>

I want the results to be like this 我希望结果是这样的

在此输入图像描述

Also, I am not able to change the fonts. 此外,我无法更改字体。

Updated 更新

I am able to achieve this. 我能够做到这一点。 Version left hanging in the middle and not going at the end, 版本悬挂在中间而不是最后, 在此输入图像描述

Limitation : It looks like you can only have one style per string. 限制 :看起来每个字符串只能有一个样式。 I am not sure, but it says in the documentation that you have to refer to the style at the beginning of the string: 我不确定,但它在文档中说你必须引用字符串开头的样式:

<TextStyle Id="Test" FaceName="Arial" Blue="255" Size="12" Strike="yes" />

<..>

<String Id="WelcomeDlgDescription">{\Test}Version - [ProductVersion]</String>

Customizing WiX Dialogs : You might need to change the whole dialog to add two fields so you can put the version number in its own text box featuring its own style. 自定义WiX对话框 :您可能需要更改整个对话框以添加两个字段,以便您可以将版本号放在具有自己样式的自己的文本框中。 Doing so is a little involved, and I have a description of it here: Customizing WiX Dialogs . 这样做有点牵扯,我在这里有一个描述: 自定义WiX对话框 Please have a quick read. 请快速阅读。 It also describes how to change font color and style. 它还描述了如何更改字体颜色和样式。

Update : Nice little sample for how you can insert a custom dialog: Wix UpgradeVersion . 更新 :有关如何插入自定义对话框的简单示例: Wix UpgradeVersion

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

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