繁体   English   中英

有没有办法在Wix中制作组合的32位和64位安装程序?

[英]Is there a way to make a combined 32-bit and 64-bit installer in Wix?

我正在使用带有Votive集成的WiX Toolset 3.8 for Visual Studio。 我的产品需要安装在32位和64位系统上。 两者之间唯一真正的区别是一些64位COM注册,当然还有ProgramFiles vs ProgramFiles (x86)乐趣和游戏。

我一直遵循Microsoft的建议(现在找不到),为32位和64位系统创建单独的安装程序。 但是,最近我一直在想这是否仍然是最佳做法,或者现在是否有更好的方法?

我从相同的WiX源创建安装程序。 我一直在为“任何CPU”构建我的所有程序集,但为WiX安装程序项目分别设置了x86和x64配置。 我有一个config.wxi ,它为要建立的目标设置正确的路径等,并将其包含在我的所有.wxs文件中。 它遵循以下原则:

<?xml version="1.0" encoding="utf-8"?>

<Include>
  <!-- User Configuration - you must ensure all these variables have correct values for your project -->
  <?define InstallName = "Project Name" ?>
  <?define Manufacturer = "My Company" ?>
  <!-- End of User Configuration - do not edit anything beyond this point -->

  <!-- Define platform-specific names and locations -->
  <?if $(var.Platform) = x64 ?>
  <?define ProductName = "$(var.InstallName) (x64)" ?>
  <?define Win64 = "yes" ?>
  <?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
  <?define PlatformCommonFilesFolder = "CommonFiles64Folder" ?>
  <?else ?>
  <?define ProductName = "$(var.InstallName) (x86)" ?>
  <?define Win64 = "no" ?>
  <?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
  <?define PlatformCommonFilesFolder = "CommonFilesFolder" ?>
  <?endif ?>

  <!-- Set installer version based on the file version of the main assembly. -->
  <?define ProductVersion="!(bind.FileVersion.filSomeKeyFileFromTheProject)"?>
</Include>

到目前为止,我还没有看过Burn(引导程序生成器),但是在我现在正在研究的项目上,我想这样做。 因此,现在该对社区认为的“最佳实践”进行审查了。 人们现在如何处理x86 / x64双重安装?

没有任何变化:MSI仍不支持32位程序包中的64位组件。 使用Burn捆绑包,您可以将这两个包组合在一起,并从用户角度使其看起来像一个。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM