One MSI for 32-bit and 64-bit

▼魔方 西西 提交于 2019-12-08 05:47:36

问题


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.

I have tried this:

<?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?


回答1:


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

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.

Edited to add: This question and its answers are a great WiX resource.



来源:https://stackoverflow.com/questions/12244648/one-msi-for-32-bit-and-64-bit

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!