WiX: using multiple cabs in a very large application

I recently started learning and using WiX, and my first real WiX project was repackaging a Qt user configuration. This was a pretty difficult task, as the Qt project is massive.

I managed to very easily break my path in the process, but recently it has reached a traffic jam. I get the Light.exe message “LGHT0296”, most likely because I created a CAB that was much larger than 2 GB. After you tried to achieve the highest level of compression, and if this does not affect me, the only option left to me is to split the installation package into several CAB files (side note: the returned error was extremely useful for telling me what courses of action to try).

In any case, I lost a little when it came to creating multiple CAB files. I'm not quite sure what I should do in this case, and I could not find any useful documentation or examples where this separation is performed. What is the best way for me to do this?

Thank.

+3
source share
1 answer

You simply declare several media items as follows:

  <Media Id='1' Cabinet='package1.cab' EmbedCab='no'/> 
  <Media Id='2' Cabinet='package2.cab' EmbedCab='no'/>

If you have enough space on the installation media and rather eliminates the time and disk space that the installer uses to unzip files, then you can also put the unzipped files in a folder compared to MSI (you can even create an MSI that installs itself in this way):

  <Media Id='3' Layout="./somefolder" />

, , , DiskId :

  <File Source="./somefile" DiskId="2" />
+5

Source: https://habr.com/ru/post/1733387/


All Articles