Integrate ForwardCompatible and RelatedBundle changes in Burn headers.
Sean Hall committed
Mar 11, 2021 at 19:57 UTC
b036b878a6b477158a22e508ee3a9e8f569f5bf4
20 files changed
+214
-58
src/WixToolset.Mba.Core/BootstrapperApplication.cs
+29
-5
@@ -226,6 +226,9 @@ namespace WixToolset.Mba.Core
226
/// <inheritdoc/>
227
public event EventHandler<SystemRestorePointCompleteEventArgs> SystemRestorePointComplete;
228
229
+ /// <inheritdoc/>
230
+ public event EventHandler<PlanForwardCompatibleBundleEventArgs> PlanForwardCompatibleBundle;
231
+
232
/// <summary>
233
/// Entry point that is called when the bootstrapper application is ready to run.
234
/// </summary>
@@ -1083,6 +1086,18 @@ namespace WixToolset.Mba.Core
1086
}
1087
}
1088
1089
+ /// <summary>
1090
+ /// Called by the engine, raises the <see cref="PlanForwardCompatibleBundle"/> event.
1091
+ /// </summary>
1092
+ protected virtual void OnPlanForwardCompatibleBundle(PlanForwardCompatibleBundleEventArgs args)
1093
+ {
1094
+ EventHandler<PlanForwardCompatibleBundleEventArgs> handler = this.PlanForwardCompatibleBundle;
1095
+ if (null != handler)
1096
+ {
1097
+ handler(this, args);
1098
+ }
1099
+ }
1100
+
1101
#region IBootstrapperApplication Members
1102
1103
int IBootstrapperApplication.OnStartup()
@@ -1120,13 +1135,12 @@ namespace WixToolset.Mba.Core
1135
return args.HResult;
1136
}
1137
1123
- int IBootstrapperApplication.OnDetectForwardCompatibleBundle(string wzBundleId, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, ref bool fCancel, ref bool fIgnoreBundle)
1138
+ int IBootstrapperApplication.OnDetectForwardCompatibleBundle(string wzBundleId, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, bool fMissingFromCache, ref bool fCancel)
1139
{
1125
- DetectForwardCompatibleBundleEventArgs args = new DetectForwardCompatibleBundleEventArgs(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fCancel, fIgnoreBundle);
1140
+ DetectForwardCompatibleBundleEventArgs args = new DetectForwardCompatibleBundleEventArgs(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, fCancel);
1141
this.OnDetectForwardCompatibleBundle(args);
1142
1143
fCancel = args.Cancel;
1129
- fIgnoreBundle = args.IgnoreBundle;
1144
return args.HResult;
1145
}
1146
@@ -1159,9 +1173,9 @@ namespace WixToolset.Mba.Core
1173
return args.HResult;
1174
}
1175
1162
- int IBootstrapperApplication.OnDetectRelatedBundle(string wzProductCode, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, RelatedOperation operation, ref bool fCancel)
1176
+ int IBootstrapperApplication.OnDetectRelatedBundle(string wzProductCode, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, RelatedOperation operation, bool fMissingFromCache, ref bool fCancel)
1177
{
1164
- DetectRelatedBundleEventArgs args = new DetectRelatedBundleEventArgs(wzProductCode, relationType, wzBundleTag, fPerMachine, wzVersion, operation, fCancel);
1178
+ DetectRelatedBundleEventArgs args = new DetectRelatedBundleEventArgs(wzProductCode, relationType, wzBundleTag, fPerMachine, wzVersion, operation, fMissingFromCache, fCancel);
1179
this.OnDetectRelatedBundle(args);
1180
1181
fCancel = args.Cancel;
@@ -1656,6 +1670,16 @@ namespace WixToolset.Mba.Core
1670
return args.HResult;
1671
}
1672
1673
+ int IBootstrapperApplication.OnPlanForwardCompatibleBundle(string wzBundleId, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, bool fRecommendedIgnoreBundle, ref bool fCancel, ref bool fIgnoreBundle)
1674
+ {
1675
+ PlanForwardCompatibleBundleEventArgs args = new PlanForwardCompatibleBundleEventArgs(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fRecommendedIgnoreBundle, fCancel, fIgnoreBundle);
1676
+ this.OnPlanForwardCompatibleBundle(args);
1677
+
1678
+ fCancel = args.Cancel;
1679
+ fIgnoreBundle = args.IgnoreBundle;
1680
+ return args.HResult;
1681
+ }
1682
+
1683
int IBootstrapperApplication.BAProc(int message, IntPtr pvArgs, IntPtr pvResults, IntPtr pvContext)
1684
{
1685
switch (message)
src/WixToolset.Mba.Core/EventArgs.cs
+70
-27
@@ -226,22 +226,13 @@ namespace WixToolset.Mba.Core
226
}
227
228
/// <summary>
229
- /// Additional arguments used when detected a forward compatible bundle.
229
+ /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectForwardCompatibleBundle"/>
230
/// </summary>
231
[Serializable]
232
public class DetectForwardCompatibleBundleEventArgs : CancellableHResultEventArgs
233
{
234
- /// <summary>
235
- /// Creates a new instance of the <see cref="DetectUpdateBeginEventArgs"/> class.
236
- /// </summary>
237
- /// <param name="bundleId">The identity of the forward compatible bundle.</param>
238
- /// <param name="relationType">Relationship type for this forward compatible bundle.</param>
239
- /// <param name="bundleTag">The tag of the forward compatible bundle.</param>
240
- /// <param name="perMachine">Whether the detected forward compatible bundle is per machine.</param>
241
- /// <param name="version">The version of the forward compatible bundle detected.</param>
242
- /// <param name="cancelRecommendation">The cancel recommendation from the engine.</param>
243
- /// <param name="ignoreBundleRecommendation">The ignore recommendation from the engine.</param>
244
- public DetectForwardCompatibleBundleEventArgs(string bundleId, RelationType relationType, string bundleTag, bool perMachine, string version, bool cancelRecommendation, bool ignoreBundleRecommendation)
234
+ /// <summary />
235
+ public DetectForwardCompatibleBundleEventArgs(string bundleId, RelationType relationType, string bundleTag, bool perMachine, string version, bool missingFromCache, bool cancelRecommendation)
236
: base(cancelRecommendation)
237
{
238
this.BundleId = bundleId;
@@ -249,7 +240,7 @@ namespace WixToolset.Mba.Core
240
this.BundleTag = bundleTag;
241
this.PerMachine = perMachine;
242
this.Version = version;
252
- this.IgnoreBundle = ignoreBundleRecommendation;
243
+ this.MissingFromCache = missingFromCache;
244
}
245
246
/// <summary>
@@ -278,9 +269,9 @@ namespace WixToolset.Mba.Core
269
public string Version { get; private set; }
270
271
/// <summary>
281
- /// Instructs the engine whether to use the forward compatible bundle.
272
+ /// Whether the forward compatible bundle is missing from the package cache.
273
/// </summary>
283
- public bool IgnoreBundle { get; set; }
274
+ public bool MissingFromCache { get; set; }
275
}
276
277
/// <summary>
@@ -408,22 +399,13 @@ namespace WixToolset.Mba.Core
399
}
400
401
/// <summary>
411
- /// Additional arguments used when a related bundle has been detected for a bundle.
402
+ /// Event arguments for <see cref="IDefaultBootstrapperApplication.DetectRelatedBundle"/>
403
/// </summary>
404
[Serializable]
405
public class DetectRelatedBundleEventArgs : CancellableHResultEventArgs
406
{
416
- /// <summary>
417
- /// Creates a new instance of the <see cref="DetectRelatedBundleEventArgs"/> class.
418
- /// </summary>
419
- /// <param name="productCode">The identity of the related package bundle.</param>
420
- /// <param name="relationType">Relationship type for this related bundle.</param>
421
- /// <param name="bundleTag">The tag of the related package bundle.</param>
422
- /// <param name="perMachine">Whether the detected bundle is per machine.</param>
423
- /// <param name="version">The version of the related bundle detected.</param>
424
- /// <param name="operation">The operation that will be taken on the detected bundle.</param>
425
- /// <param name="cancelRecommendation">The recommendation from the engine.</param>
426
- public DetectRelatedBundleEventArgs(string productCode, RelationType relationType, string bundleTag, bool perMachine, string version, RelatedOperation operation, bool cancelRecommendation)
407
+ /// <summary />
408
+ public DetectRelatedBundleEventArgs(string productCode, RelationType relationType, string bundleTag, bool perMachine, string version, RelatedOperation operation, bool missingFromCache, bool cancelRecommendation)
409
: base(cancelRecommendation)
410
{
411
this.ProductCode = productCode;
@@ -432,6 +414,7 @@ namespace WixToolset.Mba.Core
414
this.PerMachine = perMachine;
415
this.Version = version;
416
this.Operation = operation;
417
+ this.MissingFromCache = missingFromCache;
418
}
419
420
/// <summary>
@@ -463,6 +446,11 @@ namespace WixToolset.Mba.Core
446
/// Gets the operation that will be taken on the detected bundle.
447
/// </summary>
448
public RelatedOperation Operation { get; private set; }
449
+
450
+ /// <summary>
451
+ /// Whether the related bundle is missing from the package cache.
452
+ /// </summary>
453
+ public bool MissingFromCache { get; set; }
454
}
455
456
/// <summary>
@@ -1009,6 +997,61 @@ namespace WixToolset.Mba.Core
997
}
998
}
999
1000
+ /// <summary>
1001
+ /// Event arguments for <see cref="IDefaultBootstrapperApplication.PlanForwardCompatibleBundle"/>
1002
+ /// </summary>
1003
+ [Serializable]
1004
+ public class PlanForwardCompatibleBundleEventArgs : CancellableHResultEventArgs
1005
+ {
1006
+ /// <summary />
1007
+ public PlanForwardCompatibleBundleEventArgs(string bundleId, RelationType relationType, string bundleTag, bool perMachine, string version, bool recommendedIgnoreBundle, bool cancelRecommendation, bool ignoreBundle)
1008
+ : base(cancelRecommendation)
1009
+ {
1010
+ this.BundleId = bundleId;
1011
+ this.RelationType = relationType;
1012
+ this.BundleTag = bundleTag;
1013
+ this.PerMachine = perMachine;
1014
+ this.Version = version;
1015
+ this.RecommendedIgnoreBundle = recommendedIgnoreBundle;
1016
+ this.IgnoreBundle = ignoreBundle;
1017
+ }
1018
+
1019
+ /// <summary>
1020
+ /// Gets the identity of the forward compatible bundle detected.
1021
+ /// </summary>
1022
+ public string BundleId { get; private set; }
1023
+
1024
+ /// <summary>
1025
+ /// Gets the relationship type of the forward compatible bundle.
1026
+ /// </summary>
1027
+ public RelationType RelationType { get; private set; }
1028
+
1029
+ /// <summary>
1030
+ /// Gets the tag of the forward compatible bundle.
1031
+ /// </summary>
1032
+ public string BundleTag { get; private set; }
1033
+
1034
+ /// <summary>
1035
+ /// Gets whether the forward compatible bundle is per machine.
1036
+ /// </summary>
1037
+ public bool PerMachine { get; private set; }
1038
+
1039
+ /// <summary>
1040
+ /// Gets the version of the forward compatible bundle.
1041
+ /// </summary>
1042
+ public string Version { get; private set; }
1043
+
1044
+ /// <summary>
1045
+ /// Gets the recommendation of whether the engine should use the forward compatible bundle.
1046
+ /// </summary>
1047
+ public bool RecommendedIgnoreBundle { get; set; }
1048
+
1049
+ /// <summary>
1050
+ /// Gets or sets whether the engine will use the forward compatible bundle.
1051
+ /// </summary>
1052
+ public bool IgnoreBundle { get; set; }
1053
+ }
1054
+
1055
/// <summary>
1056
/// Additional arguments used when the engine has begun installing the bundle.
1057
/// </summary>
src/WixToolset.Mba.Core/IBootstrapperApplication.cs
+30
-3
@@ -64,8 +64,8 @@ namespace WixToolset.Mba.Core
64
/// <param name="wzBundleTag"></param>
65
/// <param name="fPerMachine"></param>
66
/// <param name="wzVersion"></param>
67
+ /// <param name="fMissingFromCache"></param>
68
/// <param name="fCancel"></param>
68
- /// <param name="fIgnoreBundle"></param>
69
/// <returns></returns>
70
[PreserveSig]
71
[return: MarshalAs(UnmanagedType.I4)]
@@ -75,8 +75,8 @@ namespace WixToolset.Mba.Core
75
[MarshalAs(UnmanagedType.LPWStr)] string wzBundleTag,
76
[MarshalAs(UnmanagedType.Bool)] bool fPerMachine,
77
[MarshalAs(UnmanagedType.LPWStr)] string wzVersion,
78
- [MarshalAs(UnmanagedType.Bool)] ref bool fCancel,
79
- [MarshalAs(UnmanagedType.Bool)] ref bool fIgnoreBundle
78
+ [MarshalAs(UnmanagedType.Bool)] bool fMissingFromCache,
79
+ [MarshalAs(UnmanagedType.Bool)] ref bool fCancel
80
);
81
82
/// <summary>
@@ -143,6 +143,7 @@ namespace WixToolset.Mba.Core
143
/// <param name="fPerMachine"></param>
144
/// <param name="wzVersion"></param>
145
/// <param name="operation"></param>
146
+ /// <param name="fMissingFromCache"></param>
147
/// <param name="fCancel"></param>
148
/// <returns></returns>
149
[PreserveSig]
@@ -154,6 +155,7 @@ namespace WixToolset.Mba.Core
155
[MarshalAs(UnmanagedType.Bool)] bool fPerMachine,
156
[MarshalAs(UnmanagedType.LPWStr)] string wzVersion,
157
[MarshalAs(UnmanagedType.U4)] RelatedOperation operation,
158
+ [MarshalAs(UnmanagedType.Bool)] bool fMissingFromCache,
159
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
160
);
161
@@ -1000,6 +1002,31 @@ namespace WixToolset.Mba.Core
1002
int hrStatus
1003
);
1004
1005
+ /// <summary>
1006
+ /// See <see cref="IDefaultBootstrapperApplication.PlanForwardCompatibleBundle"/>.
1007
+ /// </summary>
1008
+ /// <param name="wzBundleId"></param>
1009
+ /// <param name="relationType"></param>
1010
+ /// <param name="wzBundleTag"></param>
1011
+ /// <param name="fPerMachine"></param>
1012
+ /// <param name="wzVersion"></param>
1013
+ /// <param name="fRecommendedIgnoreBundle"></param>
1014
+ /// <param name="fCancel"></param>
1015
+ /// <param name="fIgnoreBundle"></param>
1016
+ /// <returns></returns>
1017
+ [PreserveSig]
1018
+ [return: MarshalAs(UnmanagedType.I4)]
1019
+ int OnPlanForwardCompatibleBundle(
1020
+ [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId,
1021
+ [MarshalAs(UnmanagedType.U4)] RelationType relationType,
1022
+ [MarshalAs(UnmanagedType.LPWStr)] string wzBundleTag,
1023
+ [MarshalAs(UnmanagedType.Bool)] bool fPerMachine,
1024
+ [MarshalAs(UnmanagedType.LPWStr)] string wzVersion,
1025
+ [MarshalAs(UnmanagedType.Bool)] bool fRecommendedIgnoreBundle,
1026
+ [MarshalAs(UnmanagedType.Bool)] ref bool fCancel,
1027
+ [MarshalAs(UnmanagedType.Bool)] ref bool fIgnoreBundle
1028
+ );
1029
+
1030
/// <summary>
1031
/// Low level method that is called directly from the engine.
1032
/// </summary>
src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs
+5
@@ -229,6 +229,11 @@ namespace WixToolset.Mba.Core
229
/// </summary>
230
event EventHandler<PlanCompleteEventArgs> PlanComplete;
231
232
+ /// <summary>
233
+ /// Fired when the engine is about to plan a forward compatible bundle.
234
+ /// </summary>
235
+ event EventHandler<PlanForwardCompatibleBundleEventArgs> PlanForwardCompatibleBundle;
236
+
237
/// <summary>
238
/// Fired when the engine has completed planning a package.
239
/// </summary>
src/balutil/balutil.vcxproj
+2
-2
@@ -2,7 +2,7 @@
2
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5
- <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props')" />
5
+ <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props')" />
6
<Import Project="..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" />
7
8
<ItemGroup Label="ProjectConfigurations">
@@ -98,7 +98,7 @@
98
<PropertyGroup>
99
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
100
</PropertyGroup>
101
- <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props'))" />
101
+ <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props'))" />
102
<Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props'))" />
103
<Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" />
104
</Target>
src/balutil/inc/BAFunctions.h
+1
@@ -73,6 +73,7 @@ enum BA_FUNCTIONS_MESSAGE
73
BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN,
74
BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE,
75
BA_FUNCTIONS_MESSAGE_ONPLANNEDPACKAGE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDPACKAGE,
76
+ BA_FUNCTIONS_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE = BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE,
77
78
BA_FUNCTIONS_MESSAGE_ONTHEMELOADED = 1024,
79
BA_FUNCTIONS_MESSAGE_WNDPROC,
src/balutil/inc/BalBaseBAFunctions.h
+17
-2
@@ -104,8 +104,8 @@ public: // IBootstrapperApplication
104
__in_z LPCWSTR /*wzBundleTag*/,
105
__in BOOL /*fPerMachine*/,
106
__in LPCWSTR /*wzVersion*/,
107
- __inout BOOL* /*pfCancel*/,
108
- __inout BOOL* /*pfIgnoreBundle*/
107
+ __in BOOL /*fMissingFromCache*/,
108
+ __inout BOOL* /*pfCancel*/
109
)
110
{
111
return S_OK;
@@ -150,6 +150,7 @@ public: // IBootstrapperApplication
150
__in BOOL /*fPerMachine*/,
151
__in LPCWSTR /*wzVersion*/,
152
__in BOOTSTRAPPER_RELATED_OPERATION /*operation*/,
153
+ __in BOOL /*fMissingFromCache*/,
154
__inout BOOL* /*pfCancel*/
155
)
156
{
@@ -660,6 +661,20 @@ public: // IBootstrapperApplication
661
return S_OK;
662
}
663
664
+ virtual STDMETHODIMP OnPlanForwardCompatibleBundle(
665
+ __in_z LPCWSTR /*wzBundleId*/,
666
+ __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/,
667
+ __in_z LPCWSTR /*wzBundleTag*/,
668
+ __in BOOL /*fPerMachine*/,
669
+ __in LPCWSTR /*wzVersion*/,
670
+ __in BOOL /*fRecommendedIgnoreBundle*/,
671
+ __inout BOOL* /*pfCancel*/,
672
+ __inout BOOL* /*pfIgnoreBundle*/
673
+ )
674
+ {
675
+ return S_OK;
676
+ }
677
+
678
virtual STDMETHODIMP_(HRESULT) BAProc(
679
__in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/,
680
__in const LPVOID /*pvArgs*/,
src/balutil/inc/BalBaseBAFunctionsProc.h
+1
@@ -108,6 +108,7 @@ static HRESULT WINAPI BalBaseBAFunctionsProc(
108
case BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN:
109
case BA_FUNCTIONS_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE:
110
case BA_FUNCTIONS_MESSAGE_ONPLANNEDPACKAGE:
111
+ case BA_FUNCTIONS_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE:
112
hr = BalBaseBootstrapperApplicationProc((BOOTSTRAPPER_APPLICATION_MESSAGE)message, pvArgs, pvResults, pvContext);
113
break;
114
case BA_FUNCTIONS_MESSAGE_ONTHEMELOADED:
src/balutil/inc/BalBaseBootstrapperApplication.h
+18
-2
@@ -102,8 +102,8 @@ public: // IBootstrapperApplication
102
__in_z LPCWSTR /*wzBundleTag*/,
103
__in BOOL /*fPerMachine*/,
104
__in LPCWSTR /*wzVersion*/,
105
- __inout BOOL* pfCancel,
106
- __inout BOOL* /*pfIgnoreBundle*/
105
+ __in BOOL /*fMissingFromCache*/,
106
+ __inout BOOL* pfCancel
107
)
108
{
109
*pfCancel |= CheckCanceled();
@@ -151,6 +151,7 @@ public: // IBootstrapperApplication
151
__in BOOL /*fPerMachine*/,
152
__in LPCWSTR /*wzVersion*/,
153
__in BOOTSTRAPPER_RELATED_OPERATION /*operation*/,
154
+ __in BOOL /*fMissingFromCache*/,
155
__inout BOOL* pfCancel
156
)
157
{
@@ -845,6 +846,21 @@ public: // IBootstrapperApplication
846
return S_OK;
847
}
848
849
+ virtual STDMETHODIMP OnPlanForwardCompatibleBundle(
850
+ __in_z LPCWSTR /*wzBundleId*/,
851
+ __in BOOTSTRAPPER_RELATION_TYPE /*relationType*/,
852
+ __in_z LPCWSTR /*wzBundleTag*/,
853
+ __in BOOL /*fPerMachine*/,
854
+ __in LPCWSTR /*wzVersion*/,
855
+ __in BOOL /*fRecommendedIgnoreBundle*/,
856
+ __inout BOOL* pfCancel,
857
+ __inout BOOL* /*pfIgnoreBundle*/
858
+ )
859
+ {
860
+ *pfCancel |= CheckCanceled();
861
+ return S_OK;
862
+ }
863
+
864
virtual STDMETHODIMP_(HRESULT) BAProc(
865
__in BOOTSTRAPPER_APPLICATION_MESSAGE /*message*/,
866
__in const LPVOID /*pvArgs*/,
src/balutil/inc/BalBaseBootstrapperApplicationProc.h
+14
-2
@@ -78,7 +78,7 @@ static HRESULT BalBaseBAProcOnDetectForwardCompatibleBundle(
78
__inout BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults
79
)
80
{
81
- return pBA->OnDetectForwardCompatibleBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, &pResults->fCancel, &pResults->fIgnoreBundle);
81
+ return pBA->OnDetectForwardCompatibleBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->fMissingFromCache, &pResults->fCancel);
82
}
83
84
static HRESULT BalBaseBAProcOnDetectUpdateBegin(
@@ -114,7 +114,7 @@ static HRESULT BalBaseBAProcOnDetectRelatedBundle(
114
__inout BA_ONDETECTRELATEDBUNDLE_RESULTS* pResults
115
)
116
{
117
- return pBA->OnDetectRelatedBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->operation, &pResults->fCancel);
117
+ return pBA->OnDetectRelatedBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->operation, pArgs->fMissingFromCache, &pResults->fCancel);
118
}
119
120
static HRESULT BalBaseBAProcOnDetectPackageBegin(
@@ -585,6 +585,15 @@ static HRESULT BalBaseBAProcOnSystemRestorePointComplete(
585
return pBA->OnSystemRestorePointComplete(pArgs->hrStatus);
586
}
587
588
+static HRESULT BalBaseBAProcOnPlanForwardCompatibleBundle(
589
+ __in IBootstrapperApplication* pBA,
590
+ __in BA_ONPLANFORWARDCOMPATIBLEBUNDLE_ARGS* pArgs,
591
+ __inout BA_ONPLANFORWARDCOMPATIBLEBUNDLE_RESULTS* pResults
592
+ )
593
+{
594
+ return pBA->OnPlanForwardCompatibleBundle(pArgs->wzBundleId, pArgs->relationType, pArgs->wzBundleTag, pArgs->fPerMachine, pArgs->wzVersion, pArgs->fRecommendedIgnoreBundle, &pResults->fCancel, &pResults->fIgnoreBundle);
595
+}
596
+
597
/*******************************************************************
598
BalBaseBootstrapperApplicationProc - requires pvContext to be of type IBootstrapperApplication.
599
Provides a default mapping between the new message based BA interface and
@@ -796,6 +805,9 @@ static HRESULT WINAPI BalBaseBootstrapperApplicationProc(
805
case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDPACKAGE:
806
hr = BalBaseBAProcOnPlannedPackage(pBA, reinterpret_cast<BA_ONPLANNEDPACKAGE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANNEDPACKAGE_RESULTS*>(pvResults));
807
break;
808
+ case BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE:
809
+ hr = BalBaseBAProcOnPlanForwardCompatibleBundle(pBA, reinterpret_cast<BA_ONPLANFORWARDCOMPATIBLEBUNDLE_ARGS*>(pvArgs), reinterpret_cast<BA_ONPLANFORWARDCOMPATIBLEBUNDLE_RESULTS*>(pvResults));
810
+ break;
811
}
812
}
813
src/balutil/inc/IBootstrapperApplication.h
+14
-2
@@ -33,8 +33,8 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A
33
__in_z LPCWSTR wzBundleTag,
34
__in BOOL fPerMachine,
35
__in_z LPCWSTR wzVersion,
36
- __inout BOOL* pfCancel,
37
- __inout BOOL* pfIgnoreBundle
36
+ __in BOOL fMissingFromCache,
37
+ __inout BOOL* pfCancel
38
) = 0;
39
40
// OnDetectUpdateBegin - called when the engine begins detection for bundle update.
@@ -71,6 +71,7 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A
71
__in BOOL fPerMachine,
72
__in_z LPCWSTR wzVersion,
73
__in BOOTSTRAPPER_RELATED_OPERATION operation,
74
+ __in BOOL fMissingFromCache,
75
__inout BOOL* pfCancel
76
) = 0;
77
@@ -540,6 +541,17 @@ DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-A
541
__in HRESULT hrStatus
542
) = 0;
543
544
+ STDMETHOD(OnPlanForwardCompatibleBundle)(
545
+ __in_z LPCWSTR wzBundleId,
546
+ __in BOOTSTRAPPER_RELATION_TYPE relationType,
547
+ __in_z LPCWSTR wzBundleTag,
548
+ __in BOOL fPerMachine,
549
+ __in_z LPCWSTR wzVersion,
550
+ __in BOOL fRecommendedIgnoreBundle,
551
+ __inout BOOL* pfCancel,
552
+ __inout BOOL* pfIgnoreBundle
553
+ ) = 0;
554
+
555
// BAProc - The PFN_BOOTSTRAPPER_APPLICATION_PROC can call this method to give the BA raw access to the callback from the engine.
556
// This might be used to help the BA support more than one version of the engine.
557
STDMETHOD(BAProc)(
src/balutil/packages.config
+1
-1
@@ -1,6 +1,6 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<packages>
3
<package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" />
4
- <package id="WixToolset.BootstrapperCore.Native" version="4.0.94" targetFramework="native" />
4
+ <package id="WixToolset.BootstrapperCore.Native" version="4.0.99" targetFramework="native" />
5
<package id="WixToolset.DUtil" version="4.0.64" targetFramework="native" />
6
</packages>
\ No newline at end of file
src/bextutil/bextutil.vcxproj
+2
-2
@@ -2,7 +2,7 @@
2
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5
- <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props')" />
5
+ <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props')" />
6
<Import Project="..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" />
7
8
<ItemGroup Label="ProjectConfigurations">
@@ -87,7 +87,7 @@
87
<PropertyGroup>
88
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
89
</PropertyGroup>
90
- <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props'))" />
90
+ <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props'))" />
91
<Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props'))" />
92
<Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" />
93
</Target>
src/bextutil/packages.config
+1
-1
@@ -1,6 +1,6 @@
1
<?xml version="1.0" encoding="utf-8"?>
2
<packages>
3
<package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" />
4
- <package id="WixToolset.BootstrapperCore.Native" version="4.0.94" targetFramework="native" />
4
+ <package id="WixToolset.BootstrapperCore.Native" version="4.0.99" targetFramework="native" />
5
<package id="WixToolset.DUtil" version="4.0.64" targetFramework="native" />
6
</packages>
\ No newline at end of file
src/mbanative/mbanative.vcxproj
+2
-2
@@ -5,7 +5,7 @@
5
<Import Project="..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" />
6
<Import Project="..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props" Condition="Exists('..\..\packages\Microsoft.SourceLink.Common.1.0.0\build\Microsoft.SourceLink.Common.props')" />
7
<Import Project="..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props" Condition="Exists('..\..\packages\Microsoft.Build.Tasks.Git.1.0.0\build\Microsoft.Build.Tasks.Git.props')" />
8
- <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props')" />
8
+ <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props')" />
9
<Import Project="..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" />
10
11
<ItemGroup Label="ProjectConfigurations">
@@ -96,7 +96,7 @@
96
<Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.props'))" />
97
<Error Condition="!Exists('..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Microsoft.SourceLink.GitHub.1.0.0\build\Microsoft.SourceLink.GitHub.targets'))" />
98
<Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.3.37\build\Nerdbank.GitVersioning.targets'))" />
99
- <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props'))" />
99
+ <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props'))" />
100
<Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props'))" />
101
</Target>
102
</Project>
\ No newline at end of file
src/mbanative/packages.config
+1
-1
@@ -4,6 +4,6 @@
4
<package id="Microsoft.SourceLink.Common" version="1.0.0" targetFramework="native" developmentDependency="true" />
5
<package id="Microsoft.SourceLink.GitHub" version="1.0.0" targetFramework="native" developmentDependency="true" />
6
<package id="Nerdbank.GitVersioning" version="3.3.37" targetFramework="native" developmentDependency="true" />
7
- <package id="WixToolset.BootstrapperCore.Native" version="4.0.94" targetFramework="native" />
7
+ <package id="WixToolset.BootstrapperCore.Native" version="4.0.99" targetFramework="native" />
8
<package id="WixToolset.DUtil" version="4.0.64" targetFramework="native" />
9
</packages>
\ No newline at end of file
src/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj
+2
-2
@@ -4,7 +4,7 @@
4
5
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6
<Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" />
7
- <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props')" />
7
+ <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props')" />
8
<Import Project="..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" />
9
<ItemGroup Label="ProjectConfigurations">
10
<ProjectConfiguration Include="Debug|Win32">
@@ -69,7 +69,7 @@
69
</PropertyGroup>
70
<Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props'))" />
71
<Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets'))" />
72
- <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props'))" />
72
+ <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props'))" />
73
<Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props'))" />
74
</Target>
75
</Project>
src/test/BalUtilUnitTest/packages.config
+1
-1
@@ -10,6 +10,6 @@
10
<package id="xunit.runner.visualstudio" version="2.4.1" />
11
<package id="WixBuildTools.TestSupport" version="4.0.47" />
12
<package id="WixBuildTools.TestSupport.Native" version="4.0.47" />
13
- <package id="WixToolset.BootstrapperCore.Native" version="4.0.94" targetFramework="native" />
13
+ <package id="WixToolset.BootstrapperCore.Native" version="4.0.99" targetFramework="native" />
14
<package id="WixToolset.DUtil" version="4.0.64" targetFramework="native" />
15
</packages>
\ No newline at end of file
src/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj
+2
-2
@@ -4,7 +4,7 @@
4
5
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6
<Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" />
7
- <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props')" />
7
+ <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props')" />
8
<Import Project="..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" />
9
<ItemGroup Label="ProjectConfigurations">
10
<ProjectConfiguration Include="Debug|Win32">
@@ -68,7 +68,7 @@
68
</PropertyGroup>
69
<Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.props'))" />
70
<Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.47\build\WixBuildTools.TestSupport.Native.targets'))" />
71
- <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.94\build\WixToolset.BootstrapperCore.Native.props'))" />
71
+ <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.99\build\WixToolset.BootstrapperCore.Native.props'))" />
72
<Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.64\build\WixToolset.DUtil.props'))" />
73
</Target>
74
</Project>
src/test/BextUtilUnitTest/packages.config
+1
-1
@@ -10,6 +10,6 @@
10
<package id="xunit.runner.visualstudio" version="2.4.1" />
11
<package id="WixBuildTools.TestSupport" version="4.0.47" />
12
<package id="WixBuildTools.TestSupport.Native" version="4.0.47" />
13
- <package id="WixToolset.BootstrapperCore.Native" version="4.0.94" targetFramework="native" />
13
+ <package id="WixToolset.BootstrapperCore.Native" version="4.0.99" targetFramework="native" />
14
<package id="WixToolset.DUtil" version="4.0.64" targetFramework="native" />
15
</packages>
\ No newline at end of file