[wix-users] Nested bundles

Phill Hogland phill.hogland at rimage.com
Wed Mar 23 10:46:16 PDT 2016


I authored some 'bob's'  (Bundle of Bundles per Bob A) a while back, and all I did is 
1) Define the base or parent bundle
<RelatedBundle Action='Detect' Id='$parent GUID)' />

2) Then in the Addon (or Patch or ?) related bundle author"
    <RelatedBundle Action='Detect' Id='$(This bundle's GUID)' />   (I do this just in case I want to add something at a later date)
    <RelatedBundle Action='Addon' Id='$(the Parent bundles GUID)' />

3) Then the ExePackage is like this:
  <Fragment>
    <!-- Contrary to the chm, DetectCondition must be specified when the package is a Bundle. http://wixtoolset.org/issues/3693/ -->
    <PackageGroup Id="bob_bundle">
      <ExePackage Id="bob_bundle" PerMachine="yes" Permanent="no" Vital="yes" Protocol="burn"
                  Compressed="no"
                  DownloadUrl="!(wix.RdpReleaseUrl){2}"
                  Name="bob_bundle\bob_bundle.exe"
                  SourceFile="bob_bundle.exe"
                  InstallCondition="1=1"
                  DetectCondition="1=0"
                >
        <ExitCode Value="3010" Behavior="scheduleReboot" />
      </ExePackage>
    </PackageGroup>
  </Fragment>

and I use the -b Linker flag to define the base of the source path.

I use an mba but I did not have to implement any special behavior in the handlers, other than the same behavior that I found in the WixBA code in the wix src files.  I think the trick is to use ExePackage@/Protocol=burn" and let the Burn engine do it's default behavior.

________________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Hoover, Jacob <Jacob.Hoover at greenheck.com>
Sent: Wednesday, March 23, 2016 11:49 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Nested bundles

<RelatedBundle Id="GUID_1" Action="Detect />

Would get your BA to detect it, but you would have to handle the detection and set a burn variable.  I think you would have to do a custom BA in order to handle those events.

I could see it as a valid feature request that RelatedBundle should support a Variable attribute that during a Detect action, we could assign its value based on the currently related bundles state (installed vs absent, and possibly if we wanted to get real fancy we could also support reading some of the other bundle properties).

https://github.com/wixtoolset/issues/issues/3693/ was another suggested approach where we should add a BurnPackage element, that would handle all the details for you automatically.


-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Parkes, Kevin
Sent: Wednesday, March 23, 2016 11:04 AM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Nested bundles

I have a bundle which I would like to include as an ExePackage within another bundle.

In the outer bundle I have a util:ProductSearch for the UpgradeCode of the inner bundle (the result of which I use in ExePackage at DetectCondition). So, something like:

Bundle1.wxs
  <Bundle ... UpgradeCode="GUID_1"/>

Bundle2.wxs
  <util:ProductSearch ... UpgradeCode="GUID_1" Result="state" Variable="BUNDLE1_STATE"/>
  <ExePackage ... DetectCondition=" BUNDLE1_STATE <> 2"/>

However,  the ProductSearch, with Result="state", is coming back as 2 (absent) so the inner bundle isn't being removed on uninstall. From the uninstall log:
    Product or related product not found: {GUID1}
    Setting numeric variable 'BUNDLE1_STATE' to value 2

What am I doing wrong?

Thanks



____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/



More information about the wix-users mailing list