问题
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>
回答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.
来源:https://stackoverflow.com/questions/52837754/generate-wix-authoring-files-to-contain-multiple-files-under-a-single-component