7
votes

I've been asked to bundle Apple's Bonjour installer into our own msi installer, so that Bonjour automatically gets installed alongside our software. Anyone done this before? It doesn't seem to be trivial, as an msi installer cannot include and kick off another one. I assume I'd need some kind of batch file to run the two installers sequentially?

4

4 Answers

9
votes

You'll need to use a bootstrapper to chain the Bonjour install with your installer. If you are using WiX 3.6 or later, using Burn to create a package bundle is a good option.

I found the Bonjour installer by downloading the Bonjour SDK and opening it in 7-zip, though I'm sure installing the SDK would provide access to it as well.

The way I typically like to do this is to add a new source file to your setup project for each dependency package to keep that logic separate from the main application setup.

The Bonjour package can be listed as a remote payload to retrieve on the fly, or build it into your setup. In this case, it seems more likely to build it in (Compressed="yes"). If you need to add any extra dependencies related to bonjour or parameters to pass into it, you could define them here as well.

<Fragment>
    <!-- if a web link actually exists, I didn't find it... -->
    <?define BonjourWebLink = "http://path/to/Bonjour.msi"?>

    <PackageGroup Id="BonjourWeb">
        <MsiPackage Id="BonjourWeb"
                    Compressed="no"
                    DownloadUrl="$(var.BonjourWebLink)">
        </MsiPackage>
    </PackageGroup>

    <PackageGroup Id="Bonjour">
        <MsiPackage Id="Bonjour"
                    Compressed="yes"
                    SourceFile="path\to\Bonjour.msi"/>
    </PackageGroup>
</Fragment>

In your main bundle you just need to add a reference to the correct package group.

<Chain>
    <PackageGroupRef Id="Bonjour"/>

    <MsiPackage SourceFile="path\to\YourProduct.msi"/>
</Chain>

Since Bonjour uses MSI instead of an executable, you don't need to do anything to detect whether it is present or not; Burn will handle that for you. Actually, since WiX harvests most of the information your bundle needs from the MSI, this might be overkill, and you could just put in the MsiPackage element in your chain directly.

Don't forget to carefully check Apple's terms for doing this.

1
votes

You need a bootstrapper; there are several freely available out there, including one being developed in WiX called Burn.

1
votes

This would be a bit more work, and is prone to issues with upgrading, but you can take the Bonjour MSI and decompile it using dark. Convert the decompiled MSI into a Merge module that can be included with your installer, and you will have a single install. I have done this with some driver installs in the past, and it is usually not that complicated.

0
votes

Wix Burn is relatively stable now.I`m using Wix 3.8.

If you are allowed to redistribute Bonjour Installer,you can chain the installer in Wix Burn. You can even put a condition to specify Bonjour as prerequesite for your installer.If it is not present,then Bonjour will be deployed, else it can be skipped.

You can check this link for understanding Burn.

http://wixtoolset.org/documentation/manual/v3/bundle/