0

I have a Compressed file (Self-extracting) that was included as a ExePackage for the current BootStrapper project I'm working on.

I was asked to Unzip the package before including it in the BootStrapper, so that the end user doesn't have to unzip the file before starting the install process of that package.

Excluding the install application, there is two folders (win32 && win64) that contain 288 files each, I need to create a PayloadGroup out of these files. I started doing this by hand, but after looking at Heat element, I saw that Heat can generate Payloadgroup.

How can I harvest from the directories the Payloadgroup that is required for this package.

Doing this manually is a very long process ...

CheGueVerra
  • 7,849
  • 4
  • 37
  • 49

2 Answers2

1

If using Visual Studio you're supposed to be able to go in your setup project's references and click on the reference in question and set Harvest to true.

If I recall this had some issues, and some online sources said it wasn't working for them, I'm not sure at the moment. Which is why I called heat from the command line in a post-build event. Something like this:

call "$(WIX)bin\heat.exe" dir "$(TargetDir)." -var var.$(ProjectName).TargetDir -dr INSTALLFOLDER -cg Binaries -gg -g1 -ag -scom -sreg -sfrag -srd -o "$(SolutionDir)Setup$(ProjectName)\$(ProjectName).Binaries.wxs"

You can even specify an XSLT transform that filters your generated wxs file. For more info check this helpful blog post

user145400
  • 1,076
  • 1
  • 12
  • 27
  • The Zip file is not included in the BootStrapper, the link shows how to create components from a projet and eliminate parts that you don't want included. So I should create a xslt file that will transform the Harvest of the Directory into one that creates the Payload.wxs? – CheGueVerra Oct 02 '14 at 18:08
  • Are you saying the zip file is not in a project in your solution? In that case I'd extract it into a folder that is part of your solution, and point the heat command to that directory. After it generates a wxs file, reference the component group from your main wxs file and it will load in the components for your files. – user145400 Oct 02 '14 at 18:51
  • So the Components become the payload for the ExePackage? – CheGueVerra Oct 02 '14 at 19:24
  • According to http://wixtoolset.org/documentation/manual/v3/overview/heat.html you can use `-generate` to specify payloadgroup. If that doesn't work you can do a search and replace as suggested here http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Installing-a-ExePackage-with-many-payloads-td7586808.html – user145400 Oct 02 '14 at 22:33
  • Yeah, I saw that post, but was sure that since then, generate the Payloadgroup would work ... I guess not. Thanks for the help. – CheGueVerra Oct 02 '14 at 22:59
  • Edit your answer to include the transform with xslt so I can accept the answer – CheGueVerra Oct 02 '14 at 23:00
  • [Documentation](https://wixtoolset.org/documentation/manual/v3/overview/heat.html) of `heat.exe` utility purports to support harvesting 'payloadgroup', but this feature [doesn't exist](https://github.com/wixtoolset/issues/issues/5833) (as of Wix 3.14). Instead of trying to use HeatTransform.xslt to convert the components to Payload directives, I recommend to create an executable utility to harvest the files and generate the appropriate directives yourself using `System.Xml.Linq`. – Mike Rosoft Feb 25 '20 at 10:47
0

I implemented heat.exe dir -generate payloadgroup in v4.0 (https://github.com/wixtoolset/issues/issues/3470). In v3.x, the -generate option was only supported by project harvesting (heat.exe project ...).

Sean Hall
  • 7,629
  • 2
  • 29
  • 44