如何使用 wix 在 MSI 安装程序的欢迎消息中添加对齐的自定义消息 [英] How to add custom message with alignment in Welcome message of MSI installer using wix

查看:28
本文介绍了如何使用 wix 在 MSI 安装程序的欢迎消息中添加对齐的自定义消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 wxl 文件中使用了这一行来添加自定义消息,但仍然无法正确对齐版本号

I used this line in wxl file to add custom message but still not able to align the version number properly

  <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>

我想要这样的结果

此外,我无法更改字体.

Also, I am not able to change the fonts.

更新

我能够做到这一点.版本挂在中间,最后没有去,

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>

  • 添加控件和文本
  • ICE31 - 验证套件检查字符串和字段(见示例)
  • 自定义 WiX 对话框:您可能需要更改整个对话框以添加两个字段,以便您可以将版本号放在自己的位置具有自己风格的文本框.这样做有点复杂,我有一个描述在这里:自定义 WiX 对话框.请快速阅读.它还介绍了如何更改字体颜色和样式.

    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. Doing so is a little involved, and I have a description of it here: Customizing WiX Dialogs. Please have a quick read. It also describes how to change font color and style.

    更新:关于如何插入自定义对话框的漂亮小示例:Wix UpgradeVersion.

    这篇关于如何使用 wix 在 MSI 安装程序的欢迎消息中添加对齐的自定义消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆