From 27a0db4070a2b5756282bf15b957dd7f0021417f Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Thu, 10 Feb 2022 18:09:34 -0600 Subject: When rolling back a bundle failure, reinstall all upgrade related bundles. Fixes #3421 --- .../WixToolset.Mba.Core/BootstrapperApplication.cs | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs') diff --git a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs index f277425e..b08e66c0 100644 --- a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs +++ b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs @@ -271,6 +271,9 @@ namespace WixToolset.Mba.Core /// public event EventHandler SetUpdateComplete; + /// + public event EventHandler PlanRestoreRelatedBundle; + /// /// Entry point that is called when the bootstrapper application is ready to run. /// @@ -1321,6 +1324,19 @@ namespace WixToolset.Mba.Core } } + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlanRestoreRelatedBundle(PlanRestoreRelatedBundleEventArgs args) + { + EventHandler handler = this.PlanRestoreRelatedBundle; + if (null != handler) + { + handler(this, args); + } + } + #region IBootstrapperApplication Members int IBootstrapperApplication.BAProc(int message, IntPtr pvArgs, IntPtr pvResults, IntPtr pvContext) @@ -2042,6 +2058,16 @@ namespace WixToolset.Mba.Core return args.HResult; } + int IBootstrapperApplication.OnPlanRestoreRelatedBundle(string wzBundleId, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) + { + PlanRestoreRelatedBundleEventArgs args = new PlanRestoreRelatedBundleEventArgs(wzBundleId, recommendedState, pRequestedState, fCancel); + this.OnPlanRestoreRelatedBundle(args); + + pRequestedState = args.State; + fCancel = args.Cancel; + return args.HResult; + } + #endregion } } -- cgit v1.2.3-55-g6feb