如何为Windows Installer创建必备软件包? [英] How do I create a Prerequisite Package for Windows Installer?

查看:231
本文介绍了如何为Windows Installer创建必备软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以为我提供有关创建可在WiX中使用的必备软件包的很好的介绍吗?这些和引导程序包"一样吗?

Can anyone point me to a good introduction on creating prerequisite packages that can be used in WiX? Are these the same thing as "bootstrapper packages"?

这将基于C#Windows桌面应用程序(实际上是 ASCOM驱动程序). NET Framework 4.7.1.

This will be for a C# Windows desktop application (actually an ASCOM driver) that is built on .NET Framework 4.7.1.

推荐答案

单独的MSI :我更喜欢通过单独的MSI部署先决条件,然后将其捆绑在一个刻录捆绑 setup.exe 高级安装程序 Installshield (套件项目).我之所以这样,是因为我可以在不接触主MSI的情况下更新前提条件.

Separate MSI: I prefer to deploy prerequisites via a separate MSI and then bundle it all in a Burn-bundle setup.exe or the equivalent constructs from Advanced Installer or Installshield (suite projects). I like this because I can update the prerequisite without touching the main MSI.

合并模块 :Windows Installer中用于部署许多应用程序共享的先决条件或组件的内置机制是合并模块. 合并模块 是片段数据库在编译时合并到了主MSI数据库中(某种形式的静态链接).使用这些模块,可以以正确的方式对所有文件进行引用计数,从而可以确定在卸载时是否可以卸载文件,或者是否还有其他应用程序仍在使用运行时/先决条件组件.记录:使用MSI,卸载必备MSI会使依赖它的所有应用程序立即失败.我发现这很好,特别是对于您可能需要的企业部署(例如,轻松地降级到以前的必备版本).

Merge Module: The built-in mechanism in Windows Installer intended to deploy prerequisites or components shared by many applications is a merge module. Merge modules are fragment databases merged into the main MSI database at compile time (sort of static linking). Using these modules make all files reference-counted in the right way making it possible to determine if the file can be uninstalled on uninstall, or if there are other applications still using the runtime / prerequisite component. For the record: with an MSI, uninstalling the prerequisite MSI makes all applications that depend on it fail immediately. I find this OK, especially for corporate deployment where this is what you might want (for example to downgrade to a previous prerequisite version easily).

WiX包含文件 :有一种WiX替代方法可以合并模块.以下是描述它们的两个答案-本质上就像C ++包含文件,您可以将它们包含到许多源文件中:

WiX Include Files: There is a WiX alternative to merge modules. Here are two answer which describe them - essentially like C++ include files that you can include to many source files:

  • How to express a file dependency using WiX
  • Setup-Flavours

基本构造 :

Basic construct:

<?include include.wxi ?>

我会使用自动组件GUID .

个人意见 :我不喜欢合并模块,因为它们已合并到许多软件包中,突然之间您必须重新构建它们以进行新的合并模块更新?内聚力和耦合性不好? (此处未达成共识).请注意,由于Windows Installer的设计,安装具有更新的先决条件的一个程序包足以为使用合并模块安装的所有应用程序更新系统.为什么?因为新软件包-如果正确编写了合并模块-应该升级所有共享文件.对于未安装使用同一合并模块的许多其他应用程序的系统,您仍然需要更新所有安装程序以在其中获得新的合并模块版本.所以你就那么远了?

Personal Opinion: I don't like merge modules because they are merged into so many packages, and suddenly you have to rebuild them all for a new merge module update? Bad cohesion and coupling? (no consensus here). Note that due to the design of Windows Installer it is enough to install one package with updated prerequisites to update the system for all applications that use the merge module to install. Why? Because the new package - if the merge module is properly authored - should upgrade all shared files. You still need to update all installers to get the new merge module version in there for systems that don't have many other applications installed that use the same merge module. So you are just as far?

COM :每个人最喜欢的传统技术:COM.对于进程外COM文件(EXE文件),我假设您需要注册 AppId 以及 Class guid ProgIds .为类和程序使用正确的表,我相信应该尝试AppId表.某些设置需要进入注册表表.

COM: Everyone's favorite legacy technology: COM. For out of process COM files (EXE files) I assume you need to register the AppId as well as the Class guid and ProgIds. Use the proper tables for classes and progids, and I believe the AppId table should be tried. Some settings need to go into the registry table.

商业工具对COM具有很多自动魔术功能,但是WiX不幸地面临一些挑战.这是有关COM注册表数据提取的一小段内容: 用WIX注册COM EXE .我认为需要一些时间.

Commercial tools feature a lot of auto-magic for COM, but WiX unfortunately has some challenges. Here is a messy piece on COM registry data extraction: Registering COM EXE with WIX. Will take some time I think.

WiX工具箱中的工具 heat.exe 可以提取dll文件的COM信息,但不能从EXE文件和64位组件中提取COM信息. WiX的商业分支Firegiant拥有可以完成所有任务的工具.

The tool heat.exe from the WiX toolkit can extract COM information for dll files, but not from EXE files and not from 64-bit components. The commercial branch of WiX, Firegiant has a tool that does it all.

链接 :

Links:

  • Merge Modules
  • Removing Default dialogs from MSI
  • DLL not registered when connecting to the computer with a different account
  • WiX (Windows Installer Xml), Create universal variables

这篇关于如何为Windows Installer创建必备软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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