当广告设置为否时设置Wix图标 [英] Setting Wix icon when advertise is set to no
问题描述
似乎我永远都在问有关Wix的问题. 这应该是最后一个,而且只是一个完善的步骤.
Seems like I'm forever asking questions about Wix. This should be the last, and it's just a polishing one.
我希望关联的文件带有图标,但我的ProgId元素未指定advertise,我假定默认为no. 因此,在wix文档中,它指出:
I'm wanting my associated files to have an icon to go with them, but in my ProgId element, the advertise is not specified which I assume defaults to no. Therefore in the wix documentation, it states:
对于播发的ProgId,则为Icon元素的ID.对于未发布的ProgId,这是包含图标资源的文件的ID.
For an advertised ProgId, the Id of an Icon element. For a non-advertised ProgId, this is the Id of a file containing an icon resource.
我根本不了解它是如何工作的.我是否要设置一个包含图标的文件夹,并用IconIndex引用它?这是我正在使用的.wxs的一部分.
I'm not understanding how this works at all. Do I set up a folder that contains the icon and reference it with IconIndex? This is the part of the .wxs I'm working with.
<Component Id ="MyApp.exe" Guid="{GUID-HERE}">
<File Id="MyApp.exe" KeyPath="yes" Source="$(var.MyApp.TargetDir)MyApp.exe" />
<ProgId Id ="MyAppProgID" Description="MyApp data files" Icon ="Logo.ico" IconIndex="0">
<Extension Id ="myapp" ContentType="application/myapp">
<Verb Id ="open" Command="open" TargetFile="MyApp.exe" Argument=""%1""/>
</Extension>
</ProgId>
<Icon Id="Logo.ico" SourceFile="$(var.MyApp.TargetDir)\Icon\Logo.ico"/>
我正在努力寻找有关wix的许多ProgId功能的任何示例或适当的文档.
I'm struggling to find any examples or proper documentation on a lot of the ProgId functionality for wix.
预先感谢
推荐答案
您需要将Icon元素更改为File并删除IconIndex
You need change Icon element to File and remove IconIndex
<Component Id ="MyApp.exe" Guid="{GUID-HERE}">
<File Id="MyApp.exe" KeyPath="yes" Source="$(var.MyApp.TargetDir)MyApp.exe" />
<File Id="Logo.ico" SourceFile="$(var.MyApp.TargetDir)\Icon\Logo.ico"/>
<ProgId Id ="MyAppProgID" Description="MyApp data files" Icon ="Logo.ico">
<Extension Id ="myapp" ContentType="application/myapp">
<Verb Id ="open" Command="open" TargetFile="MyApp.exe" Argument=""%1""/>
</Extension>
</ProgId>
这篇关于当广告设置为否时设置Wix图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!