Wix - ICE60 和 ICE69 警告 [英] Wix - ICE60 and ICE69 warnings

查看:23
本文介绍了Wix - ICE60 和 ICE69 警告的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 WiX 时遇到了一些问题.我当前的警告是 ICE60,它告诉我我的 .ttf 文件不是字体,它的版本不是配套文件参考.它应该在语言"列中指定一种语言.

I'm having a few issues with WiX. My current warning is ICE60 which is telling me my .ttf file is not a font, and its version is not a companion file reference. It should have a language specified in the Language column.

此警告的问题是我无法为文件设置语言版本.根据有关此警告的 MSDN 文档,我可以通过向字体文件添加版本来抑制它.不完全确定如何!

Problem with this warning is that I'm unable to set a Version of Language for the file. According to MSDN docs about this warning, I can suppress it by adding a Version to the font file. Not entirely sure how!

我的下一个警告是 ICE69,不匹配的组件参考.快捷方式表的条目ApplicationStartMenuShortcut"属于组件ApplicationShortcut".但是,目标"列中的格式化字符串引用了属于组件MyApp.exe"的文件MyApp.exe".组件具有相同的功能.

My next warning is ICE69, Mismatched component reference. Entry 'ApplicationStartMenuShortcut' of the Shortcut table belongs to component 'ApplicationShortcut'. However, the formatted string in column 'Target' references file 'MyApp.exe' which belongs to component 'MyApp.exe'. Components are in the same feature.

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
     xmlns:netfx="http://schemas.microsoft.com/wix/NetFxExtension">
<?include "config.wxi"?>
<Product Id="*" UpgradeCode="67bd6fc7-c75b-434b-a305-2808541f8185" Version="1.0.0.0" Language="1033" Name="MyApp" Manufacturer="MyApp">

    <Package InstallerVersion="300" Compressed="yes"/>
    <Media Id="1" Cabinet="MyApp.cab" EmbedCab="yes" />

    <PropertyRef Id="NETFRAMEWORK45" />

    <Condition Message="This application requires .NET Framework 4.5. Please install the .NET Framework then run this installer again.">
        <![CDATA[Installed OR NETFRAMEWORK45]]>
    </Condition>

    <Directory Id="TARGETDIR" Name="SourceDir">
        <Directory Id="ProgramFilesFolder">
            <Directory Id="APPLICATIONROOTDIRECTORY" Name="MyApp">
                <Directory Id="RESOURCESDIRECTORY" Name="Resources" />
            </Directory>
        </Directory>
        <Directory Id="ProgramMenuFolder">
            <Directory Id="ApplicationProgramsFolder" Name="MyApp"/>
        </Directory>
    </Directory>

    <Icon Id="_MyApp.ico" SourceFile="$(var.SourceDir)\Resources\MyApp.ico" />
    <Property Id="ARPPRODUCTICON" Value="_MyApp.ico" />

    <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." />

    <DirectoryRef Id="APPLICATIONROOTDIRECTORY">
        <Component Id="MyApp.exe" Guid="*">
            <File Id="MyApp.exe" Source="$(var.SourceDir)\MyApp.exe" KeyPath="yes" Checksum="yes"/>
        </Component>
        <Component Id="Xceed.Wpf.Toolkit.dll" Guid="*">
            <File Id="Xceed.Wpf.Toolkit.dll" Source="$(var.SourceDir)\Xceed.Wpf.Toolkit.dll" KeyPath="yes" Checksum="yes" />
        </Component>
    </DirectoryRef>
    <DirectoryRef Id="RESOURCESDIRECTORY">
        <Component Id="MyApp.ico" Guid="*">
            <File Id="MyApp.ico" Source="$(var.SourceDir)\Resources\MyApp.ico" KeyPath="yes" />
        </Component>
        <Component Id="FontAwesome.ttf" Guid="*">
            <File Id="FontAwesome.ttf" Source="$(var.SourceDir)\Resources\FontAwesome.ttf" KeyPath="yes" />
        </Component>
    </DirectoryRef>
    <DirectoryRef Id="ApplicationProgramsFolder">
        <Component Id="ApplicationShortcut" Guid="*">
            <Shortcut Id="ApplicationStartMenuShortcut"
                      Name="MyApp"
                      Description="Off-browser chat client for MyApp"
                      Target="[#MyApp.exe]"
                      WorkingDirectory="APPLICATIONROOTDIRECTORY" />
            <RemoveFolder Id="ApplicationProgramsFolder" On="uninstall" />
            <RegistryValue Root="HKCU" Key="Software\Microsoft\MyApp" Name="installed" Type="integer" Value="1" KeyPath="yes" />
        </Component>
    </DirectoryRef>

    <Feature Id="MainApplication" Title="Main Application" Level="1">
        <ComponentRef Id="MyApp.exe" />
        <ComponentRef Id="Xceed.Wpf.Toolkit.dll" />
        <ComponentRef Id="MyApp.ico" />
        <ComponentRef Id="FontAwesome.ttf" />
        <ComponentRef Id="ApplicationShortcut" />
    </Feature>
</Product>
</Wix>

尽管出现了两个警告,但该应用程序确实安装并运行良好.虽然谁喜欢警告,嗯?

Despite both warnings, the application does install and work fine. Although who likes warnings, eh?

非常感谢您对这些错误的任何帮助,我不想完全压制它们,以防万一存在潜在问题.

Any help with these errors are most appreciated, I don't want to suppress them altogether just incase there is an underlying issue.

推荐答案

以下任一工具均可让您编辑 .ttf 文件并添加所需信息.

Either of these below tools will allow you to edit a .ttf file and add the information you need.

http://fontforge.org/editexample.html

http://sourceforge.net/projects/ttfedit/

关于不匹配的组件引用,您可以安全地忽略您遇到的 ICE 错误.如果您希望摆脱它,您可以改为宣传您的快捷方式.

In regards the mismatched component reference, the ICE error you're getting can be safely ignored. If you would prefer to get rid of it, you can advertise your shortcuts instead.

https://docs.microsoft.com/en-us/archive/blogs/alexshev/from-msi-to-wix-part-10-shortcuts

否则,您可以抑制该验证错误.

Otherwise, you can suppress that validation error.

这篇关于Wix - ICE60 和 ICE69 警告的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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