wix - 32 位和 64 位的单个 MSI 取决于目标机器

标签 wix 64-bit 32-bit

使用 WIX,我需要创建一个可以在 32 位和 32 位中运行的 msi 或 exe 64位机器取决于系统。

最佳答案

您不能,因为 MSI 格式要求您指定处理器架构。因此,您必须创建两个单独的 .msi 文件,但您至少可以从 Wix 中的同一项目文件生成它们,这可以避免一些重复的工作。

我用这个:

<?if $(var.Platform) = x64 ?>
<?define ProductName = "InsomniacGeek: Windows Setup Test (64 bit)" ?>
<?define Win64 = "yes" ?>
<?define PlatformProgramFilesFolder = "ProgramFiles64Folder" ?>
<?else ?>
<?define ProductName = "InsomniacGeek: Windows Setup Test" ?>
<?define Win64 = "no" ?>
<?define PlatformProgramFilesFolder = "ProgramFilesFolder" ?>
<?endif ?>


<Package InstallerVersion="200" Compressed="yes" InstallScope="perMachine" Platform="$(var.Platform)"/>

然后您必须构建项目并创建 32 位 Msi 和 64 位 Msi。

关于wix - 32 位和 64 位的单个 MSI 取决于目标机器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15059520/

相关文章:

iis - 方括号 [] 语法在 WiX 中是什么意思

wix - '错误-2147467259 : failed to create SQL database' in WiX

wix - 如何在 WiX 中读取自定义操作的可执行输出?

c# - x64 中的 Visual Studio 设计器不起作用

objective-c - 什么是非脆弱 ABI?

使用 x64 目标平台的 C# 安装程序在 Windows 7 64 位操作系统中不支持

c++ - 地址窗口扩展

installation - 从 wix 中的用户选择设置属性值

python ctype 字符串指针 32b 与 64b : segmentation fault (core dumped)

assembly - 为什么我的代码在添加 .386 时不起作用?