[英]How can I insert Intel64 or x64 in Template Summary in an MSI project of Wix Toolkit?
我正在编写一个简单的代码来在Program Files
夹中安装一个文件,而不是Program Files (x86)
<Fragment>
<Directory Id="TARGETDIR" Name="SourceDir">
<Directory Id="ProgramFiles64Folder">
<Directory Id="INSTALLFOLDER" Name="Del">
<Directory Id="MyFolder" Name="MyFolder"/>
</Directory>
</Directory>
</Directory>
</Fragment>
<Fragment>
<Component Id="Component1" Directory="MyFolder" Win64="yes">
<File Id="FirstFile.txt"/>
</Component>
</Fragment>
基本上它应该在Program Files
创建一个文件夹del
并在其中创建文件夹MyFolder
,其中将包含FirstFile.txt
如果我为Id = ProgramFilesFolder
做它,它通过安装在Program Files (x86)
将其更改为ProgramFiles64Folder
会出现以下错误
ICE80: This package contains 64 bit component 'Component1' but the Template Summary Property does not contain Intel64 or x64.
我的问题是从哪里或如何更改模板摘要属性?
提前致谢
在candle.exe 命令行或.wixproj MSBuild 项目中的InstallerPlatform 属性中指定-arch 开关。 当您指定 x64 或 intel64 时,Candle 会自动将正在编译的文件中的包和组件设置为 64 位。
Arnson 的方法:请查看Bob Arnson的答案。 以下是他博客的摘录: “通常希望从同一个 WiX 源生成 32 位和 64 位包,因此常用方法是将 @Win64 属性值设为预处理器变量。” 因此,他使用编译器开关来编译来自同一源的 x32 或 x64 位版本的 MSI 文件。
不:您不能同时支持具有一个 MSI 的架构。 请参阅Heath Stewart 的这篇博客: 不同的处理器架构需要不同的包。
“硬编码”方式:这是您可以尝试的旧示例: https : //github.com/glytzhkof/WiXBitnessX64
部分摘录:
包装元素:
<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="x64" />
组件元素:
<Component Feature="ProductFeature" Win64="yes">
<File Source="$(env.SystemRoot)\notepad.exe" />
</Component>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.