如何在 Wix Toolkit 的 MSI 项目的模板摘要中插入 Intel64 或 x64?
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
并在其中创建包含 FirstFile.txt
的文件夹 MyFolder
如果我为 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.
我的问题是从哪里或如何更改模板摘要属性?
提前致谢
Specify the -arch switch at the candle.exe command line or the InstallerPlatform property in a .wixproj MSBuild project. When you specify x64 or intel64, Candle automatically sets the package and components in the file being compiled as 64-bit.
Arnson 的方法:请查看 Bob Arnson. Here is an extract from his blog: "It’s typical to want to produce both 32-bit and 64-bit packages from the same WiX source, so a common approach is to make the @Win64 attribute value a preprocessor variable 的答案。 因此他使用了编译器切换为从同一源编译 x32 或 x64 位版本的 MSI 文件。
不:你不能用一个 MSI 的体系结构同时支持两者。请参阅来自 Heath Stewart: Different Packages are Required for Different Processor Architectures 的博客。
“硬编码”方式:这是您可以尝试的旧示例:
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>
我正在编写一个简单的代码来在 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
并在其中创建包含 FirstFile.txt
MyFolder
如果我为 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.
我的问题是从哪里或如何更改模板摘要属性?
提前致谢
Specify the -arch switch at the candle.exe command line or the InstallerPlatform property in a .wixproj MSBuild project. When you specify x64 or intel64, Candle automatically sets the package and components in the file being compiled as 64-bit.
Arnson 的方法:请查看 Bob Arnson. Here is an extract from his blog: "It’s typical to want to produce both 32-bit and 64-bit packages from the same WiX source, so a common approach is to make the @Win64 attribute value a preprocessor variable 的答案。 因此他使用了编译器切换为从同一源编译 x32 或 x64 位版本的 MSI 文件。
不:你不能用一个 MSI 的体系结构同时支持两者。请参阅来自 Heath Stewart: Different Packages are Required for Different Processor Architectures 的博客。
“硬编码”方式:这是您可以尝试的旧示例: 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>