2

I don't know much about wix tools.

I have a project that needs to be packaged in many msi packages. The number of files is about 700. The difference between each msi package mainly in the architecture (x86, x64) and a small set of variable resources (no more than 5-10 files).

Full build takes more than one hour. Most of the time is taken by light.exe.

Is it possible to somehow cache the result of work in order to speed up this process, since each msi differs by a minimum set of files? Maybe I should organize the files in a special way to make this possible?

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164
Aries
  • 433
  • 7
  • 17

2 Answers2

1

You can define a single cabinet file for your shared files and individual cabinet files for unique sets of files. Use conditional compilation using defines to include only select cabinets in the MSI file.

<Media Id="1" Cabinet="Shared.cab" CompressionLevel="high" VolumeLabel="Shared binaries." EmbedCab="no" />
<Media Id="2" Cabinet="Set1.cab" CompressionLevel="high" VolumeLabel="Unique files 1" EmbedCab="no" />
<Media Id="3" Cabinet="Set2.cab" CompressionLevel="high" VolumeLabel="Unique files 2" EmbedCab="no" />

On the <File> element set the DiskId="" attribute to associate a single file with target cabinet.

Light should be able to use existing cabinets from cache when input files does not change between you different builds.

Jozef Izso
  • 1,740
  • 15
  • 22
1

Computer and Disk: The obvious first: are you working of a fast disk on a good computer? Or are you pulling files from the network or writing to slow disks? 700 files is not that much. Are they very big? How many setups are you building? A good SSD or NVME disk should help - also some good CPU behind it.

Build Speed: I have this existing answer on build optimization: Speed up Build-Process of WiX-Installer - I would recommend you build a shared setup and install via a WiX Burn setup.exe bundle (Burn builds setup.exe executables that can install embedded MSI files or other setup-type files). A separate MSI that you build seldomly can work. Thoughts on setup cohesion and coupling.

WiX Help File: How To: Optimize build speed

Cab Cache & wixlibs: Please read this:


Links:

Stein Åsmul
  • 39,960
  • 25
  • 91
  • 164