如何使用 wix 在 MSI 安装程序的欢迎消息中添加对齐的自定义消息
How to add custom message with alignment in Welcome message of MSI installer using wix
我在 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. {\WixUI_Font_Title}Version - [ProductVersion]</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. 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.
Update:关于如何插入自定义对话框的小示例:Wix UpgradeVersion.
我在 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. {\WixUI_Font_Title}Version - [ProductVersion]</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. 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.
Update:关于如何插入自定义对话框的小示例:Wix UpgradeVersion.