7

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?

0

4 Answers 4

9

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
  • Since I noticed this answer is getting a lot of attention lately, I thought I should update it with some more information. And one of the links was dead. I haven't really tested this, but it's the direction I would go in. Let me know if there are problems with it and I will update the answer. Commented Jan 6, 2016 at 18:03
1

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.

4
  • Is this allowed as per Apple's terms of service for distributing Bonjour? Commented Dec 31, 2015 at 21:20
  • @Andrey - This is not the right answer in fact as you point out, probably illegal. Check other answers about bootstrapper: stackoverflow.com/questions/8727057/… you need to bootstrap with Bonjour.msi ou Bonjour64.msi Commented Jan 2, 2016 at 11:02
  • @SimonMourier actually, after reading their terms of service, it seems (to me) that this may indeed be legal, no? Commented Jan 2, 2016 at 20:47
  • I doubt it (in general you never can disassemble something you don't own, only distribute it, and sometimes you can't even do that) but I'm not a lawyer :-) Commented Jan 3, 2016 at 7:36
1

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

0

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/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.