[英]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.