2
votes

Is it possible to make a WiX installation bundle with size of total .msi's and exe's inside bundle more than 2GB? Currently in my .wxs template I have a <chain> inside of a <bundle> that contains multiple <MsiPackage>'es. I haven't created that WiX template on my own, I'm just improving/fixing bugs in a legacy project, so I am not very proficient with the WiX toolset. Anyway, then I create a .wixobj out of that .wxs template with candle.exe and this .wixobj I feed to light.exe. It seems that if total size of content to link is more than 2GB light.exe fails with error:

error LGHT0306 : An error (E_FAIL) was returned while finalizing a CAB file. This most commonly happens when creating a CAB file with more than 65535 files in it. Either reduce the number of files in your installation package or split your installation package's files into more than one CAB file using the Media element.

I looked for solution and one suggestion was to use <MediaElement> but that one is only available in a <product> tag which I guess I cannot use in my situation, because the bundle that I am cooking has a custom bootstrapper embedded, and as far as I understood wix product template is not about bootstrapper applications. Another opinion that I found was that you can't create WiX bundle with size of single package more than 2GBs, but that is not exactly my case, because each package I am bundling is no more than 700MBs.

I have already tried separating <MsiPackage>s into <PackageGroup>'s in separate <Fragment>'s which was referenced in <Bundle>'s <chain> in <PackageGroupRef>, but it didn't help, light.exe throws the same error. I have also found a suggestion to try to put packages into separate <Container>s in <bundle>, but I didn't manage to try it because I didn't understand how to do it, WiX bundle documentation just mentions that the are some containers but never actually gave an advice on how to use them.

I am using WiX 3.11

UPD: I just wanted to add some clarifications. My goal is to make a bundle what would be a single .exe file with all related .cab's and other stuff embedded into the final bundle, so delivering bundle that consist of .exe bootstrapper and multiple external .cab file isn't really a preferred option even though it might be x times faster unless this is the only solution in my case.

UPD 2: It seems that yet you can assemble a bundle with 2 GBs + size, it won't start. Maybe because the output executable is x86, and windows can't launch x86 executables over 2gbs size. I didn't manage to make an x64 bundle, maybe that would work, but I never found how to do it. Guess the only option is to let users download missing content and make bundle only contain essential parts. Thanks everyone for help.

1
Added a sample for the Containers, but when I got a chance to run it properly there were some issues with launching the embedded setups. Will have a look tomorrow. It did work to compile a setup over 2GB though.Stein Åsmul
Did you read the "Go Online" segment of my answer and check the links? Often it is possible to slim setups down dramatically by putting stuff online. Well, at least sometimes. That also yields more maintainable files, and obviously opens up for the application not being able to operate if the server files are ever removed.Stein Åsmul
I did. We kind of already have this implemented. This wix bundle I am trying to build already contains an executable that allows users to download and update items that are shipped with bundle, so we can generate the bundle with minimum content and let users to download stuff on their own. But the task was to enable bundle that would contain all the content, which currently exceeds 2gbs cap for WiX.Allen K
I am not sure how much it matters, but there is the high compression setting for CABs in MSI files: <MediaTemplate EmbedCab="yes" CompressionLevel="high" />. It might be the default for all I know. I believe it enforces LZX compression. Looks like mszip is default. For certain MSI files this could amount to quite a bit, for others probably very limited.Stein Åsmul
Did you get this resolved?Stein Åsmul

1 Answers

1
votes

Compressed bundles cannot be bigger than 2GB. Burn supports containers up to 2GB each and only one container can be attached to the bundle .exe itself.