目前,我正在构建仅针对64位计算机的安装程序。该过程的一部分涉及运行Heat.exe
以产生Fragment
包含部分已部署应用程序的元素。
问题是由发热产生的组件产生ICE:80错误,WiX抱怨这些组件针对32位系统,我的安装程序正在尝试将其加载到:
<Directory Id="ProgramFiles64Folder">
查看文档,有一个-platform
开关可以用来告诉Heat
我们我们的目标是x64环境,但是文档中没有关于如何使用此开关的线索。我试过了:
-platform=x64
-platform=Win64
为了Win64
在生成的组件上设置属性,似乎什么都不会影响输出。有人知道吗?还是我完全将错误的树吠叫?
如果我手动编辑收集的成分以添加Win64="yes"
ICE,错误就会消失。
在我的<Product>
元素中Platform="x64"
,据我所知,candle
应该采取这种做法,并确定默认情况下组件应设置为x64,但这似乎不起作用。
非常困惑。
这是XSLT文件。将其另存为HeatTransform.xslt
:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wix="http://schemas.microsoft.com/wix/2006/wi"
xmlns="http://schemas.microsoft.com/wix/2006/wi"
exclude-result-prefixes="wix">
<xsl:output method="xml" encoding="UTF-8" indent="yes" />
<xsl:template match="wix:Wix">
<xsl:copy>
<!-- The following enters the directive for adding the config.wxi include file to the dynamically generated file -->
<!--xsl:processing-instruction name="include">$(sys.CURRENTDIR)wix\config.wxi</xsl:processing-instruction-->
<xsl:apply-templates select="@*" />
<xsl:apply-templates />
</xsl:copy>
</xsl:template>
<!-- ### Adding the Win64-attribute to all Components -->
<xsl:template match="wix:Component">
<xsl:copy>
<xsl:apply-templates select="@*" />
<!-- Adding the Win64-attribute as we have a x64 application -->
<xsl:attribute name="Win64">yes</xsl:attribute>
<!-- Now take the rest of the inner tag -->
<xsl:apply-templates select="node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
然后,在您的heat
命令行中添加参数-t <PathToYourFile>\HeatTransform.xslt
。这会将Win64
-attribute添加到每个组件。另外,我Platform='x64'
在WiX源文件中具有-attribute,并将-arch x64
-parameter添加到的调用中candle
,正如您在问题中已经描述的那样。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句