Multi-Product Shared Component Setup with WiX and

2020-02-13 02:40发布

Pitch

I'm looking for high level advise on how to structure a WiX and Burn MSI based installer solution for an application suite.

Question

Given the layout below how many distinct MSI packages should an installer suite utilize when all apps/features and shared libs go into the same installation directory?

  • One single MSI package for the whole suite is clearly too large (as shown by the current system)
  • One (complete) MSI package per application would duplicate the dll libraries shared between the apps, which would mean a duplication of 100s of MB worth of DLLs. (Plus, to me, unknown headaches with MSI refcounting)
  • One MSI package per binary library and executable?
    • I.e., many MSI files would only contain a single DLL or a single EXE
    • Can I make sure the EXE MSI package is only installed when its prerequisite library packages are installed?

Background

Our application suite is layed out a bit like MS Office in that we have one installation folder where a series of applications is installed to together with all their shared library files. That is:

 C:\ProgramFiles\MyApplicationSuite
                                   \ - App1.exe
                                   \ - App2.exe
                                   \ - App3.exe
                                   \ - ...
                                   \ - libxy.dll
                                   \ - qt.dll
                                   \ - ...

Up until now, we had one single InnoSetup installer, that could install all of the apps as features, that is, there was only one single Programs entry in the Windows Programs list. This worked well because most of the time the whole suite was installed anyway, and some installations would maybe not use one or two apps.

Since the single setup approach start to break, and Corporate Requirements force me to switch to an MSI based installation, I'm looking into how to structure such a beast the best way using WiX, Burn and granular MSI packages.

1条回答
我想做一个坏孩纸
2楼-- · 2020-02-13 02:55

Some thoughts along the lines of what you already state on the topic of splitting or merging setups: Wix to Install multiple Applications. Have a skim of this and see if there are any variables that apply (release schedule, localization, build speed, etc...).

You can use merge modules or WiX include files (basically works like a normal header file include in C++, it is a preprocessor operation) to include shared components in several setups. They will then be properly reference counted and you can distribute updates to them in a controlled fashion.

Personally I like to split shared components completely away from my main MSI and install them via a separate prerequisite setup and then bundle it all together in a bootstrapper made with Burn or equivalent toolkits designed to allow installation of several MSI and / or EXE files in sequence. I find this yields good cohesion / coupling. This is debatable. An MSI is more "self-contained" when it contains shared, embedded components (merge modules / include files), but particularly for corporate deployment I like to split all shared components to their own prerequisite MSI. There are some very technical reasons for this that I would need more time to explain than what is available.

I will leave it at that for now, possibly returning and updating later.


Some Links (primarily for easy retrieval):

查看更多
登录 后发表回答