I'm trying to create a Bootstrapper installer that will install My app plus one third party applications needed to run my application.
The third party application is an .exe package with a lot of complementary files.
My question is, How do I include the third party application into my Bundle? Do I have too add all the complentary files (100+ files) as payloads?
the below code is how I have set up my Bundle so far, it is compiling but not installing, the log says that the bootstrapper .exe can't find my .msi (my app) nor the .exe (third party app)
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
<Bundle Name="My_app"
Version="1.0.0.0"
Manufacturer="untitled"
UpgradeCode="4d2de235-2286-4b06-8cfa-3f6ff3174244">
<BootstrapperApplicationRef Id="WixStandardBootstrapperApplication.RtfLicense" />
<Chain>
<MsiPackage
Id="MyApp_msi"
SourceFile ="MyApp\MyApp.msi"
Vital ="yes"/>
<PackageGroupRef Id="thirdParty_package" />
</Chain>
</Bundle>
<Fragment>
<PackageGroup Id="thirdParty_package">
<ExePackage
SourceFile="thirdParty\Setup.exe"
InstallCommand="/q /ACTION=Install"
RepairCommand="/q ACTION=Repair /hideconsole"
UninstallCommand="/q ACTION=Uninstall /hideconsole"/>
</PackageGroup>
</Fragment>
</Wix>
Agreed it is a pain to generate the payload manually for installers with many files! Here is a small powershell script to generate the payload xml given a path. It will generate guids to use as id, recurse the folder and reproduce the folder structure.
Yes, you have to list every Payload. It is convenient to put them in a PayloadGroup.
There are quite a few ways to generate a PayloadGroup. One way is to use/abuse heat to harvest a directory. This would be the same way as harvesting a directory for a Setup project.
As an example, let's package WiX's bin directory.
If you are using MSBuild (including via Visual Studio), you can configure the harvest by adding something like this to the project file:
When the build runs it adds the output .wsx (in the obj) folder to the build. (You don't need to see it.)
Notice that it uses a pre-processor variable to give the actual location of the source files. To pass the value, define it in the project properties. Or, as XML in the .wixproj:
Finally, the XSL transform (FilesToPayloads.xsl) that heat will apply to its normal harvest output:
It's a rather trivial transliteration of File to Payload and the surrounding DirectoryRef to a PayloadGroup.