WiX自定义许可证文件:安装程序显示带有< > [英] WiX custom license file: setup shows links with < >

查看:192
本文介绍了WiX自定义许可证文件:安装程序显示带有< >的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过将自定义许可证文件放入.wxs文件中创建了WiX 3.5安装程序:

I created a WiX 3.5 setup with a custom license file by putting this into the .wxs file:

<WixVariable Id="WixUILicenseRtf" Value="License.rtf" />

这很好用,当我运行创建的.msi文件时会显示链接.
(我正在使用 WixUI_InstallDir对话框集)

This works perfectly and the link is displayed when I run the created .msi file.
(I'm using the WixUI_InstallDir Dialog Set)

现在,我想在许可证文件中放入超链接.
我只是通过在写字板中打开链接并粘贴http://mylink.com(写字板将其自动转换为超链接),将链接放入文件中.

Now I want to put a hyperlink into the license file.
I just put the link into the file by opening it in WordPad and pasting http://mylink.com (WordPad turns it into a hyperlink automatically).

当我在WiX中进行编译时,许可协议对话框将显示如下链接:

When I compile that in WiX, the license agreement dialog shows the link like this:

<http://mylink.com>

我注意到这似乎与写字板自动创建超链接有关(请参见上文).
当我从许可文件中的链接中删除http://部分时,写字板不再将其识别为链接,并且在已编译的.msi文件中,许可协议对话框中的<>消失了

I noticed that this seems to relate to WordPad creating a hyperlink automatically (see above).
When I remove the http:// part from the link in the license file, WordPad doesn't recognize it as a link anymore and in the compiled .msi file, the < and > in the license agreement dialog go away.

除了将链接放在没有http://部分的许可证文件中之外,我有什么想法可以摆脱额外的<>?

Any ideas how I can get rid of the additional < and >, except putting the link into the license file without the http:// part?

好的,也许当我使用超链接"一词时,我的想法还不够.
我的实际意思是:它不一定是实际的 clickable 超链接.
我只希望将我的网页地址显示在许可证文件的顶部.

Okay, maybe I didn't think enough when I used the word "hyperlink".
What I actually meant was: It does not have to be an actual clickable hyperlink.
I just want the adress of my web page to be displayed at the top of the license file.

如果只是URL作为文本(不可单击),我很好,但是我希望它在输入时显示,而不是< >.
问题在于,写字板输入后,写字板会自动将任何URL转换为超链接,因此我不知道如何获得许可协议对话框以将其视为普通文本.

I'm perfectly fine if it's just the URL as text (not clickable), but I want it to be displayed as I entered it, and not with < >.
The problem is that WordPad automatically turns any URL into a hyperlink as soon as I enter it, so I have no idea how to get the license agreement dialog to treat it as normal text.

推荐答案

Windows Installer在可滚动文本控件中不支持超链接.这就是链接未正确显示的原因.即使是这样,单击它也不会发生任何事情,因为Windows Installer无法处理此事件.

Windows Installer doesn't support hyperlinks in the scrollable text control. This is why the link is not displayed correctly. Even if it was, nothing would happen when you click it because Windows Installer doesn't handle this event.

可滚动文本控件中的超链接仅在使用外部UI处理该超链接时才有效.

A hyperlink in a scrollable text control works only if you use an external UI which handles it.

如果您只想显示一些文本作为链接,通常的方法是将其设置为蓝色并加下划线.您已经注意到Windows Installer不能正确显示常规超链接.

If you just want to display some text as a link, the usual approach is make it blue and underlined. As you already noticed Windows Installer doesn't show conventional hyperlinks correctly.

如果要将链接显示为普通文本,只需使用普通文本编辑器(例如notepad.exe)打开RTF文件,然后删除超链接标记.只需遵循常规的文本格式,您就可以轻松发现要删除的标记.

If you want to show a link as normal text, simply open the RTF file with a normal text editor (for example notepad.exe) and remove the hyperlink markers. Just follow the normal text formatting and you will easily spot the markers you want to remove.

这篇关于WiX自定义许可证文件:安装程序显示带有&lt; &gt;的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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