1 个 MSI 用于 32 位和 64 位 [英] One MSI for 32-bit and 64-bit

查看:46
本文介绍了1 个 MSI 用于 32 位和 64 位的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以给我一个很好的例子或为我设置正确的方向以启用我的 32 位和 64 位安装程序.我使用的是 Wix 3.6.

Can anyone give me a good example or set me on the correct direction to enable my installers for 32-bit and 64-bit. I am using Wix 3.6.

我已经试过了:

<?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)" />

但是它不喜欢这个,它说平台属性无效,有没有人有这个功能并且可以帮助我吗?

It doesn't like this however, its says the Platform attribute is invalid, has anyone got this functioning and could help me please?

推荐答案

我就是这样做的,而且效果很好.

That's exactly the way I do it, and it works perfectly well.

您会在 Votive 中看到一条波浪线和一条警告,因为文字文本 $(var.Platform) 不是在 XML Schema for WiX 源文件中定义的平台枚举值之一.一旦预处理器处理完文件,该属性的值就有效,candle 会很乐意接受它.

You get a squiggly line and a warning in Votive because the literal text $(var.Platform) isn't one of the platform enumeration values defined in the XML Schema for WiX source files. Once the preprocessor finishes with the file, the attribute's value is valid and candle will happily accept it.

编辑添加: 这个问题其答案是很棒的 WiX 资源.

这篇关于1 个 MSI 用于 32 位和 64 位的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆