简体   繁体   English

WiX将x86和x64 msi的引导程序刻录到单个No-UI引导程序中

[英]WiX burn bootstrapping x86 and x64 msi's into single No-UI bootstrapper

I have x64 and x86 versions of my installer .msi, and want to ship a single executable which simply checks the machine architecture and runs the x86/x64 MSI . 我有安装程序.msi的x64和x86版本,并希望附带一个可执行文件,该可执行文件仅检查计算机体系结构并运行x86 / x64 MSI The MSIs are basically identical, they install the same AnyCPU files, which I bundle in a shared .cab file so as not to double the size of the installer. MSI基本相同,它们安装相同的AnyCPU文件,我将它们捆绑在共享的.cab文件中,以免使安装程序的大小增加一倍。

So far I've tried WiX Burn, which pops up a GUI which I don't want (I just want to use the MSI GUI), and I tried disabling the burn GUI via /silent flag - this propagates this flag to the MSIs so it disables all GUI for MSIs (not what I want). 到目前为止,我已经尝试了WiX Burn,它弹出了一个我不需要的GUI(我只想使用MSI GUI),并且我尝试通过/ silent标志禁用Burn GUI-这会将标志传播到MSI因此它禁用了所有MSI的GUI(不是我想要的)。

I think I am correct when I say there is no default No-GUI version of Burn bootstrapper , and to create one you must edit the source code yourself? 当我说没有默认的No-GUI版本的Burn bootstrapper时 ,我认为我是正确的,要创建一个默认版本,您必须自己编辑源代码? This sounds like a massive missing feature? 这听起来像一个巨大的缺失功能?

I've also tried DotNetInstaller which has it's own set of problems with a confusing user interface. 我也尝试过DotNetInstaller,它具有一系列令人困惑的用户界面问题。 I've also tried setupbld which does not support MSIs with an external cab. 我也尝试过setupbld,它不支持带有外部驾驶室的MSI。

For the architecture detection you could use the InstallCondition attribute in the MsiPackage element. 对于体系结构检测,您可以在MsiPackage元素中使用InstallCondition属性。

To put it simply try: 简单地说:

<MsiPackage SourceFile="..\Example\bin\Release\x86\example.msi" Compressed="no" InstallCondition="NOT VersionNT64" />
<MsiPackage SourceFile="..\Example\bin\Release\x64\example.msi" Compressed="no" InstallCondition="VersionNT64" />

Sources: http://wix.sourceforge.net/manual-wix3/wix_xsd_msipackage.htm 资料来源: http : //wix.sourceforge.net/manual-wix3/wix_xsd_msipackage.htm

As the other answers suggest you can use the VERSIONNT64 variable to check the on which platform you are installing. 其他答案表明,您可以使用VERSIONNT64变量来检查要在哪个平台上安装。

Wix Burn supports NO-GUI or quiet mode by passing the command line parameter "-q". Wix Burn通过传递命令行参数“ -q”来支持NO-GUI或安静模式。

Along with that it supports the following other arguments too: 除此之外,它还支持以下其他参数:

The wixstdba supports only the "standard package switches": wixstdba仅支持“标准软件包开关”:

-q, -quiet, -s, -silent = silent install 
-passive = progress bar only install 
-norestart = suppress any restarts 
-forcerestart = restart no matter what (I don't know why this is still around) 
-promptrestart = prompt if a restart is required (default) 
-layout = create a local image of the bootstrapper (i.e. download files so they can be burned to DVD) 
-l, -log = log to a specific file (default is controled by bundle developer) 
-uninstall = uninstall 
-repair = repair (or install if not installed) 
-package,-update = install (default if no -uninstall or -repair) 

Type your wixburnexename /? 输入您的wixburnexename /? To get the details on your machine. 在您的机器上获取详细信息。

You could use custom actions and Burn Built-in Variables to check whether you are running on X86 or x64. 您可以使用自定义操作和“ 刻录内置变量”来检查您是在X86还是x64上运行。 Based on this you could execute/arrange the list of actions. 基于此,您可以执行/安排动作列表。

<InstallExecuteSequence>
   <Custom Action="Windows32bitInstall" After="InstallFiles">NOT VersionNT64</Custom>
   <Custom Action ="Windows64bitInstall" After="InstallFiles" >VersionNT64</Custom>
   <Custom Action="InstallHelp" After="Windows64bitInstall">NOT Installed</Custom>
</InstallExecuteSequence>

This would execute with the same elevation. 这将以相同的高度执行。

<CustomAction Id="InstallHelp" Directory="ProgramFilesFolder"
          Execute="deferred" Impersonate="no" Return="ignore"
          ExeCommand="[HELPDIR]\help.exe /log" />

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

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