1

We are using heat executable to generate an authoring file, where a unique component is created for each file. Is there a way to include multiple files under a single component.

Expected result:

<component Id="samplecomponent"  Directory="INSTALLFOLDER" Guid="*">
   <File Id="file1.txt" Source="$(var.Sourcedir)\file1.xml" />
   <File Id="file2.txt" Source="$(var.Sourcedir)\file2.xml" />
   <File Id="file3.txt" Source="$(var.Sourcedir)\file3.xml" />
</Component>
Santhosh
  • 671
  • 12
  • 36
  • I don't think **`heat.exe`** can do this - at least not in Version 3.11. There is the [**Paraffin**](https://github.com/Wintellect/Paraffin) tool though. Maybe have a quick read. – Stein Åsmul Oct 16 '18 at 16:01
  • @SteinÅsmul Thanks again. Paraffin has deprecated the feature to have multiple files per component. https://www.wintellect.com/zen-of-paraffin/ – Santhosh Oct 17 '18 at 06:19
  • Oh, I did not know. Thanks for the update. I have always preferred one file per component - it avoids all kinds of problems (for `patching`, `upgrades`, `self-repair`, `etc...`): [**Change my component GUID in wix?**](https://stackoverflow.com/questions/1405100/change-my-component-guid-in-wix/1422121#1422121). – Stein Åsmul Oct 17 '18 at 07:23
  • Oh, you are the guy with [that massive package](https://stackoverflow.com/q/52520739/129130) - so you want to use multiple files per component for performance reasons (several speed optimization tips in that link, but none that made a huge impact. I am out of ideas, sorry). I honestly think you have to investigate splitting the package in several MSI files :-( and use Burn as a bootstrapper - or check if the code is still in Paraffin to do multiple files per component so you can just enable it for your own build? It is not unheard of to use a non-MSI package for huge deployments. – Stein Åsmul Oct 17 '18 at 07:48
  • Hey, @SteinÅsmul Yes it is me still figuring on how to improve the performance. Our msi design is such that we do not support upgrades and patches. The problem with splitting the packages into smaller MSI is that we have many custom UI dialogs in the current setup, recreating these dialogs with burn bootstrapper UI is not feasible. – Santhosh Oct 17 '18 at 08:38
  • Will check the Paraffin source code to see if the functionality is available still, but however Paraffin publishes that this feature is available in 3.13 release, but the link to the 3.13 version seems to be broken. https://www.wintellect.com/devcenter/media/Default/Blogs/Files/sample_files/Paraffin-3.131.zip My bad. – Santhosh Oct 17 '18 at 08:42
  • Maybe [try the 3.7.0 release straight from github](https://github.com/Wintellect/Paraffin/releases)? (bottom, [direct link](https://github.com/Wintellect/Paraffin/archive/3.7.0.zip)). And you can also - if you dare - download via the wayback machine: [Paraffin 3.131](https://web.archive.org/web/20160405002627/http://www.wintellect.com/devcenter/media/default/blogs/files/sample_files/paraffin-3.131.zip). Seems OK, passes virustotal.com. Not recommended since the author has deprecated it. – Stein Åsmul Oct 17 '18 at 09:17
  • @SteinÅsmul Thank you. Paraffin 3.131 version works. It helps to create a single component with multiple files. – Santhosh Oct 22 '18 at 10:01
  • As you will have read in the other links above - multiple files pre component generally makes it difficult to use minor upgrades & patching, but you might not need it? Good testing is in order. Very often you are asked to upgrade a handful of files, and then it is very undesirable to use major upgrades and uninstall / reinstall the whole product as opposed to a minor upgrade. It all depends on what you are asked to deliver and how stable the release really is. – Stein Åsmul Oct 22 '18 at 10:36
  • I added an answer below to summarize for other people facing the same problem. Good luck with this approach. It can work, but side-effects for upgrades are very likely. – Stein Åsmul Oct 22 '18 at 10:43
  • Thanks @SteinÅsmul. Upgrades are not an issue, as we do not support upgrades. – Santhosh Oct 22 '18 at 11:10

1 Answers1

1

Paraffin 3.131 version works to help you create multiple files per component, but please read the disclaimers below (and the links in the comments above).

It should be noted that this feature has probably been deprecated from Paraffin for good reason (and never seen in WiX's own heat.exe as far as I know), since it tends to make minor upgrades and patching almost impossible to use. This has to do with the overall complexity of MSI - particularly with regards to upgrades. There could also be other reasons for Paraffin deprecating the feature, for example that it is too complex to maintain. I don't know.

I always prefer one file per component - it avoids all kinds of problems (for patching, upgrades, self-repair, etc...). Here are some technical details: Change my component GUID in wix?

However, Santhosh has problems with a package that is so large that its installation performance is too slow, even after having applied a number of tricks to speed it up (limit costing, use admin image, etc... - see link). My preferred alternative in such cases is to split the package into several MSI files and install them with a bootstrapper in sequence - for example using WiX's Burn bootstrapper. This is not always acceptable of course. Sometimes a single MSI is crucial.

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