Enable XML doc.
Sean Hall committed
Dec 19, 2020 at 19:15 UTC
80df808461fca91b53e232b5b504a5c868029697
25 files changed
+2045
-330
src/CSharp.Build.props
+2
@@ -5,7 +5,9 @@
5
-->
6
<Project>
7
<PropertyGroup>
8
+ <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
9
<SignAssembly>true</SignAssembly>
10
<AssemblyOriginatorKeyFile>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk))</AssemblyOriginatorKeyFile>
11
+ <NBGV_EmitThisAssemblyClass>false</NBGV_EmitThisAssemblyClass>
12
</PropertyGroup>
13
</Project>
src/Directory.Build.targets
+8
@@ -9,6 +9,11 @@
9
See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284
10
-->
11
<Project>
12
+ <PropertyGroup>
13
+ <CreateDocumentation Condition=" '$(CreateDocumentationFile)'!='true' ">false</CreateDocumentation>
14
+ <DocumentationFile Condition=" '$(CreateDocumentationFile)'=='true' ">$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
15
+ </PropertyGroup>
16
+
17
<PropertyGroup>
18
<ReplacePackageReferences>true</ReplacePackageReferences>
19
<TheSolutionPath Condition=" '$(NCrunch)'=='' ">$(SolutionPath)</TheSolutionPath>
@@ -45,4 +50,7 @@
50
51
</When>
52
</Choose>
53
+
54
+ <Import Project="Wix.Build.targets" Condition=" Exists('Wix.Build.targets') And '$(MSBuildProjectExtension)'=='.wixproj' " />
55
+ <Import Project="Custom.Build.targets" Condition=" Exists('Custom.Build.targets') " />
56
</Project>
src/WixToolset.Mba.Core/BaseBootstrapperApplicationFactory.cs
+27
@@ -5,8 +5,16 @@ namespace WixToolset.Mba.Core
5
using System;
6
using System.Runtime.InteropServices;
7
8
+ /// <summary>
9
+ /// Default implementation of <see cref="IBootstrapperApplicationFactory"/>.
10
+ /// </summary>
11
public abstract class BaseBootstrapperApplicationFactory : IBootstrapperApplicationFactory
12
{
13
+ /// <summary>
14
+ /// Default implementation of <see cref="IBootstrapperApplicationFactory.Create(IntPtr, IntPtr)"/>
15
+ /// </summary>
16
+ /// <param name="pArgs"></param>
17
+ /// <param name="pResults"></param>
18
public void Create(IntPtr pArgs, IntPtr pResults)
19
{
20
InitializeFromCreateArgs(pArgs, out var engine, out var bootstrapperCommand);
@@ -15,8 +23,21 @@ namespace WixToolset.Mba.Core
23
StoreBAInCreateResults(pResults, ba);
24
}
25
26
+ /// <summary>
27
+ /// Called by <see cref="BaseBootstrapperApplicationFactory.Create(IntPtr, IntPtr)"/> to get the <see cref="IBootstrapperApplication"/>.
28
+ /// </summary>
29
+ /// <param name="engine">The bundle engine.</param>
30
+ /// <param name="bootstrapperCommand">Command information passed from the engine for the BA to perform.</param>
31
+ /// <returns>The <see cref="IBootstrapperApplication"/> for the bundle.</returns>
32
protected abstract IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand);
33
34
+ /// <summary>
35
+ /// Initializes the native part of <see cref="WixToolset.Mba.Core"/>.
36
+ /// Most users should inherit from <see cref="BaseBootstrapperApplicationFactory"/> instead of calling this method.
37
+ /// </summary>
38
+ /// <param name="pArgs">The args struct given by the engine when initially creating the BA.</param>
39
+ /// <param name="engine">The bundle engine interface.</param>
40
+ /// <param name="bootstrapperCommand">The context of the current run of the bundle.</param>
41
public static void InitializeFromCreateArgs(IntPtr pArgs, out IEngine engine, out IBootstrapperCommand bootstrapperCommand)
42
{
43
Command pCommand = new Command
@@ -28,6 +49,12 @@ namespace WixToolset.Mba.Core
49
bootstrapperCommand = pCommand.GetBootstrapperCommand();
50
}
51
52
+ /// <summary>
53
+ /// Registers the BA with the engine using the default mapping between the message based interface and the COM interface.
54
+ /// Most users should inherit from <see cref="BaseBootstrapperApplicationFactory"/> instead of calling this method.
55
+ /// </summary>
56
+ /// <param name="pResults">The results struct given by the engine when initially creating the BA</param>
57
+ /// <param name="ba">The <see cref="IBootstrapperApplication"/>.</param>
58
public static void StoreBAInCreateResults(IntPtr pResults, IBootstrapperApplication ba)
59
{
60
BalUtil.StoreBAInCreateResults(pResults, ba);
src/WixToolset.Mba.Core/BootstrapperApplication.cs
+133
-291
@@ -34,347 +34,202 @@ namespace WixToolset.Mba.Core
34
this.asyncExecution = true;
35
}
36
37
- /// <summary>
38
- /// Fired when the engine is starting up the bootstrapper application.
39
- /// </summary>
37
+ /// <inheritdoc/>
38
public event EventHandler<StartupEventArgs> Startup;
39
42
- /// <summary>
43
- /// Fired when the engine is shutting down the bootstrapper application.
44
- /// </summary>
40
+ /// <inheritdoc/>
41
public event EventHandler<ShutdownEventArgs> Shutdown;
42
47
- /// <summary>
48
- /// Fired when the system is shutting down or user is logging off.
49
- /// </summary>
50
- /// <remarks>
51
- /// <para>To prevent shutting down or logging off, set <see cref="CancellableHResultEventArgs.Cancel"/> to
52
- /// true; otherwise, set it to false.</para>
53
- /// <para>By default setup will prevent shutting down or logging off between
54
- /// <see cref="BootstrapperApplication.ApplyBegin"/> and <see cref="BootstrapperApplication.ApplyComplete"/>.
55
- /// Derivatives can change this behavior by overriding <see cref="BootstrapperApplication.OnSystemShutdown"/>
56
- /// or handling <see cref="BootstrapperApplication.SystemShutdown"/>.</para>
57
- /// <para>If <see cref="SystemShutdownEventArgs.Reasons"/> contains <see cref="EndSessionReasons.Critical"/>
58
- /// the bootstrapper cannot prevent the shutdown and only has a few seconds to save state or perform any other
59
- /// critical operations before being closed by the operating system.</para>
60
- /// <para>This event may be fired on a different thread.</para>
61
- /// </remarks>
43
+ /// <inheritdoc/>
44
public event EventHandler<SystemShutdownEventArgs> SystemShutdown;
45
64
- /// <summary>
65
- /// Fired when the overall detection phase has begun.
66
- /// </summary>
46
+ /// <inheritdoc/>
47
public event EventHandler<DetectBeginEventArgs> DetectBegin;
48
69
- /// <summary>
70
- /// Fired when a forward compatible bundle is detected.
71
- /// </summary>
49
+ /// <inheritdoc/>
50
public event EventHandler<DetectForwardCompatibleBundleEventArgs> DetectForwardCompatibleBundle;
51
74
- /// <summary>
75
- /// Fired when the update detection phase has begun.
76
- /// </summary>
52
+ /// <inheritdoc/>
53
public event EventHandler<DetectUpdateBeginEventArgs> DetectUpdateBegin;
54
79
- /// <summary>
80
- /// Fired when the update detection has found a potential update candidate.
81
- /// </summary>
55
+ /// <inheritdoc/>
56
public event EventHandler<DetectUpdateEventArgs> DetectUpdate;
57
84
- /// <summary>
85
- /// Fired when the update detection phase has completed.
86
- /// </summary>
58
+ /// <inheritdoc/>
59
public event EventHandler<DetectUpdateCompleteEventArgs> DetectUpdateComplete;
60
89
- /// <summary>
90
- /// Fired when a related bundle has been detected for a bundle.
91
- /// </summary>
61
+ /// <inheritdoc/>
62
public event EventHandler<DetectRelatedBundleEventArgs> DetectRelatedBundle;
63
94
- /// <summary>
95
- /// Fired when the detection for a specific package has begun.
96
- /// </summary>
64
+ /// <inheritdoc/>
65
public event EventHandler<DetectPackageBeginEventArgs> DetectPackageBegin;
66
99
- /// <summary>
100
- /// Fired when a package was not detected but a package using the same provider key was.
101
- /// </summary>
67
+ /// <inheritdoc/>
68
public event EventHandler<DetectCompatibleMsiPackageEventArgs> DetectCompatibleMsiPackage;
103
-
104
- /// <summary>
105
- /// Fired when a related MSI package has been detected for a package.
106
- /// </summary>
69
+
70
+ /// <inheritdoc/>
71
public event EventHandler<DetectRelatedMsiPackageEventArgs> DetectRelatedMsiPackage;
72
109
- /// <summary>
110
- /// Fired when an MSP package detects a target MSI has been detected.
111
- /// </summary>
73
+ /// <inheritdoc/>
74
public event EventHandler<DetectTargetMsiPackageEventArgs> DetectTargetMsiPackage;
75
114
- /// <summary>
115
- /// Fired when a feature in an MSI package has been detected.
116
- /// </summary>
76
+ /// <inheritdoc/>
77
public event EventHandler<DetectMsiFeatureEventArgs> DetectMsiFeature;
78
119
- /// <summary>
120
- /// Fired when the detection for a specific package has completed.
121
- /// </summary>
79
+ /// <inheritdoc/>
80
public event EventHandler<DetectPackageCompleteEventArgs> DetectPackageComplete;
81
124
- /// <summary>
125
- /// Fired when the detection phase has completed.
126
- /// </summary>
82
+ /// <inheritdoc/>
83
public event EventHandler<DetectCompleteEventArgs> DetectComplete;
84
129
- /// <summary>
130
- /// Fired when the engine has begun planning the installation.
131
- /// </summary>
85
+ /// <inheritdoc/>
86
public event EventHandler<PlanBeginEventArgs> PlanBegin;
87
134
- /// <summary>
135
- /// Fired when the engine has begun planning for a related bundle.
136
- /// </summary>
88
+ /// <inheritdoc/>
89
public event EventHandler<PlanRelatedBundleEventArgs> PlanRelatedBundle;
90
139
- /// <summary>
140
- /// Fired when the engine has begun planning the installation of a specific package.
141
- /// </summary>
91
+ /// <inheritdoc/>
92
public event EventHandler<PlanPackageBeginEventArgs> PlanPackageBegin;
93
144
- /// <summary>
145
- /// Fired when the engine plans a new, compatible package using the same provider key.
146
- /// </summary>
94
+ /// <inheritdoc/>
95
public event EventHandler<PlanCompatibleMsiPackageBeginEventArgs> PlanCompatibleMsiPackageBegin;
96
149
- /// <summary>
150
- /// Fired when the engine has completed planning the installation of a specific package.
151
- /// </summary>
97
+ /// <inheritdoc/>
98
public event EventHandler<PlanCompatibleMsiPackageCompleteEventArgs> PlanCompatibleMsiPackageComplete;
99
154
- /// <summary>
155
- /// Fired when the engine is about to plan the target MSI of a MSP package.
156
- /// </summary>
100
+ /// <inheritdoc/>
101
public event EventHandler<PlanTargetMsiPackageEventArgs> PlanTargetMsiPackage;
102
159
- /// <summary>
160
- /// Fired when the engine is about to plan a feature in an MSI package.
161
- /// </summary>
103
+ /// <inheritdoc/>
104
public event EventHandler<PlanMsiFeatureEventArgs> PlanMsiFeature;
105
164
- /// <summary>
165
- /// Fired when the engine is planning an MSI or MSP package.
166
- /// </summary>
106
+ /// <inheritdoc/>
107
public event EventHandler<PlanMsiPackageEventArgs> PlanMsiPackage;
108
169
- /// <summary>
170
- /// Fired when the engine has completed planning the installation of a specific package.
171
- /// </summary>
109
+ /// <inheritdoc/>
110
public event EventHandler<PlanPackageCompleteEventArgs> PlanPackageComplete;
111
174
- /// <summary>
175
- /// Fired when the engine has completed planning the installation.
176
- /// </summary>
112
+ /// <inheritdoc/>
113
public event EventHandler<PlanCompleteEventArgs> PlanComplete;
114
179
- /// <summary>
180
- /// Fired when the engine has begun installing the bundle.
181
- /// </summary>
115
+ /// <inheritdoc/>
116
public event EventHandler<ApplyBeginEventArgs> ApplyBegin;
117
184
- /// <summary>
185
- /// Fired when the engine is about to start the elevated process.
186
- /// </summary>
118
+ /// <inheritdoc/>
119
public event EventHandler<ElevateBeginEventArgs> ElevateBegin;
120
189
- /// <summary>
190
- /// Fired when the engine has completed starting the elevated process.
191
- /// </summary>
121
+ /// <inheritdoc/>
122
public event EventHandler<ElevateCompleteEventArgs> ElevateComplete;
123
194
- /// <summary>
195
- /// Fired when the engine has changed progress for the bundle installation.
196
- /// </summary>
124
+ /// <inheritdoc/>
125
public event EventHandler<ProgressEventArgs> Progress;
126
199
- /// <summary>
200
- /// Fired when the engine has encountered an error.
201
- /// </summary>
127
+ /// <inheritdoc/>
128
public event EventHandler<ErrorEventArgs> Error;
129
204
- /// <summary>
205
- /// Fired when the engine has begun registering the location and visibility of the bundle.
206
- /// </summary>
130
+ /// <inheritdoc/>
131
public event EventHandler<RegisterBeginEventArgs> RegisterBegin;
132
209
- /// <summary>
210
- /// Fired when the engine has completed registering the location and visibility of the bundle.
211
- /// </summary>
133
+ /// <inheritdoc/>
134
public event EventHandler<RegisterCompleteEventArgs> RegisterComplete;
135
214
- /// <summary>
215
- /// Fired when the engine has begun removing the registration for the location and visibility of the bundle.
216
- /// </summary>
136
+ /// <inheritdoc/>
137
public event EventHandler<UnregisterBeginEventArgs> UnregisterBegin;
138
219
- /// <summary>
220
- /// Fired when the engine has completed removing the registration for the location and visibility of the bundle.
221
- /// </summary>
139
+ /// <inheritdoc/>
140
public event EventHandler<UnregisterCompleteEventArgs> UnregisterComplete;
141
224
- /// <summary>
225
- /// Fired when the engine has begun caching the installation sources.
226
- /// </summary>
142
+ /// <inheritdoc/>
143
public event EventHandler<CacheBeginEventArgs> CacheBegin;
144
229
- /// <summary>
230
- /// Fired when the engine has begun caching a specific package.
231
- /// </summary>
145
+ /// <inheritdoc/>
146
public event EventHandler<CachePackageBeginEventArgs> CachePackageBegin;
147
234
- /// <summary>
235
- /// Fired when the engine has begun acquiring the installation sources.
236
- /// </summary>
148
+ /// <inheritdoc/>
149
public event EventHandler<CacheAcquireBeginEventArgs> CacheAcquireBegin;
150
239
- /// <summary>
240
- /// Fired when the engine has progress acquiring the installation sources.
241
- /// </summary>
151
+ /// <inheritdoc/>
152
public event EventHandler<CacheAcquireProgressEventArgs> CacheAcquireProgress;
153
244
- /// <summary>
245
- /// Fired by the engine to allow the BA to change the source
246
- /// using <see cref="M:Engine.SetLocalSource"/> or <see cref="M:Engine.SetDownloadSource"/>.
247
- /// </summary>
154
+ /// <inheritdoc/>
155
public event EventHandler<ResolveSourceEventArgs> ResolveSource;
156
250
- /// <summary>
251
- /// Fired when the engine has completed the acquisition of the installation sources.
252
- /// </summary>
157
+ /// <inheritdoc/>
158
public event EventHandler<CacheAcquireCompleteEventArgs> CacheAcquireComplete;
159
255
- /// <summary>
256
- /// Fired when the engine begins the verification of the acquired installation sources.
257
- /// </summary>
160
+ /// <inheritdoc/>
161
public event EventHandler<CacheVerifyBeginEventArgs> CacheVerifyBegin;
162
260
- /// <summary>
261
- /// Fired when the engine complete the verification of the acquired installation sources.
262
- /// </summary>
163
+ /// <inheritdoc/>
164
public event EventHandler<CacheVerifyCompleteEventArgs> CacheVerifyComplete;
165
265
- /// <summary>
266
- /// Fired when the engine has completed caching a specific package.
267
- /// </summary>
166
+ /// <inheritdoc/>
167
public event EventHandler<CachePackageCompleteEventArgs> CachePackageComplete;
168
270
- /// <summary>
271
- /// Fired after the engine has cached the installation sources.
272
- /// </summary>
169
+ /// <inheritdoc/>
170
public event EventHandler<CacheCompleteEventArgs> CacheComplete;
171
275
- /// <summary>
276
- /// Fired when the engine has begun installing packages.
277
- /// </summary>
172
+ /// <inheritdoc/>
173
public event EventHandler<ExecuteBeginEventArgs> ExecuteBegin;
174
280
- /// <summary>
281
- /// Fired when the engine has begun installing a specific package.
282
- /// </summary>
175
+ /// <inheritdoc/>
176
public event EventHandler<ExecutePackageBeginEventArgs> ExecutePackageBegin;
177
285
- /// <summary>
286
- /// Fired when the engine executes one or more patches targeting a product.
287
- /// </summary>
178
+ /// <inheritdoc/>
179
public event EventHandler<ExecutePatchTargetEventArgs> ExecutePatchTarget;
180
290
- /// <summary>
291
- /// Fired when Windows Installer sends an installation message.
292
- /// </summary>
181
+ /// <inheritdoc/>
182
public event EventHandler<ExecuteMsiMessageEventArgs> ExecuteMsiMessage;
183
295
- /// <summary>
296
- /// Fired when Windows Installer sends a files in use installation message.
297
- /// </summary>
184
+ /// <inheritdoc/>
185
public event EventHandler<ExecuteFilesInUseEventArgs> ExecuteFilesInUse;
186
300
- /// <summary>
301
- /// Fired when the engine has completed installing a specific package.
302
- /// </summary>
187
+ /// <inheritdoc/>
188
public event EventHandler<ExecutePackageCompleteEventArgs> ExecutePackageComplete;
189
305
- /// <summary>
306
- /// Fired when the engine has completed installing packages.
307
- /// </summary>
190
+ /// <inheritdoc/>
191
public event EventHandler<ExecuteCompleteEventArgs> ExecuteComplete;
192
310
- /// <summary>
311
- /// Fired when the engine has completed installing the bundle.
312
- /// </summary>
193
+ /// <inheritdoc/>
194
public event EventHandler<ApplyCompleteEventArgs> ApplyComplete;
195
315
- /// <summary>
316
- /// Fired by the engine while executing on payload.
317
- /// </summary>
196
+ /// <inheritdoc/>
197
public event EventHandler<ExecuteProgressEventArgs> ExecuteProgress;
198
320
- /// <summary>
321
- /// Fired when the engine is about to launch the preapproved executable.
322
- /// </summary>
199
+ /// <inheritdoc/>
200
public event EventHandler<LaunchApprovedExeBeginEventArgs> LaunchApprovedExeBegin;
201
325
- /// <summary>
326
- /// Fired when the engine has completed launching the preapproved executable.
327
- /// </summary>
202
+ /// <inheritdoc/>
203
public event EventHandler<LaunchApprovedExeCompleteEventArgs> LaunchApprovedExeComplete;
204
330
- /// <summary>
331
- /// Fired when the engine is about to begin an MSI transaction.
332
- /// </summary>
205
+ /// <inheritdoc/>
206
public event EventHandler<BeginMsiTransactionBeginEventArgs> BeginMsiTransactionBegin;
207
335
- /// <summary>
336
- /// Fired when the engine has completed beginning an MSI transaction.
337
- /// </summary>
208
+ /// <inheritdoc/>
209
public event EventHandler<BeginMsiTransactionCompleteEventArgs> BeginMsiTransactionComplete;
210
340
- /// <summary>
341
- /// Fired when the engine is about to commit an MSI transaction.
342
- /// </summary>
211
+ /// <inheritdoc/>
212
public event EventHandler<CommitMsiTransactionBeginEventArgs> CommitMsiTransactionBegin;
213
345
- /// <summary>
346
- /// Fired when the engine has completed comitting an MSI transaction.
347
- /// </summary>
214
+ /// <inheritdoc/>
215
public event EventHandler<CommitMsiTransactionCompleteEventArgs> CommitMsiTransactionComplete;
216
350
- /// <summary>
351
- /// Fired when the engine is about to rollback an MSI transaction.
352
- /// </summary>
217
+ /// <inheritdoc/>
218
public event EventHandler<RollbackMsiTransactionBeginEventArgs> RollbackMsiTransactionBegin;
219
355
- /// <summary>
356
- /// Fired when the engine has completed rolling back an MSI transaction.
357
- /// </summary>
220
+ /// <inheritdoc/>
221
public event EventHandler<RollbackMsiTransactionCompleteEventArgs> RollbackMsiTransactionComplete;
222
360
- /// <summary>
361
- /// Fired when the engine is about to pause Windows automatic updates.
362
- /// </summary>
223
+ /// <inheritdoc/>
224
public event EventHandler<PauseAutomaticUpdatesBeginEventArgs> PauseAutomaticUpdatesBegin;
225
365
- /// <summary>
366
- /// Fired when the engine has completed pausing Windows automatic updates.
367
- /// </summary>
226
+ /// <inheritdoc/>
227
public event EventHandler<PauseAutomaticUpdatesCompleteEventArgs> PauseAutomaticUpdatesComplete;
228
370
- /// <summary>
371
- /// Fired when the engine is about to take a system restore point.
372
- /// </summary>
229
+ /// <inheritdoc/>
230
public event EventHandler<SystemRestorePointBeginEventArgs> SystemRestorePointBegin;
231
375
- /// <summary>
376
- /// Fired when the engine has completed taking a system restore point.
377
- /// </summary>
232
+ /// <inheritdoc/>
233
public event EventHandler<SystemRestorePointCompleteEventArgs> SystemRestorePointComplete;
234
235
/// <summary>
@@ -383,7 +238,7 @@ namespace WixToolset.Mba.Core
238
protected abstract void Run();
239
240
/// <summary>
386
- /// Called by the engine on startup of the bootstrapper application.
241
+ /// Called by the engine, raises the <see cref="Startup"/> event.
242
/// </summary>
243
/// <param name="args">Additional arguments for this event.</param>
244
protected virtual void OnStartup(StartupEventArgs args)
@@ -410,7 +265,7 @@ namespace WixToolset.Mba.Core
265
}
266
267
/// <summary>
413
- /// Called by the engine to uninitialize the BA.
268
+ /// Called by the engine, raises the <see cref="Shutdown"/> event.
269
/// </summary>
270
/// <param name="args">Additional arguments for this event.</param>
271
protected virtual void OnShutdown(ShutdownEventArgs args)
@@ -423,21 +278,9 @@ namespace WixToolset.Mba.Core
278
}
279
280
/// <summary>
426
- /// Called when the system is shutting down or the user is logging off.
281
+ /// Called by the engine, raises the <see cref="SystemShutdown"/> event.
282
/// </summary>
283
/// <param name="args">Additional arguments for this event.</param>
429
- /// <remarks>
430
- /// <para>To prevent shutting down or logging off, set <see cref="CancellableHResultEventArgs.Cancel"/> to
431
- /// true; otherwise, set it to false.</para>
432
- /// <para>By default setup will prevent shutting down or logging off between
433
- /// <see cref="BootstrapperApplication.ApplyBegin"/> and <see cref="BootstrapperApplication.ApplyComplete"/>.
434
- /// Derivatives can change this behavior by overriding <see cref="BootstrapperApplication.OnSystemShutdown"/>
435
- /// or handling <see cref="BootstrapperApplication.SystemShutdown"/>.</para>
436
- /// <para>If <see cref="SystemShutdownEventArgs.Reasons"/> contains <see cref="EndSessionReasons.Critical"/>
437
- /// the bootstrapper cannot prevent the shutdown and only has a few seconds to save state or perform any other
438
- /// critical operations before being closed by the operating system.</para>
439
- /// <para>This method may be called on a different thread.</para>
440
- /// </remarks>
284
protected virtual void OnSystemShutdown(SystemShutdownEventArgs args)
285
{
286
EventHandler<SystemShutdownEventArgs> handler = this.SystemShutdown;
@@ -454,7 +297,7 @@ namespace WixToolset.Mba.Core
297
}
298
299
/// <summary>
457
- /// Called when the overall detection phase has begun.
300
+ /// Called by the engine, raises the <see cref="DetectBegin"/> event.
301
/// </summary>
302
/// <param name="args">Additional arguments for this event.</param>
303
protected virtual void OnDetectBegin(DetectBeginEventArgs args)
@@ -467,7 +310,7 @@ namespace WixToolset.Mba.Core
310
}
311
312
/// <summary>
470
- /// Called when the update detection phase has begun.
313
+ /// Called by the engine, raises the <see cref="DetectForwardCompatibleBundle"/> event.
314
/// </summary>
315
/// <param name="args">Additional arguments for this event.</param>
316
protected virtual void OnDetectForwardCompatibleBundle(DetectForwardCompatibleBundleEventArgs args)
@@ -480,7 +323,7 @@ namespace WixToolset.Mba.Core
323
}
324
325
/// <summary>
483
- /// Called when the update detection phase has begun.
326
+ /// Called by the engine, raises the <see cref="DetectUpdateBegin"/> event.
327
/// </summary>
328
/// <param name="args">Additional arguments for this event.</param>
329
protected virtual void OnDetectUpdateBegin(DetectUpdateBeginEventArgs args)
@@ -493,7 +336,7 @@ namespace WixToolset.Mba.Core
336
}
337
338
/// <summary>
496
- /// Fired when the update detection has found a potential update candidate.
339
+ /// Called by the engine, raises the <see cref="DetectUpdate"/> event.
340
/// </summary>
341
/// <param name="args">Additional arguments for this event.</param>
342
protected virtual void OnDetectUpdate(DetectUpdateEventArgs args)
@@ -506,7 +349,7 @@ namespace WixToolset.Mba.Core
349
}
350
351
/// <summary>
509
- /// Called when the update detection phase has completed.
352
+ /// Called by the engine, raises the <see cref="DetectUpdateComplete"/> event.
353
/// </summary>
354
/// <param name="args">Additional arguments for this event.</param>
355
protected virtual void OnDetectUpdateComplete(DetectUpdateCompleteEventArgs args)
@@ -519,7 +362,7 @@ namespace WixToolset.Mba.Core
362
}
363
364
/// <summary>
522
- /// Called when a related bundle has been detected for a bundle.
365
+ /// Called by the engine, raises the <see cref="DetectRelatedBundle"/> event.
366
/// </summary>
367
/// <param name="args">Additional arguments for this event.</param>
368
protected virtual void OnDetectRelatedBundle(DetectRelatedBundleEventArgs args)
@@ -532,7 +375,7 @@ namespace WixToolset.Mba.Core
375
}
376
377
/// <summary>
535
- /// Called when the detection for a specific package has begun.
378
+ /// Called by the engine, raises the <see cref="DetectPackageBegin"/> event.
379
/// </summary>
380
/// <param name="args">Additional arguments for this event.</param>
381
protected virtual void OnDetectPackageBegin(DetectPackageBeginEventArgs args)
@@ -545,7 +388,7 @@ namespace WixToolset.Mba.Core
388
}
389
390
/// <summary>
548
- /// Called when a package was not detected but a package using the same provider key was.
391
+ /// Called by the engine, raises the <see cref="DetectCompatibleMsiPackage"/> event.
392
/// </summary>
393
/// <param name="args">Additional arguments for this event.</param>
394
protected virtual void OnDetectCompatibleMsiPackage(DetectCompatibleMsiPackageEventArgs args)
@@ -558,7 +401,7 @@ namespace WixToolset.Mba.Core
401
}
402
403
/// <summary>
561
- /// Called when a related MSI package has been detected for a package.
404
+ /// Called by the engine, raises the <see cref="DetectRelatedMsiPackage"/> event.
405
/// </summary>
406
/// <param name="args">Additional arguments for this event.</param>
407
protected virtual void OnDetectRelatedMsiPackage(DetectRelatedMsiPackageEventArgs args)
@@ -571,7 +414,7 @@ namespace WixToolset.Mba.Core
414
}
415
416
/// <summary>
574
- /// Called when an MSP package detects a target MSI has been detected.
417
+ /// Called by the engine, raises the <see cref="DetectTargetMsiPackage"/> event.
418
/// </summary>
419
/// <param name="args">Additional arguments for this event.</param>
420
protected virtual void OnDetectTargetMsiPackage(DetectTargetMsiPackageEventArgs args)
@@ -584,7 +427,7 @@ namespace WixToolset.Mba.Core
427
}
428
429
/// <summary>
587
- /// Called when an MSI feature has been detected for a package.
430
+ /// Called by the engine, raises the <see cref="DetectMsiFeature"/> event.
431
/// </summary>
432
/// <param name="args">Additional arguments for this event.</param>
433
protected virtual void OnDetectMsiFeature(DetectMsiFeatureEventArgs args)
@@ -597,7 +440,7 @@ namespace WixToolset.Mba.Core
440
}
441
442
/// <summary>
600
- /// Called when the detection for a specific package has completed.
443
+ /// Called by the engine, raises the <see cref="DetectPackageComplete"/> event.
444
/// </summary>
445
/// <param name="args">Additional arguments for this event.</param>
446
protected virtual void OnDetectPackageComplete(DetectPackageCompleteEventArgs args)
@@ -610,7 +453,7 @@ namespace WixToolset.Mba.Core
453
}
454
455
/// <summary>
613
- /// Called when the detection phase has completed.
456
+ /// Called by the engine, raises the <see cref="DetectComplete"/> event.
457
/// </summary>
458
/// <param name="args">Additional arguments for this event.</param>
459
protected virtual void OnDetectComplete(DetectCompleteEventArgs args)
@@ -623,7 +466,7 @@ namespace WixToolset.Mba.Core
466
}
467
468
/// <summary>
626
- /// Called when the engine has begun planning the installation.
469
+ /// Called by the engine, raises the <see cref="PlanBegin"/> event.
470
/// </summary>
471
/// <param name="args">Additional arguments for this event.</param>
472
protected virtual void OnPlanBegin(PlanBeginEventArgs args)
@@ -636,7 +479,7 @@ namespace WixToolset.Mba.Core
479
}
480
481
/// <summary>
639
- /// Called when the engine has begun planning for a prior bundle.
482
+ /// Called by the engine, raises the <see cref="PlanRelatedBundle"/> event.
483
/// </summary>
484
/// <param name="args">Additional arguments for this event.</param>
485
protected virtual void OnPlanRelatedBundle(PlanRelatedBundleEventArgs args)
@@ -649,7 +492,7 @@ namespace WixToolset.Mba.Core
492
}
493
494
/// <summary>
652
- /// Called when the engine has begun planning the installation of a specific package.
495
+ /// Called by the engine, raises the <see cref="PlanPackageBegin"/> event.
496
/// </summary>
497
/// <param name="args">Additional arguments for this event.</param>
498
protected virtual void OnPlanPackageBegin(PlanPackageBeginEventArgs args)
@@ -662,7 +505,7 @@ namespace WixToolset.Mba.Core
505
}
506
507
/// <summary>
665
- /// Called when the engine plans a new, compatible package using the same provider key.
508
+ /// Called by the engine, raises the <see cref="PlanCompatibleMsiPackageBegin"/> event.
509
/// </summary>
510
/// <param name="args">Additional arguments for this event.</param>
511
protected virtual void OnPlanCompatibleMsiPackageBegin(PlanCompatibleMsiPackageBeginEventArgs args)
@@ -675,7 +518,7 @@ namespace WixToolset.Mba.Core
518
}
519
520
/// <summary>
678
- /// Called when the engine has completed planning the installation of a specific package.
521
+ /// Called by the engine, raises the <see cref="PlanCompatibleMsiPackageComplete"/> event.
522
/// </summary>
523
/// <param name="args">Additional arguments for this event.</param>
524
protected virtual void OnPlanCompatibleMsiPackageComplete(PlanCompatibleMsiPackageCompleteEventArgs args)
@@ -688,7 +531,7 @@ namespace WixToolset.Mba.Core
531
}
532
533
/// <summary>
691
- /// Called when the engine is about to plan the target MSI of a MSP package.
534
+ /// Called by the engine, raises the <see cref="PlanTargetMsiPackage"/> event.
535
/// </summary>
536
/// <param name="args">Additional arguments for this event.</param>
537
protected virtual void OnPlanTargetMsiPackage(PlanTargetMsiPackageEventArgs args)
@@ -701,7 +544,7 @@ namespace WixToolset.Mba.Core
544
}
545
546
/// <summary>
704
- /// Called when the engine is about to plan an MSI feature of a specific package.
547
+ /// Called by the engine, raises the <see cref="PlanMsiFeature"/> event.
548
/// </summary>
549
/// <param name="args">Additional arguments for this event.</param>
550
protected virtual void OnPlanMsiFeature(PlanMsiFeatureEventArgs args)
@@ -714,7 +557,7 @@ namespace WixToolset.Mba.Core
557
}
558
559
/// <summary>
717
- /// Called when the engine is planning an MSI or MSP package.
560
+ /// Called by the engine, raises the <see cref="PlanMsiPackage"/> event.
561
/// </summary>
562
/// <param name="args">Additional arguments for this event.</param>
563
protected virtual void OnPlanMsiPackage(PlanMsiPackageEventArgs args)
@@ -727,7 +570,7 @@ namespace WixToolset.Mba.Core
570
}
571
572
/// <summary>
730
- /// Called when then engine has completed planning the installation of a specific package.
573
+ /// Called by the engine, raises the <see cref="PlanPackageComplete"/> event.
574
/// </summary>
575
/// <param name="args">Additional arguments for this event.</param>
576
protected virtual void OnPlanPackageComplete(PlanPackageCompleteEventArgs args)
@@ -740,7 +583,7 @@ namespace WixToolset.Mba.Core
583
}
584
585
/// <summary>
743
- /// Called when the engine has completed planning the installation.
586
+ /// Called by the engine, raises the <see cref="PlanComplete"/> event.
587
/// </summary>
588
/// <param name="args">Additional arguments for this event.</param>
589
protected virtual void OnPlanComplete(PlanCompleteEventArgs args)
@@ -753,7 +596,7 @@ namespace WixToolset.Mba.Core
596
}
597
598
/// <summary>
756
- /// Called when the engine has begun installing the bundle.
599
+ /// Called by the engine, raises the <see cref="ApplyBegin"/> event.
600
/// </summary>
601
/// <param name="args">Additional arguments for this event.</param>
602
protected virtual void OnApplyBegin(ApplyBeginEventArgs args)
@@ -766,7 +609,7 @@ namespace WixToolset.Mba.Core
609
}
610
611
/// <summary>
769
- /// Called when the engine is about to start the elevated process.
612
+ /// Called by the engine, raises the <see cref="ElevateBegin"/> event.
613
/// </summary>
614
/// <param name="args">Additional arguments for this event.</param>
615
protected virtual void OnElevateBegin(ElevateBeginEventArgs args)
@@ -779,7 +622,7 @@ namespace WixToolset.Mba.Core
622
}
623
624
/// <summary>
782
- /// Called when the engine has completed starting the elevated process.
625
+ /// Called by the engine, raises the <see cref="ElevateComplete"/> event.
626
/// </summary>
627
/// <param name="args">Additional arguments for this event.</param>
628
protected virtual void OnElevateComplete(ElevateCompleteEventArgs args)
@@ -792,7 +635,7 @@ namespace WixToolset.Mba.Core
635
}
636
637
/// <summary>
795
- /// Called when the engine has changed progress for the bundle installation.
638
+ /// Called by the engine, raises the <see cref="Progress"/> event.
639
/// </summary>
640
/// <param name="args">Additional arguments for this event.</param>
641
protected virtual void OnProgress(ProgressEventArgs args)
@@ -805,7 +648,7 @@ namespace WixToolset.Mba.Core
648
}
649
650
/// <summary>
808
- /// Called when the engine has encountered an error.
651
+ /// Called by the engine, raises the <see cref="Error"/> event.
652
/// </summary>
653
/// <param name="args">Additional arguments for this event.</param>
654
protected virtual void OnError(ErrorEventArgs args)
@@ -818,7 +661,7 @@ namespace WixToolset.Mba.Core
661
}
662
663
/// <summary>
821
- /// Called when the engine has begun registering the location and visibility of the bundle.
664
+ /// Called by the engine, raises the <see cref="RegisterBegin"/> event.
665
/// </summary>
666
/// <param name="args">Additional arguments for this event.</param>
667
protected virtual void OnRegisterBegin(RegisterBeginEventArgs args)
@@ -831,7 +674,7 @@ namespace WixToolset.Mba.Core
674
}
675
676
/// <summary>
834
- /// Called when the engine has completed registering the location and visilibity of the bundle.
677
+ /// Called by the engine, raises the <see cref="RegisterComplete"/> event.
678
/// </summary>
679
/// <param name="args">Additional arguments for this event.</param>
680
protected virtual void OnRegisterComplete(RegisterCompleteEventArgs args)
@@ -844,7 +687,7 @@ namespace WixToolset.Mba.Core
687
}
688
689
/// <summary>
847
- /// Called when the engine has begun removing the registration for the location and visibility of the bundle.
690
+ /// Called by the engine, raises the <see cref="UnregisterBegin"/> event.
691
/// </summary>
692
/// <param name="args">Additional arguments for this event.</param>
693
protected virtual void OnUnregisterBegin(UnregisterBeginEventArgs args)
@@ -857,7 +700,7 @@ namespace WixToolset.Mba.Core
700
}
701
702
/// <summary>
860
- /// Called when the engine has completed removing the registration for the location and visibility of the bundle.
703
+ /// Called by the engine, raises the <see cref="UnregisterComplete"/> event.
704
/// </summary>
705
/// <param name="args">Additional arguments for this event.</param>
706
protected virtual void OnUnregisterComplete(UnregisterCompleteEventArgs args)
@@ -870,7 +713,7 @@ namespace WixToolset.Mba.Core
713
}
714
715
/// <summary>
873
- /// Called when the engine begins to cache the installation sources.
716
+ /// Called by the engine, raises the <see cref="CacheBegin"/> event.
717
/// </summary>
718
/// <param name="args"></param>
719
protected virtual void OnCacheBegin(CacheBeginEventArgs args)
@@ -883,7 +726,7 @@ namespace WixToolset.Mba.Core
726
}
727
728
/// <summary>
886
- /// Called by the engine when it begins to cache a specific package.
729
+ /// Called by the engine, raises the <see cref="CachePackageBegin"/> event.
730
/// </summary>
731
/// <param name="args"></param>
732
protected virtual void OnCachePackageBegin(CachePackageBeginEventArgs args)
@@ -896,7 +739,7 @@ namespace WixToolset.Mba.Core
739
}
740
741
/// <summary>
899
- /// Called when the engine begins to cache the container or payload.
742
+ /// Called by the engine, raises the <see cref="CacheAcquireBegin"/> event.
743
/// </summary>
744
/// <param name="args"></param>
745
protected virtual void OnCacheAcquireBegin(CacheAcquireBeginEventArgs args)
@@ -909,7 +752,7 @@ namespace WixToolset.Mba.Core
752
}
753
754
/// <summary>
912
- /// Called when the engine has progressed on caching the container or payload.
755
+ /// Called by the engine, raises the <see cref="CacheAcquireProgress"/> event.
756
/// </summary>
757
/// <param name="args"></param>
758
protected virtual void OnCacheAcquireProgress(CacheAcquireProgressEventArgs args)
@@ -922,8 +765,7 @@ namespace WixToolset.Mba.Core
765
}
766
767
/// <summary>
925
- /// Called by the engine to allow the BA to change the source
926
- /// using <see cref="M:Engine.SetLocalSource"/> or <see cref="M:Engine.SetDownloadSource"/>.
768
+ /// Called by the engine, raises the <see cref="ResolveSource"/> event.
769
/// </summary>
770
/// <param name="args">Additional arguments for this event.</param>
771
protected virtual void OnResolveSource(ResolveSourceEventArgs args)
@@ -936,7 +778,7 @@ namespace WixToolset.Mba.Core
778
}
779
780
/// <summary>
939
- /// Called when the engine completes caching of the container or payload.
781
+ /// Called by the engine, raises the <see cref="CacheAcquireComplete"/> event.
782
/// </summary>
783
/// <param name="args"></param>
784
protected virtual void OnCacheAcquireComplete(CacheAcquireCompleteEventArgs args)
@@ -949,7 +791,7 @@ namespace WixToolset.Mba.Core
791
}
792
793
/// <summary>
952
- /// Called when the engine has started verify the payload.
794
+ /// Called by the engine, raises the <see cref="CacheVerifyBegin"/> event.
795
/// </summary>
796
/// <param name="args"></param>
797
protected virtual void OnCacheVerifyBegin(CacheVerifyBeginEventArgs args)
@@ -962,7 +804,7 @@ namespace WixToolset.Mba.Core
804
}
805
806
/// <summary>
965
- /// Called when the engine completes verification of the payload.
807
+ /// Called by the engine, raises the <see cref="CacheVerifyComplete"/> event.
808
/// </summary>
809
/// <param name="args"></param>
810
protected virtual void OnCacheVerifyComplete(CacheVerifyCompleteEventArgs args)
@@ -975,7 +817,7 @@ namespace WixToolset.Mba.Core
817
}
818
819
/// <summary>
978
- /// Called when the engine completes caching a specific package.
820
+ /// Called by the engine, raises the <see cref="CachePackageComplete"/> event.
821
/// </summary>
822
/// <param name="args"></param>
823
protected virtual void OnCachePackageComplete(CachePackageCompleteEventArgs args)
@@ -988,7 +830,7 @@ namespace WixToolset.Mba.Core
830
}
831
832
/// <summary>
991
- /// Called after the engine has cached the installation sources.
833
+ /// Called by the engine, raises the <see cref="CacheComplete"/> event.
834
/// </summary>
835
/// <param name="args">Additional arguments for this event.</param>
836
protected virtual void OnCacheComplete(CacheCompleteEventArgs args)
@@ -1001,7 +843,7 @@ namespace WixToolset.Mba.Core
843
}
844
845
/// <summary>
1004
- /// Called when the engine has begun installing packages.
846
+ /// Called by the engine, raises the <see cref="ExecuteBegin"/> event.
847
/// </summary>
848
/// <param name="args">Additional arguments for this event.</param>
849
protected virtual void OnExecuteBegin(ExecuteBeginEventArgs args)
@@ -1014,7 +856,7 @@ namespace WixToolset.Mba.Core
856
}
857
858
/// <summary>
1017
- /// Called when the engine has begun installing a specific package.
859
+ /// Called by the engine, raises the <see cref="ExecutePackageBegin"/> event.
860
/// </summary>
861
/// <param name="args">Additional arguments for this event.</param>
862
protected virtual void OnExecutePackageBegin(ExecutePackageBeginEventArgs args)
@@ -1027,7 +869,7 @@ namespace WixToolset.Mba.Core
869
}
870
871
/// <summary>
1030
- /// Called when the engine executes one or more patches targeting a product.
872
+ /// Called by the engine, raises the <see cref="ExecutePatchTarget"/> event.
873
/// </summary>
874
/// <param name="args">Additional arguments for this event.</param>
875
protected virtual void OnExecutePatchTarget(ExecutePatchTargetEventArgs args)
@@ -1040,7 +882,7 @@ namespace WixToolset.Mba.Core
882
}
883
884
/// <summary>
1043
- /// Called when Windows Installer sends an installation message.
885
+ /// Called by the engine, raises the <see cref="ExecuteMsiMessage"/> event.
886
/// </summary>
887
/// <param name="args">Additional arguments for this event.</param>
888
protected virtual void OnExecuteMsiMessage(ExecuteMsiMessageEventArgs args)
@@ -1053,7 +895,7 @@ namespace WixToolset.Mba.Core
895
}
896
897
/// <summary>
1056
- /// Called when Windows Installer sends a file in use installation message.
898
+ /// Called by the engine, raises the <see cref="ExecuteFilesInUse"/> event.
899
/// </summary>
900
/// <param name="args">Additional arguments for this event.</param>
901
protected virtual void OnExecuteFilesInUse(ExecuteFilesInUseEventArgs args)
@@ -1066,7 +908,7 @@ namespace WixToolset.Mba.Core
908
}
909
910
/// <summary>
1069
- /// Called when the engine has completed installing a specific package.
911
+ /// Called by the engine, raises the <see cref="ExecutePackageComplete"/> event.
912
/// </summary>
913
/// <param name="args">Additional arguments for this event.</param>
914
protected virtual void OnExecutePackageComplete(ExecutePackageCompleteEventArgs args)
@@ -1079,7 +921,7 @@ namespace WixToolset.Mba.Core
921
}
922
923
/// <summary>
1082
- /// Called when the engine has completed installing packages.
924
+ /// Called by the engine, raises the <see cref="ExecuteComplete"/> event.
925
/// </summary>
926
/// <param name="args">Additional arguments for this event.</param>
927
protected virtual void OnExecuteComplete(ExecuteCompleteEventArgs args)
@@ -1092,7 +934,7 @@ namespace WixToolset.Mba.Core
934
}
935
936
/// <summary>
1095
- /// Called when the engine has completed installing the bundle.
937
+ /// Called by the engine, raises the <see cref="ApplyComplete"/> event.
938
/// </summary>
939
/// <param name="args">Additional arguments for this event.</param>
940
protected virtual void OnApplyComplete(ApplyCompleteEventArgs args)
@@ -1105,7 +947,7 @@ namespace WixToolset.Mba.Core
947
}
948
949
/// <summary>
1108
- /// Called by the engine while executing on payload.
950
+ /// Called by the engine, raises the <see cref="ExecuteProgress"/> event.
951
/// </summary>
952
/// <param name="args">Additional arguments for this event.</param>
953
protected virtual void OnExecuteProgress(ExecuteProgressEventArgs args)
@@ -1118,7 +960,7 @@ namespace WixToolset.Mba.Core
960
}
961
962
/// <summary>
1121
- /// Called by the engine before trying to launch the preapproved executable.
963
+ /// Called by the engine, raises the <see cref="LaunchApprovedExeBegin"/> event.
964
/// </summary>
965
/// <param name="args">Additional arguments for this event.</param>
966
protected virtual void OnLaunchApprovedExeBegin(LaunchApprovedExeBeginEventArgs args)
@@ -1131,7 +973,7 @@ namespace WixToolset.Mba.Core
973
}
974
975
/// <summary>
1134
- /// Called by the engine after trying to launch the preapproved executable.
976
+ /// Called by the engine, raises the <see cref="LaunchApprovedExeComplete"/> event.
977
/// </summary>
978
/// <param name="args">Additional arguments for this event.</param>
979
protected virtual void OnLaunchApprovedExeComplete(LaunchApprovedExeCompleteEventArgs args)
@@ -1144,7 +986,7 @@ namespace WixToolset.Mba.Core
986
}
987
988
/// <summary>
1147
- /// Called by the engine before beginning an MSI transaction.
989
+ /// Called by the engine, raises the <see cref="BeginMsiTransactionBegin"/> event.
990
/// </summary>
991
/// <param name="args">Additional arguments for this event.</param>
992
protected virtual void OnBeginMsiTransactionBegin(BeginMsiTransactionBeginEventArgs args)
@@ -1157,7 +999,7 @@ namespace WixToolset.Mba.Core
999
}
1000
1001
/// <summary>
1160
- /// Called by the engine after beginning an MSI transaction.
1002
+ /// Called by the engine, raises the <see cref="BeginMsiTransactionComplete"/> event.
1003
/// </summary>
1004
/// <param name="args">Additional arguments for this event.</param>
1005
protected virtual void OnBeginMsiTransactionComplete(BeginMsiTransactionCompleteEventArgs args)
@@ -1170,7 +1012,7 @@ namespace WixToolset.Mba.Core
1012
}
1013
1014
/// <summary>
1173
- /// Called by the engine before committing an MSI transaction.
1015
+ /// Called by the engine, raises the <see cref="CommitMsiTransactionBegin"/> event.
1016
/// </summary>
1017
/// <param name="args">Additional arguments for this event.</param>
1018
protected virtual void OnCommitMsiTransactionBegin(CommitMsiTransactionBeginEventArgs args)
@@ -1183,7 +1025,7 @@ namespace WixToolset.Mba.Core
1025
}
1026
1027
/// <summary>
1186
- /// Called by the engine after committing an MSI transaction.
1028
+ /// Called by the engine, raises the <see cref="CommitMsiTransactionComplete"/> event.
1029
/// </summary>
1030
/// <param name="args">Additional arguments for this event.</param>
1031
protected virtual void OnCommitMsiTransactionComplete(CommitMsiTransactionCompleteEventArgs args)
@@ -1196,7 +1038,7 @@ namespace WixToolset.Mba.Core
1038
}
1039
1040
/// <summary>
1199
- /// Called by the engine before rolling back an MSI transaction.
1041
+ /// Called by the engine, raises the <see cref="RollbackMsiTransactionBegin"/> event.
1042
/// </summary>
1043
/// <param name="args">Additional arguments for this event.</param>
1044
protected virtual void OnRollbackMsiTransactionBegin(RollbackMsiTransactionBeginEventArgs args)
@@ -1209,7 +1051,7 @@ namespace WixToolset.Mba.Core
1051
}
1052
1053
/// <summary>
1212
- /// Called by the engine after rolling back an MSI transaction.
1054
+ /// Called by the engine, raises the <see cref="RollbackMsiTransactionComplete"/> event.
1055
/// </summary>
1056
/// <param name="args">Additional arguments for this event.</param>
1057
protected virtual void OnRollbackMsiTransactionComplete(RollbackMsiTransactionCompleteEventArgs args)
@@ -1222,7 +1064,7 @@ namespace WixToolset.Mba.Core
1064
}
1065
1066
/// <summary>
1225
- /// Called by the engine before pausing Windows automatic updates.
1067
+ /// Called by the engine, raises the <see cref="PauseAutomaticUpdatesBegin"/> event.
1068
/// </summary>
1069
/// <param name="args">Additional arguments for this event.</param>
1070
protected virtual void OnPauseAutomaticUpdatesBegin(PauseAutomaticUpdatesBeginEventArgs args)
@@ -1235,7 +1077,7 @@ namespace WixToolset.Mba.Core
1077
}
1078
1079
/// <summary>
1238
- /// Called by the engine after pausing Windows automatic updates.
1080
+ /// Called by the engine, raises the <see cref="PauseAutomaticUpdatesComplete"/> event.
1081
/// </summary>
1082
/// <param name="args">Additional arguments for this event.</param>
1083
protected virtual void OnPauseAutomaticUpdatesComplete(PauseAutomaticUpdatesCompleteEventArgs args)
@@ -1248,7 +1090,7 @@ namespace WixToolset.Mba.Core
1090
}
1091
1092
/// <summary>
1251
- /// Called by the engine before taking a system restore point.
1093
+ /// Called by the engine, raises the <see cref="SystemRestorePointBegin"/> event.
1094
/// </summary>
1095
/// <param name="args">Additional arguments for this event.</param>
1096
protected virtual void OnSystemRestorePointBegin(SystemRestorePointBeginEventArgs args)
@@ -1261,7 +1103,7 @@ namespace WixToolset.Mba.Core
1103
}
1104
1105
/// <summary>
1264
- /// Called by the engine after taking a system restore point.
1106
+ /// Called by the engine, raises the <see cref="SystemRestorePointComplete"/> event.
1107
/// </summary>
1108
/// <param name="args">Additional arguments for this event.</param>
1109
protected virtual void OnSystemRestorePointComplete(SystemRestorePointCompleteEventArgs args)
src/WixToolset.Mba.Core/BootstrapperApplicationData.cs
+38
@@ -6,12 +6,29 @@ namespace WixToolset.Mba.Core
6
using System.IO;
7
using System.Xml.XPath;
8
9
+ /// <summary>
10
+ /// Utility class for reading BootstrapperApplicationData.xml.
11
+ /// </summary>
12
public class BootstrapperApplicationData : IBootstrapperApplicationData
13
{
14
+ /// <summary>
15
+ ///
16
+ /// </summary>
17
public const string DefaultFileName = "BootstrapperApplicationData.xml";
18
+
19
+ /// <summary>
20
+ ///
21
+ /// </summary>
22
public const string XMLNamespace = "http://wixtoolset.org/schemas/v4/BootstrapperApplicationData";
23
24
+ /// <summary>
25
+ /// The default path of where the BA was extracted to.
26
+ /// </summary>
27
public static readonly DirectoryInfo DefaultFolder;
28
+
29
+ /// <summary>
30
+ /// The default path to BootstrapperApplicationData.xml.
31
+ /// </summary>
32
public static readonly FileInfo DefaultFile;
33
34
static BootstrapperApplicationData()
@@ -20,12 +37,21 @@ namespace WixToolset.Mba.Core
37
DefaultFile = new FileInfo(Path.Combine(DefaultFolder.FullName, DefaultFileName));
38
}
39
40
+ /// <inheritdoc/>
41
public FileInfo BADataFile { get; private set; }
42
43
+ /// <inheritdoc/>
44
public IBundleInfo Bundle { get; private set; }
45
46
+ /// <summary>
47
+ /// Uses the default location for BootstrapperApplicationData.xml.
48
+ /// </summary>
49
public BootstrapperApplicationData() : this(DefaultFile) { }
50
51
+ /// <summary>
52
+ /// Uses the given file for BootstrapperApplicationData.xml.
53
+ /// </summary>
54
+ /// <param name="baDataFile"></param>
55
public BootstrapperApplicationData(FileInfo baDataFile)
56
{
57
this.BADataFile = baDataFile;
@@ -36,6 +62,12 @@ namespace WixToolset.Mba.Core
62
}
63
}
64
65
+ /// <summary>
66
+ /// Utility method for parsing BootstrapperApplicationData.xml.
67
+ /// </summary>
68
+ /// <param name="node"></param>
69
+ /// <param name="attributeName"></param>
70
+ /// <returns></returns>
71
public static string GetAttribute(XPathNavigator node, string attributeName)
72
{
73
XPathNavigator attribute = node.SelectSingleNode("@" + attributeName);
@@ -48,6 +80,12 @@ namespace WixToolset.Mba.Core
80
return attribute.Value;
81
}
82
83
+ /// <summary>
84
+ /// Utility method for parsing BootstrapperApplicationData.xml.
85
+ /// </summary>
86
+ /// <param name="node"></param>
87
+ /// <param name="attributeName"></param>
88
+ /// <returns></returns>
89
public static bool? GetYesNoAttribute(XPathNavigator node, string attributeName)
90
{
91
string attributeValue = GetAttribute(node, attributeName);
src/WixToolset.Mba.Core/BootstrapperCommand.cs
+30
@@ -6,10 +6,28 @@ namespace WixToolset.Mba.Core
6
using System.ComponentModel;
7
using System.Runtime.InteropServices;
8
9
+ /// <summary>
10
+ /// Default implementation of <see cref="IBootstrapperCommand"/>.
11
+ /// </summary>
12
public sealed class BootstrapperCommand : IBootstrapperCommand
13
{
14
private readonly string commandLine;
15
16
+ /// <summary>
17
+ ///
18
+ /// </summary>
19
+ /// <param name="action"></param>
20
+ /// <param name="display"></param>
21
+ /// <param name="restart"></param>
22
+ /// <param name="commandLine"></param>
23
+ /// <param name="cmdShow"></param>
24
+ /// <param name="resume"></param>
25
+ /// <param name="splashScreen"></param>
26
+ /// <param name="relation"></param>
27
+ /// <param name="passthrough"></param>
28
+ /// <param name="layoutDirectory"></param>
29
+ /// <param name="bootstrapperWorkingFolder"></param>
30
+ /// <param name="bootstrapperApplicationDataPath"></param>
31
public BootstrapperCommand(
32
LaunchAction action,
33
Display display,
@@ -38,28 +56,40 @@ namespace WixToolset.Mba.Core
56
this.BootstrapperApplicationDataPath = bootstrapperApplicationDataPath;
57
}
58
59
+ /// <inheritdoc/>
60
public LaunchAction Action { get; }
61
62
+ /// <inheritdoc/>
63
public Display Display { get; }
64
65
+ /// <inheritdoc/>
66
public Restart Restart { get; }
67
68
+ /// <inheritdoc/>
69
public string[] CommandLineArgs => GetCommandLineArgs(this.commandLine);
70
71
+ /// <inheritdoc/>
72
public int CmdShow { get; }
73
74
+ /// <inheritdoc/>
75
public ResumeType Resume { get; }
76
77
+ /// <inheritdoc/>
78
public IntPtr SplashScreen { get; }
79
80
+ /// <inheritdoc/>
81
public RelationType Relation { get; }
82
83
+ /// <inheritdoc/>
84
public bool Passthrough { get; }
85
86
+ /// <inheritdoc/>
87
public string LayoutDirectory { get; }
88
89
+ /// <inheritdoc/>
90
public string BootstrapperWorkingFolder { get; }
91
92
+ /// <inheritdoc/>
93
public string BootstrapperApplicationDataPath { get; }
94
95
/// <summary>
src/WixToolset.Mba.Core/BundleInfo.cs
+21
@@ -8,11 +8,21 @@ namespace WixToolset.Mba.Core
8
using System.Xml;
9
using System.Xml.XPath;
10
11
+ /// <summary>
12
+ /// Default implementation of <see cref="IBundleInfo"/>.
13
+ /// </summary>
14
public class BundleInfo : IBundleInfo
15
{
16
+ /// <inheritdoc/>
17
public bool PerMachine { get; internal set; }
18
+
19
+ /// <inheritdoc/>
20
public string Name { get; internal set; }
21
+
22
+ /// <inheritdoc/>
23
public string LogVariable { get; internal set; }
24
+
25
+ /// <inheritdoc/>
26
public IDictionary<string, IPackageInfo> Packages { get; internal set; }
27
28
internal BundleInfo()
@@ -20,6 +30,7 @@ namespace WixToolset.Mba.Core
30
this.Packages = new Dictionary<string, IPackageInfo>();
31
}
32
33
+ /// <inheritdoc/>
34
public IPackageInfo AddRelatedBundleAsPackage(DetectRelatedBundleEventArgs e)
35
{
36
var package = PackageInfo.GetRelatedBundleAsPackage(e.ProductCode, e.RelationType, e.PerMachine, e.Version);
@@ -27,6 +38,11 @@ namespace WixToolset.Mba.Core
38
return package;
39
}
40
41
+ /// <summary>
42
+ /// Parses BA manifest from the given stream.
43
+ /// </summary>
44
+ /// <param name="stream"></param>
45
+ /// <returns></returns>
46
public static IBundleInfo ParseBundleFromStream(Stream stream)
47
{
48
XPathDocument manifest = new XPathDocument(stream);
@@ -34,6 +50,11 @@ namespace WixToolset.Mba.Core
50
return ParseBundleFromXml(root);
51
}
52
53
+ /// <summary>
54
+ /// Parses BA manifest from the given <see cref="XPathNavigator"/>.
55
+ /// </summary>
56
+ /// <param name="root">The root of the BA manifest.</param>
57
+ /// <returns></returns>
58
public static IBundleInfo ParseBundleFromXml(XPathNavigator root)
59
{
60
BundleInfo bundle = new BundleInfo();
src/WixToolset.Mba.Core/Engine.cs
+41
-2
@@ -9,7 +9,7 @@ namespace WixToolset.Mba.Core
9
using System.Text;
10
11
/// <summary>
12
- /// Container class for the <see cref="IBootstrapperEngine"/> interface.
12
+ /// Default implementation of <see cref="IEngine"/>.
13
/// </summary>
14
public sealed class Engine : IEngine
15
{
@@ -28,6 +28,7 @@ namespace WixToolset.Mba.Core
28
this.engine = engine;
29
}
30
31
+ /// <inheritdoc/>
32
public int PackageCount
33
{
34
get
@@ -39,22 +40,26 @@ namespace WixToolset.Mba.Core
40
}
41
}
42
43
+ /// <inheritdoc/>
44
public void Apply(IntPtr hwndParent)
45
{
46
this.engine.Apply(hwndParent);
47
}
48
49
+ /// <inheritdoc/>
50
public void CloseSplashScreen()
51
{
52
this.engine.CloseSplashScreen();
53
}
54
55
+ /// <inheritdoc/>
56
public int CompareVersions(string version1, string version2)
57
{
58
this.engine.CompareVersions(version1, version2, out var result);
59
return result;
60
}
61
62
+ /// <inheritdoc/>
63
public bool ContainsVariable(string name)
64
{
65
int capacity = 0;
@@ -62,16 +67,19 @@ namespace WixToolset.Mba.Core
67
return NativeMethods.E_NOTFOUND != ret;
68
}
69
70
+ /// <inheritdoc/>
71
public void Detect()
72
{
73
this.Detect(IntPtr.Zero);
74
}
75
76
+ /// <inheritdoc/>
77
public void Detect(IntPtr hwndParent)
78
{
79
this.engine.Detect(hwndParent);
80
}
81
82
+ /// <inheritdoc/>
83
public bool Elevate(IntPtr hwndParent)
84
{
85
int ret = this.engine.Elevate(hwndParent);
@@ -90,6 +98,7 @@ namespace WixToolset.Mba.Core
98
}
99
}
100
101
+ /// <inheritdoc/>
102
public string EscapeString(string input)
103
{
104
int capacity = InitialBufferSize;
@@ -111,6 +120,7 @@ namespace WixToolset.Mba.Core
120
return sb.ToString();
121
}
122
123
+ /// <inheritdoc/>
124
public bool EvaluateCondition(string condition)
125
{
126
bool value;
@@ -119,6 +129,7 @@ namespace WixToolset.Mba.Core
129
return value;
130
}
131
132
+ /// <inheritdoc/>
133
public string FormatString(string format)
134
{
135
int capacity = InitialBufferSize;
@@ -140,6 +151,7 @@ namespace WixToolset.Mba.Core
151
return sb.ToString();
152
}
153
154
+ /// <inheritdoc/>
155
public long GetVariableNumeric(string name)
156
{
157
int ret = this.engine.GetVariableNumeric(name, out long value);
@@ -151,6 +163,7 @@ namespace WixToolset.Mba.Core
163
return value;
164
}
165
166
+ /// <inheritdoc/>
167
public SecureString GetVariableSecureString(string name)
168
{
169
var pUniString = this.getStringVariable(name, out var length);
@@ -167,6 +180,7 @@ namespace WixToolset.Mba.Core
180
}
181
}
182
183
+ /// <inheritdoc/>
184
public string GetVariableString(string name)
185
{
186
int length;
@@ -184,6 +198,7 @@ namespace WixToolset.Mba.Core
198
}
199
}
200
201
+ /// <inheritdoc/>
202
public string GetVariableVersion(string name)
203
{
204
int length;
@@ -201,46 +216,55 @@ namespace WixToolset.Mba.Core
216
}
217
}
218
219
+ /// <inheritdoc/>
220
public void LaunchApprovedExe(IntPtr hwndParent, string approvedExeForElevationId, string arguments)
221
{
222
this.LaunchApprovedExe(hwndParent, approvedExeForElevationId, arguments, 0);
223
}
224
225
+ /// <inheritdoc/>
226
public void LaunchApprovedExe(IntPtr hwndParent, string approvedExeForElevationId, string arguments, int waitForInputIdleTimeout)
227
{
228
this.engine.LaunchApprovedExe(hwndParent, approvedExeForElevationId, arguments, waitForInputIdleTimeout);
229
}
230
+ /// <inheritdoc/>
231
232
public void Log(LogLevel level, string message)
233
{
234
this.engine.Log(level, message);
235
}
236
237
+ /// <inheritdoc/>
238
public void Plan(LaunchAction action)
239
{
240
this.engine.Plan(action);
241
}
242
243
+ /// <inheritdoc/>
244
public void SetUpdate(string localSource, string downloadSource, long size, UpdateHashType hashType, byte[] hash)
245
{
246
this.engine.SetUpdate(localSource, downloadSource, size, hashType, hash, null == hash ? 0 : hash.Length);
247
}
248
249
+ /// <inheritdoc/>
250
public void SetLocalSource(string packageOrContainerId, string payloadId, string path)
251
{
252
this.engine.SetLocalSource(packageOrContainerId, payloadId, path);
253
}
254
255
+ /// <inheritdoc/>
256
public void SetDownloadSource(string packageOrContainerId, string payloadId, string url, string user, string password)
257
{
258
this.engine.SetDownloadSource(packageOrContainerId, payloadId, url, user, password);
259
}
260
261
+ /// <inheritdoc/>
262
public void SetVariableNumeric(string name, long value)
263
{
264
this.engine.SetVariableNumeric(name, value);
265
}
266
267
+ /// <inheritdoc/>
268
public void SetVariableString(string name, SecureString value, bool formatted)
269
{
270
IntPtr pValue = Marshal.SecureStringToCoTaskMemUnicode(value);
@@ -254,6 +278,7 @@ namespace WixToolset.Mba.Core
278
}
279
}
280
281
+ /// <inheritdoc/>
282
public void SetVariableString(string name, string value, bool formatted)
283
{
284
IntPtr pValue = Marshal.StringToCoTaskMemUni(value);
@@ -267,6 +292,7 @@ namespace WixToolset.Mba.Core
292
}
293
}
294
295
+ /// <inheritdoc/>
296
public void SetVariableVersion(string name, string value)
297
{
298
IntPtr pValue = Marshal.StringToCoTaskMemUni(value);
@@ -280,6 +306,7 @@ namespace WixToolset.Mba.Core
306
}
307
}
308
309
+ /// <inheritdoc/>
310
public int SendEmbeddedError(int errorCode, string message, int uiHint)
311
{
312
int result = 0;
@@ -287,6 +314,7 @@ namespace WixToolset.Mba.Core
314
return result;
315
}
316
317
+ /// <inheritdoc/>
318
public int SendEmbeddedProgress(int progressPercentage, int overallPercentage)
319
{
320
int result = 0;
@@ -294,6 +322,7 @@ namespace WixToolset.Mba.Core
322
return result;
323
}
324
325
+ /// <inheritdoc/>
326
public void Quit(int exitCode)
327
{
328
this.engine.Quit(exitCode);
@@ -423,6 +452,11 @@ namespace WixToolset.Mba.Core
452
return value;
453
}
454
455
+ /// <summary>
456
+ /// Utility method for converting a <see cref="Version"/> into a <see cref="long"/>.
457
+ /// </summary>
458
+ /// <param name="version"></param>
459
+ /// <returns></returns>
460
public static long VersionToLong(Version version)
461
{
462
// In Windows, each version component has a max value of 65535,
@@ -435,6 +469,11 @@ namespace WixToolset.Mba.Core
469
return major | minor | build | revision;
470
}
471
472
+ /// <summary>
473
+ /// Utility method for converting a <see cref="long"/> into a <see cref="Version"/>.
474
+ /// </summary>
475
+ /// <param name="version"></param>
476
+ /// <returns></returns>
477
public static Version LongToVersion(long version)
478
{
479
int major = (int)((version & ((long)0xffff << 48)) >> 48);
@@ -446,7 +485,7 @@ namespace WixToolset.Mba.Core
485
}
486
487
/// <summary>
449
- /// Verifies that VersionVariables can pass on the given Version to the engine.
488
+ /// Verifies that Version can be represented in a <see cref="long"/>.
489
/// If the Build or Revision fields are undefined, they are set to zero.
490
/// </summary>
491
public static Version NormalizeVersion(Version version)
src/WixToolset.Mba.Core/EventArgs.cs
+53
-1
@@ -163,7 +163,7 @@ namespace WixToolset.Mba.Core
163
/// <para>To prevent shutting down or logging off, set <see cref="CancellableHResultEventArgs.Cancel"/> to
164
/// true; otherwise, set it to false.</para>
165
/// <para>By default setup will prevent shutting down or logging off between
166
- /// <see cref="BootstrapperApplication.ApplyBegin"/> and <see cref="BootstrapperApplication.ApplyComplete"/>.</para>
166
+ /// <see cref="IDefaultBootstrapperApplication.ApplyBegin"/> and <see cref="IDefaultBootstrapperApplication.ApplyComplete"/>.</para>
167
/// <para>If <see cref="SystemShutdownEventArgs.Reasons"/> contains <see cref="EndSessionReasons.Critical"/>
168
/// the bootstrapper cannot prevent the shutdown and only has a few seconds to save state or perform any other
169
/// critical operations before being closed by the operating system.</para>
@@ -1950,6 +1950,10 @@ namespace WixToolset.Mba.Core
1950
[Serializable]
1951
public class LaunchApprovedExeBeginEventArgs : CancellableHResultEventArgs
1952
{
1953
+ /// <summary>
1954
+ ///
1955
+ /// </summary>
1956
+ /// <param name="cancelRecommendation"></param>
1957
public LaunchApprovedExeBeginEventArgs(bool cancelRecommendation)
1958
: base(cancelRecommendation)
1959
{
@@ -1964,6 +1968,11 @@ namespace WixToolset.Mba.Core
1968
{
1969
private int processId;
1970
1971
+ /// <summary>
1972
+ ///
1973
+ /// </summary>
1974
+ /// <param name="hrStatus"></param>
1975
+ /// <param name="processId"></param>
1976
public LaunchApprovedExeCompleteEventArgs(int hrStatus, int processId)
1977
: base(hrStatus)
1978
{
@@ -1988,6 +1997,11 @@ namespace WixToolset.Mba.Core
1997
{
1998
private string transactionId;
1999
2000
+ /// <summary>
2001
+ ///
2002
+ /// </summary>
2003
+ /// <param name="transactionId"></param>
2004
+ /// <param name="cancelRecommendation"></param>
2005
public BeginMsiTransactionBeginEventArgs(string transactionId, bool cancelRecommendation)
2006
: base(cancelRecommendation)
2007
{
@@ -2011,6 +2025,11 @@ namespace WixToolset.Mba.Core
2025
{
2026
private string transactionId;
2027
2028
+ /// <summary>
2029
+ ///
2030
+ /// </summary>
2031
+ /// <param name="transactionId"></param>
2032
+ /// <param name="hrStatus"></param>
2033
public BeginMsiTransactionCompleteEventArgs(string transactionId, int hrStatus)
2034
: base(hrStatus)
2035
{
@@ -2034,6 +2053,11 @@ namespace WixToolset.Mba.Core
2053
{
2054
private string transactionId;
2055
2056
+ /// <summary>
2057
+ ///
2058
+ /// </summary>
2059
+ /// <param name="transactionId"></param>
2060
+ /// <param name="cancelRecommendation"></param>
2061
public CommitMsiTransactionBeginEventArgs(string transactionId, bool cancelRecommendation)
2062
: base(cancelRecommendation)
2063
{
@@ -2057,6 +2081,11 @@ namespace WixToolset.Mba.Core
2081
{
2082
private string transactionId;
2083
2084
+ /// <summary>
2085
+ ///
2086
+ /// </summary>
2087
+ /// <param name="transactionId"></param>
2088
+ /// <param name="hrStatus"></param>
2089
public CommitMsiTransactionCompleteEventArgs(string transactionId, int hrStatus)
2090
: base(hrStatus)
2091
{
@@ -2080,6 +2109,10 @@ namespace WixToolset.Mba.Core
2109
{
2110
private string transactionId;
2111
2112
+ /// <summary>
2113
+ ///
2114
+ /// </summary>
2115
+ /// <param name="transactionId"></param>
2116
public RollbackMsiTransactionBeginEventArgs(string transactionId)
2117
{
2118
this.transactionId = transactionId;
@@ -2102,6 +2135,11 @@ namespace WixToolset.Mba.Core
2135
{
2136
private string transactionId;
2137
2138
+ /// <summary>
2139
+ ///
2140
+ /// </summary>
2141
+ /// <param name="transactionId"></param>
2142
+ /// <param name="hrStatus"></param>
2143
public RollbackMsiTransactionCompleteEventArgs(string transactionId, int hrStatus)
2144
: base(hrStatus)
2145
{
@@ -2123,6 +2161,9 @@ namespace WixToolset.Mba.Core
2161
[Serializable]
2162
public class PauseAutomaticUpdatesBeginEventArgs : HResultEventArgs
2163
{
2164
+ /// <summary>
2165
+ ///
2166
+ /// </summary>
2167
public PauseAutomaticUpdatesBeginEventArgs()
2168
{
2169
}
@@ -2134,6 +2175,10 @@ namespace WixToolset.Mba.Core
2175
[Serializable]
2176
public class PauseAutomaticUpdatesCompleteEventArgs : StatusEventArgs
2177
{
2178
+ /// <summary>
2179
+ ///
2180
+ /// </summary>
2181
+ /// <param name="hrStatus"></param>
2182
public PauseAutomaticUpdatesCompleteEventArgs(int hrStatus)
2183
: base(hrStatus)
2184
{
@@ -2146,6 +2191,9 @@ namespace WixToolset.Mba.Core
2191
[Serializable]
2192
public class SystemRestorePointBeginEventArgs : HResultEventArgs
2193
{
2194
+ /// <summary>
2195
+ ///
2196
+ /// </summary>
2197
public SystemRestorePointBeginEventArgs()
2198
{
2199
}
@@ -2157,6 +2205,10 @@ namespace WixToolset.Mba.Core
2205
[Serializable]
2206
public class SystemRestorePointCompleteEventArgs : StatusEventArgs
2207
{
2208
+ /// <summary>
2209
+ ///
2210
+ /// </summary>
2211
+ /// <param name="hrStatus"></param>
2212
public SystemRestorePointCompleteEventArgs(int hrStatus)
2213
: base(hrStatus)
2214
{
src/WixToolset.Mba.Core/IBootstrapperApplication.cs
+799
-9
@@ -14,14 +14,26 @@ namespace WixToolset.Mba.Core
14
[Guid("53C31D56-49C0-426B-AB06-099D717C67FE")]
15
public interface IBootstrapperApplication
16
{
17
+ /// <summary>
18
+ /// See <see cref="IDefaultBootstrapperApplication.Startup"/>.
19
+ /// </summary>
20
[PreserveSig]
21
[return: MarshalAs(UnmanagedType.I4)]
22
int OnStartup();
23
24
+ /// <summary>
25
+ /// See <see cref="IDefaultBootstrapperApplication.Shutdown"/>.
26
+ /// </summary>
27
[PreserveSig]
28
[return: MarshalAs(UnmanagedType.I4)]
29
int OnShutdown(ref BOOTSTRAPPER_SHUTDOWN_ACTION action);
30
31
+ /// <summary>
32
+ /// See <see cref="IDefaultBootstrapperApplication.SystemShutdown"/>.
33
+ /// </summary>
34
+ /// <param name="dwEndSession"></param>
35
+ /// <param name="fCancel"></param>
36
+ /// <returns></returns>
37
[PreserveSig]
38
[return: MarshalAs(UnmanagedType.I4)]
39
int OnSystemShutdown(
@@ -29,6 +41,13 @@ namespace WixToolset.Mba.Core
41
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
42
);
43
44
+ /// <summary>
45
+ /// See <see cref="IDefaultBootstrapperApplication.DetectBegin"/>.
46
+ /// </summary>
47
+ /// <param name="fInstalled"></param>
48
+ /// <param name="cPackages"></param>
49
+ /// <param name="fCancel"></param>
50
+ /// <returns></returns>
51
[PreserveSig]
52
[return: MarshalAs(UnmanagedType.I4)]
53
int OnDetectBegin(
@@ -37,6 +56,17 @@ namespace WixToolset.Mba.Core
56
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
57
);
58
59
+ /// <summary>
60
+ /// See <see cref="IDefaultBootstrapperApplication.DetectForwardCompatibleBundle"/>.
61
+ /// </summary>
62
+ /// <param name="wzBundleId"></param>
63
+ /// <param name="relationType"></param>
64
+ /// <param name="wzBundleTag"></param>
65
+ /// <param name="fPerMachine"></param>
66
+ /// <param name="wzVersion"></param>
67
+ /// <param name="fCancel"></param>
68
+ /// <param name="fIgnoreBundle"></param>
69
+ /// <returns></returns>
70
[PreserveSig]
71
[return: MarshalAs(UnmanagedType.I4)]
72
int OnDetectForwardCompatibleBundle(
@@ -49,6 +79,13 @@ namespace WixToolset.Mba.Core
79
[MarshalAs(UnmanagedType.Bool)] ref bool fIgnoreBundle
80
);
81
82
+ /// <summary>
83
+ /// See <see cref="IDefaultBootstrapperApplication.DetectUpdateBegin"/>.
84
+ /// </summary>
85
+ /// <param name="wzUpdateLocation"></param>
86
+ /// <param name="fCancel"></param>
87
+ /// <param name="fSkip"></param>
88
+ /// <returns></returns>
89
[PreserveSig]
90
[return: MarshalAs(UnmanagedType.I4)]
91
int OnDetectUpdateBegin(
@@ -57,6 +94,19 @@ namespace WixToolset.Mba.Core
94
[MarshalAs(UnmanagedType.Bool)] ref bool fSkip
95
);
96
97
+ /// <summary>
98
+ /// See <see cref="IDefaultBootstrapperApplication.DetectUpdate"/>.
99
+ /// </summary>
100
+ /// <param name="wzUpdateLocation"></param>
101
+ /// <param name="dw64Size"></param>
102
+ /// <param name="wzVersion"></param>
103
+ /// <param name="wzTitle"></param>
104
+ /// <param name="wzSummary"></param>
105
+ /// <param name="wzContentType"></param>
106
+ /// <param name="wzContent"></param>
107
+ /// <param name="fCancel"></param>
108
+ /// <param name="fStopProcessingUpdates"></param>
109
+ /// <returns></returns>
110
[PreserveSig]
111
[return: MarshalAs(UnmanagedType.I4)]
112
int OnDetectUpdate(
@@ -71,6 +121,12 @@ namespace WixToolset.Mba.Core
121
[MarshalAs(UnmanagedType.Bool)] ref bool fStopProcessingUpdates
122
);
123
124
+ /// <summary>
125
+ /// See <see cref="IDefaultBootstrapperApplication.DetectUpdateComplete"/>.
126
+ /// </summary>
127
+ /// <param name="hrStatus"></param>
128
+ /// <param name="fIgnoreError"></param>
129
+ /// <returns></returns>
130
[PreserveSig]
131
[return: MarshalAs(UnmanagedType.I4)]
132
int OnDetectUpdateComplete(
@@ -78,6 +134,17 @@ namespace WixToolset.Mba.Core
134
[MarshalAs(UnmanagedType.Bool)] ref bool fIgnoreError
135
);
136
137
+ /// <summary>
138
+ /// See <see cref="IDefaultBootstrapperApplication.DetectRelatedBundle"/>.
139
+ /// </summary>
140
+ /// <param name="wzBundleId"></param>
141
+ /// <param name="relationType"></param>
142
+ /// <param name="wzBundleTag"></param>
143
+ /// <param name="fPerMachine"></param>
144
+ /// <param name="wzVersion"></param>
145
+ /// <param name="operation"></param>
146
+ /// <param name="fCancel"></param>
147
+ /// <returns></returns>
148
[PreserveSig]
149
[return: MarshalAs(UnmanagedType.I4)]
150
int OnDetectRelatedBundle(
@@ -90,6 +157,12 @@ namespace WixToolset.Mba.Core
157
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
158
);
159
160
+ /// <summary>
161
+ /// See <see cref="IDefaultBootstrapperApplication.DetectPackageBegin"/>.
162
+ /// </summary>
163
+ /// <param name="wzPackageId"></param>
164
+ /// <param name="fCancel"></param>
165
+ /// <returns></returns>
166
[PreserveSig]
167
[return: MarshalAs(UnmanagedType.I4)]
168
int OnDetectPackageBegin(
@@ -97,6 +170,14 @@ namespace WixToolset.Mba.Core
170
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
171
);
172
173
+ /// <summary>
174
+ /// See <see cref="IDefaultBootstrapperApplication.DetectCompatibleMsiPackage"/>.
175
+ /// </summary>
176
+ /// <param name="wzPackageId"></param>
177
+ /// <param name="wzCompatiblePackageId"></param>
178
+ /// <param name="wzCompatiblePackageVersion"></param>
179
+ /// <param name="fCancel"></param>
180
+ /// <returns></returns>
181
[PreserveSig]
182
[return: MarshalAs(UnmanagedType.I4)]
183
int OnDetectCompatibleMsiPackage(
@@ -106,6 +187,17 @@ namespace WixToolset.Mba.Core
187
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
188
);
189
190
+ /// <summary>
191
+ /// See <see cref="IDefaultBootstrapperApplication.DetectRelatedMsiPackage"/>.
192
+ /// </summary>
193
+ /// <param name="wzPackageId"></param>
194
+ /// <param name="wzUpgradeCode"></param>
195
+ /// <param name="wzProductCode"></param>
196
+ /// <param name="fPerMachine"></param>
197
+ /// <param name="wzVersion"></param>
198
+ /// <param name="operation"></param>
199
+ /// <param name="fCancel"></param>
200
+ /// <returns></returns>
201
[PreserveSig]
202
[return: MarshalAs(UnmanagedType.I4)]
203
int OnDetectRelatedMsiPackage(
@@ -118,6 +210,14 @@ namespace WixToolset.Mba.Core
210
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
211
);
212
213
+ /// <summary>
214
+ /// See <see cref="IDefaultBootstrapperApplication.DetectTargetMsiPackage"/>.
215
+ /// </summary>
216
+ /// <param name="wzPackageId"></param>
217
+ /// <param name="wzProductCode"></param>
218
+ /// <param name="patchState"></param>
219
+ /// <param name="fCancel"></param>
220
+ /// <returns></returns>
221
[PreserveSig]
222
[return: MarshalAs(UnmanagedType.I4)]
223
int OnDetectTargetMsiPackage(
@@ -127,6 +227,14 @@ namespace WixToolset.Mba.Core
227
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
228
);
229
230
+ /// <summary>
231
+ /// See <see cref="IDefaultBootstrapperApplication.DetectMsiFeature"/>.
232
+ /// </summary>
233
+ /// <param name="wzPackageId"></param>
234
+ /// <param name="wzFeatureId"></param>
235
+ /// <param name="state"></param>
236
+ /// <param name="fCancel"></param>
237
+ /// <returns></returns>
238
[PreserveSig]
239
[return: MarshalAs(UnmanagedType.I4)]
240
int OnDetectMsiFeature(
@@ -136,6 +244,13 @@ namespace WixToolset.Mba.Core
244
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
245
);
246
247
+ /// <summary>
248
+ /// See <see cref="IDefaultBootstrapperApplication.DetectPackageComplete"/>.
249
+ /// </summary>
250
+ /// <param name="wzPackageId"></param>
251
+ /// <param name="hrStatus"></param>
252
+ /// <param name="state"></param>
253
+ /// <returns></returns>
254
[PreserveSig]
255
[return: MarshalAs(UnmanagedType.I4)]
256
int OnDetectPackageComplete(
@@ -144,12 +259,23 @@ namespace WixToolset.Mba.Core
259
[MarshalAs(UnmanagedType.U4)] PackageState state
260
);
261
262
+ /// <summary>
263
+ /// See <see cref="IDefaultBootstrapperApplication.DetectComplete"/>.
264
+ /// </summary>
265
+ /// <param name="hrStatus"></param>
266
+ /// <returns></returns>
267
[PreserveSig]
268
[return: MarshalAs(UnmanagedType.I4)]
269
int OnDetectComplete(
270
int hrStatus
271
);
272
273
+ /// <summary>
274
+ /// See <see cref="IDefaultBootstrapperApplication.PlanBegin"/>.
275
+ /// </summary>
276
+ /// <param name="cPackages"></param>
277
+ /// <param name="fCancel"></param>
278
+ /// <returns></returns>
279
[PreserveSig]
280
[return: MarshalAs(UnmanagedType.I4)]
281
int OnPlanBegin(
@@ -157,6 +283,14 @@ namespace WixToolset.Mba.Core
283
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
284
);
285
286
+ /// <summary>
287
+ /// See <see cref="IDefaultBootstrapperApplication.PlanRelatedBundle"/>.
288
+ /// </summary>
289
+ /// <param name="wzBundleId"></param>
290
+ /// <param name="recommendedState"></param>
291
+ /// <param name="pRequestedState"></param>
292
+ /// <param name="fCancel"></param>
293
+ /// <returns></returns>
294
[PreserveSig]
295
[return: MarshalAs(UnmanagedType.I4)]
296
int OnPlanRelatedBundle(
@@ -166,6 +300,14 @@ namespace WixToolset.Mba.Core
300
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
301
);
302
303
+ /// <summary>
304
+ /// See <see cref="IDefaultBootstrapperApplication.PlanPackageBegin"/>.
305
+ /// </summary>
306
+ /// <param name="wzPackageId"></param>
307
+ /// <param name="recommendedState"></param>
308
+ /// <param name="pRequestedState"></param>
309
+ /// <param name="fCancel"></param>
310
+ /// <returns></returns>
311
[PreserveSig]
312
[return: MarshalAs(UnmanagedType.I4)]
313
int OnPlanPackageBegin(
@@ -175,6 +317,16 @@ namespace WixToolset.Mba.Core
317
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
318
);
319
320
+ /// <summary>
321
+ /// See <see cref="IDefaultBootstrapperApplication.PlanCompatibleMsiPackageBegin"/>.
322
+ /// </summary>
323
+ /// <param name="wzPackageId"></param>
324
+ /// <param name="wzCompatiblePackageId"></param>
325
+ /// <param name="wzCompatiblePackageVersion"></param>
326
+ /// <param name="recommendedState"></param>
327
+ /// <param name="pRequestedState"></param>
328
+ /// <param name="fCancel"></param>
329
+ /// <returns></returns>
330
[PreserveSig]
331
[return: MarshalAs(UnmanagedType.I4)]
332
int OnPlanCompatibleMsiPackageBegin(
@@ -186,6 +338,17 @@ namespace WixToolset.Mba.Core
338
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
339
);
340
341
+ /// <summary>
342
+ /// See <see cref="IDefaultBootstrapperApplication.PlanCompatibleMsiPackageComplete"/>.
343
+ /// </summary>
344
+ /// <param name="wzPackageId"></param>
345
+ /// <param name="wzCompatiblePackageId"></param>
346
+ /// <param name="hrStatus"></param>
347
+ /// <param name="state"></param>
348
+ /// <param name="requested"></param>
349
+ /// <param name="execute"></param>
350
+ /// <param name="rollback"></param>
351
+ /// <returns></returns>
352
[PreserveSig]
353
[return: MarshalAs(UnmanagedType.I4)]
354
int OnPlanCompatibleMsiPackageComplete(
@@ -198,6 +361,15 @@ namespace WixToolset.Mba.Core
361
[MarshalAs(UnmanagedType.U4)] ActionState rollback
362
);
363
364
+ /// <summary>
365
+ /// See <see cref="IDefaultBootstrapperApplication.PlanTargetMsiPackage"/>.
366
+ /// </summary>
367
+ /// <param name="wzPackageId"></param>
368
+ /// <param name="wzProductCode"></param>
369
+ /// <param name="recommendedState"></param>
370
+ /// <param name="pRequestedState"></param>
371
+ /// <param name="fCancel"></param>
372
+ /// <returns></returns>
373
[PreserveSig]
374
[return: MarshalAs(UnmanagedType.I4)]
375
int OnPlanTargetMsiPackage(
@@ -208,6 +380,15 @@ namespace WixToolset.Mba.Core
380
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
381
);
382
383
+ /// <summary>
384
+ /// See <see cref="IDefaultBootstrapperApplication.PlanMsiFeature"/>.
385
+ /// </summary>
386
+ /// <param name="wzPackageId"></param>
387
+ /// <param name="wzFeatureId"></param>
388
+ /// <param name="recommendedState"></param>
389
+ /// <param name="pRequestedState"></param>
390
+ /// <param name="fCancel"></param>
391
+ /// <returns></returns>
392
[PreserveSig]
393
[return: MarshalAs(UnmanagedType.I4)]
394
int OnPlanMsiFeature(
@@ -218,6 +399,17 @@ namespace WixToolset.Mba.Core
399
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
400
);
401
402
+ /// <summary>
403
+ /// See <see cref="IDefaultBootstrapperApplication.PlanMsiPackage"/>.
404
+ /// </summary>
405
+ /// <param name="wzPackageId"></param>
406
+ /// <param name="fExecute"></param>
407
+ /// <param name="action"></param>
408
+ /// <param name="fCancel"></param>
409
+ /// <param name="actionMsiProperty"></param>
410
+ /// <param name="uiLevel"></param>
411
+ /// <param name="fDisableExternalUiHandler"></param>
412
+ /// <returns></returns>
413
[PreserveSig]
414
[return: MarshalAs(UnmanagedType.I4)]
415
int OnPlanMsiPackage(
@@ -230,6 +422,16 @@ namespace WixToolset.Mba.Core
422
[MarshalAs(UnmanagedType.Bool)] ref bool fDisableExternalUiHandler
423
);
424
425
+ /// <summary>
426
+ /// See <see cref="IDefaultBootstrapperApplication.PlanPackageComplete"/>.
427
+ /// </summary>
428
+ /// <param name="wzPackageId"></param>
429
+ /// <param name="hrStatus"></param>
430
+ /// <param name="state"></param>
431
+ /// <param name="requested"></param>
432
+ /// <param name="execute"></param>
433
+ /// <param name="rollback"></param>
434
+ /// <returns></returns>
435
[PreserveSig]
436
[return: MarshalAs(UnmanagedType.I4)]
437
int OnPlanPackageComplete(
@@ -241,12 +443,23 @@ namespace WixToolset.Mba.Core
443
[MarshalAs(UnmanagedType.U4)] ActionState rollback
444
);
445
446
+ /// <summary>
447
+ /// See <see cref="IDefaultBootstrapperApplication.PlanComplete"/>.
448
+ /// </summary>
449
+ /// <param name="hrStatus"></param>
450
+ /// <returns></returns>
451
[PreserveSig]
452
[return: MarshalAs(UnmanagedType.I4)]
453
int OnPlanComplete(
454
int hrStatus
455
);
456
457
+ /// <summary>
458
+ /// See <see cref="IDefaultBootstrapperApplication.ApplyBegin"/>.
459
+ /// </summary>
460
+ /// <param name="dwPhaseCount"></param>
461
+ /// <param name="fCancel"></param>
462
+ /// <returns></returns>
463
[PreserveSig]
464
[return: MarshalAs(UnmanagedType.I4)]
465
int OnApplyBegin(
@@ -254,18 +467,35 @@ namespace WixToolset.Mba.Core
467
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
468
);
469
470
+ /// <summary>
471
+ /// See <see cref="IDefaultBootstrapperApplication.ElevateBegin"/>.
472
+ /// </summary>
473
+ /// <param name="fCancel"></param>
474
+ /// <returns></returns>
475
[PreserveSig]
476
[return: MarshalAs(UnmanagedType.I4)]
477
int OnElevateBegin(
478
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
479
);
480
481
+ /// <summary>
482
+ /// See <see cref="IDefaultBootstrapperApplication.ElevateComplete"/>.
483
+ /// </summary>
484
+ /// <param name="hrStatus"></param>
485
+ /// <returns></returns>
486
[PreserveSig]
487
[return: MarshalAs(UnmanagedType.I4)]
488
int OnElevateComplete(
489
int hrStatus
490
);
491
492
+ /// <summary>
493
+ /// See <see cref="IDefaultBootstrapperApplication.Progress"/>.
494
+ /// </summary>
495
+ /// <param name="dwProgressPercentage"></param>
496
+ /// <param name="dwOverallPercentage"></param>
497
+ /// <param name="fCancel"></param>
498
+ /// <returns></returns>
499
[PreserveSig]
500
[return: MarshalAs(UnmanagedType.I4)]
501
int OnProgress(
@@ -274,6 +504,19 @@ namespace WixToolset.Mba.Core
504
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
505
);
506
507
+ /// <summary>
508
+ /// See <see cref="IDefaultBootstrapperApplication.Error"/>.
509
+ /// </summary>
510
+ /// <param name="errorType"></param>
511
+ /// <param name="wzPackageId"></param>
512
+ /// <param name="dwCode"></param>
513
+ /// <param name="wzError"></param>
514
+ /// <param name="dwUIHint"></param>
515
+ /// <param name="cData"></param>
516
+ /// <param name="rgwzData"></param>
517
+ /// <param name="nRecommendation"></param>
518
+ /// <param name="pResult"></param>
519
+ /// <returns></returns>
520
[PreserveSig]
521
[return: MarshalAs(UnmanagedType.I4)]
522
int OnError(
@@ -288,24 +531,47 @@ namespace WixToolset.Mba.Core
531
[MarshalAs(UnmanagedType.I4)] ref Result pResult
532
);
533
534
+ /// <summary>
535
+ /// See <see cref="IDefaultBootstrapperApplication.RegisterBegin"/>.
536
+ /// </summary>
537
+ /// <param name="fCancel"></param>
538
+ /// <returns></returns>
539
[PreserveSig]
540
[return: MarshalAs(UnmanagedType.I4)]
541
int OnRegisterBegin(
542
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
543
);
544
545
+ /// <summary>
546
+ /// See <see cref="IDefaultBootstrapperApplication.RegisterComplete"/>.
547
+ /// </summary>
548
+ /// <param name="hrStatus"></param>
549
+ /// <returns></returns>
550
[PreserveSig]
551
[return: MarshalAs(UnmanagedType.I4)]
552
int OnRegisterComplete(
553
int hrStatus
554
);
555
556
+ /// <summary>
557
+ /// See <see cref="IDefaultBootstrapperApplication.CacheBegin"/>.
558
+ /// </summary>
559
+ /// <param name="fCancel"></param>
560
+ /// <returns></returns>
561
[PreserveSig]
562
[return: MarshalAs(UnmanagedType.I4)]
563
int OnCacheBegin(
564
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
565
);
566
567
+ /// <summary>
568
+ /// See <see cref="IDefaultBootstrapperApplication.CachePackageBegin"/>.
569
+ /// </summary>
570
+ /// <param name="wzPackageId"></param>
571
+ /// <param name="cCachePayloads"></param>
572
+ /// <param name="dw64PackageCacheSize"></param>
573
+ /// <param name="fCancel"></param>
574
+ /// <returns></returns>
575
[PreserveSig]
576
[return: MarshalAs(UnmanagedType.I4)]
577
int OnCachePackageBegin(
@@ -315,6 +581,15 @@ namespace WixToolset.Mba.Core
581
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
582
);
583
584
+ /// <summary>
585
+ /// See <see cref="IDefaultBootstrapperApplication.CacheAcquireBegin"/>.
586
+ /// </summary>
587
+ /// <param name="wzPackageOrContainerId"></param>
588
+ /// <param name="wzPayloadId"></param>
589
+ /// <param name="operation"></param>
590
+ /// <param name="wzSource"></param>
591
+ /// <param name="fCancel"></param>
592
+ /// <returns></returns>
593
[PreserveSig]
594
[return: MarshalAs(UnmanagedType.I4)]
595
int OnCacheAcquireBegin(
@@ -325,6 +600,16 @@ namespace WixToolset.Mba.Core
600
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
601
);
602
603
+ /// <summary>
604
+ /// See <see cref="IDefaultBootstrapperApplication.CacheAcquireProgress"/>.
605
+ /// </summary>
606
+ /// <param name="wzPackageOrContainerId"></param>
607
+ /// <param name="wzPayloadId"></param>
608
+ /// <param name="dw64Progress"></param>
609
+ /// <param name="dw64Total"></param>
610
+ /// <param name="dwOverallPercentage"></param>
611
+ /// <param name="fCancel"></param>
612
+ /// <returns></returns>
613
[PreserveSig]
614
[return: MarshalAs(UnmanagedType.I4)]
615
int OnCacheAcquireProgress(
@@ -336,6 +621,17 @@ namespace WixToolset.Mba.Core
621
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
622
);
623
624
+ /// <summary>
625
+ /// See <see cref="IDefaultBootstrapperApplication.ResolveSource"/>.
626
+ /// </summary>
627
+ /// <param name="wzPackageOrContainerId"></param>
628
+ /// <param name="wzPayloadId"></param>
629
+ /// <param name="wzLocalSource"></param>
630
+ /// <param name="wzDownloadSource"></param>
631
+ /// <param name="recommendation"></param>
632
+ /// <param name="action"></param>
633
+ /// <param name="fCancel"></param>
634
+ /// <returns></returns>
635
[PreserveSig]
636
[return: MarshalAs(UnmanagedType.I4)]
637
int OnResolveSource(
@@ -348,6 +644,15 @@ namespace WixToolset.Mba.Core
644
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
645
);
646
647
+ /// <summary>
648
+ /// See <see cref="IDefaultBootstrapperApplication.CacheAcquireComplete"/>.
649
+ /// </summary>
650
+ /// <param name="wzPackageOrContainerId"></param>
651
+ /// <param name="wzPayloadId"></param>
652
+ /// <param name="hrStatus"></param>
653
+ /// <param name="recommendation"></param>
654
+ /// <param name="pAction"></param>
655
+ /// <returns></returns>
656
[PreserveSig]
657
[return: MarshalAs(UnmanagedType.I4)]
658
int OnCacheAcquireComplete(
@@ -358,6 +663,13 @@ namespace WixToolset.Mba.Core
663
ref BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION pAction
664
);
665
666
+ /// <summary>
667
+ /// See <see cref="IDefaultBootstrapperApplication.CacheVerifyBegin"/>.
668
+ /// </summary>
669
+ /// <param name="wzPackageId"></param>
670
+ /// <param name="wzPayloadId"></param>
671
+ /// <param name="fCancel"></param>
672
+ /// <returns></returns>
673
[PreserveSig]
674
[return: MarshalAs(UnmanagedType.I4)]
675
int OnCacheVerifyBegin(
@@ -366,6 +678,15 @@ namespace WixToolset.Mba.Core
678
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
679
);
680
681
+ /// <summary>
682
+ /// See <see cref="IDefaultBootstrapperApplication.CacheVerifyComplete"/>.
683
+ /// </summary>
684
+ /// <param name="wzPackageId"></param>
685
+ /// <param name="wzPayloadId"></param>
686
+ /// <param name="hrStatus"></param>
687
+ /// <param name="recommendation"></param>
688
+ /// <param name="action"></param>
689
+ /// <returns></returns>
690
[PreserveSig]
691
[return: MarshalAs(UnmanagedType.I4)]
692
int OnCacheVerifyComplete(
@@ -376,6 +697,14 @@ namespace WixToolset.Mba.Core
697
ref BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action
698
);
699
700
+ /// <summary>
701
+ /// See <see cref="IDefaultBootstrapperApplication.CachePackageComplete"/>.
702
+ /// </summary>
703
+ /// <param name="wzPackageId"></param>
704
+ /// <param name="hrStatus"></param>
705
+ /// <param name="recommendation"></param>
706
+ /// <param name="action"></param>
707
+ /// <returns></returns>
708
[PreserveSig]
709
[return: MarshalAs(UnmanagedType.I4)]
710
int OnCachePackageComplete(
@@ -385,12 +714,23 @@ namespace WixToolset.Mba.Core
714
ref BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action
715
);
716
717
+ /// <summary>
718
+ /// See <see cref="IDefaultBootstrapperApplication.CacheComplete"/>.
719
+ /// </summary>
720
+ /// <param name="hrStatus"></param>
721
+ /// <returns></returns>
722
[PreserveSig]
723
[return: MarshalAs(UnmanagedType.I4)]
724
int OnCacheComplete(
725
int hrStatus
726
);
727
728
+ /// <summary>
729
+ /// See <see cref="IDefaultBootstrapperApplication.ExecuteBegin"/>.
730
+ /// </summary>
731
+ /// <param name="cExecutingPackages"></param>
732
+ /// <param name="fCancel"></param>
733
+ /// <returns></returns>
734
[PreserveSig]
735
[return: MarshalAs(UnmanagedType.I4)]
736
int OnExecuteBegin(
@@ -398,6 +738,16 @@ namespace WixToolset.Mba.Core
738
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
739
);
740
741
+ /// <summary>
742
+ /// See <see cref="IDefaultBootstrapperApplication.ExecutePackageBegin"/>.
743
+ /// </summary>
744
+ /// <param name="wzPackageId"></param>
745
+ /// <param name="fExecute"></param>
746
+ /// <param name="action"></param>
747
+ /// <param name="uiLevel"></param>
748
+ /// <param name="fDisableExternalUiHandler"></param>
749
+ /// <param name="fCancel"></param>
750
+ /// <returns></returns>
751
[PreserveSig]
752
[return: MarshalAs(UnmanagedType.I4)]
753
int OnExecutePackageBegin(
@@ -409,6 +759,13 @@ namespace WixToolset.Mba.Core
759
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
760
);
761
762
+ /// <summary>
763
+ /// See <see cref="IDefaultBootstrapperApplication.ExecutePatchTarget"/>.
764
+ /// </summary>
765
+ /// <param name="wzPackageId"></param>
766
+ /// <param name="wzTargetProductCode"></param>
767
+ /// <param name="fCancel"></param>
768
+ /// <returns></returns>
769
[PreserveSig]
770
[return: MarshalAs(UnmanagedType.I4)]
771
int OnExecutePatchTarget(
@@ -417,6 +774,14 @@ namespace WixToolset.Mba.Core
774
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
775
);
776
777
+ /// <summary>
778
+ /// See <see cref="IDefaultBootstrapperApplication.ExecuteProgress"/>.
779
+ /// </summary>
780
+ /// <param name="wzPackageId"></param>
781
+ /// <param name="dwProgressPercentage"></param>
782
+ /// <param name="dwOverallPercentage"></param>
783
+ /// <param name="fCancel"></param>
784
+ /// <returns></returns>
785
[PreserveSig]
786
[return: MarshalAs(UnmanagedType.I4)]
787
int OnExecuteProgress(
@@ -426,6 +791,18 @@ namespace WixToolset.Mba.Core
791
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
792
);
793
794
+ /// <summary>
795
+ /// See <see cref="IDefaultBootstrapperApplication.ExecuteMsiMessage"/>.
796
+ /// </summary>
797
+ /// <param name="wzPackageId"></param>
798
+ /// <param name="messageType"></param>
799
+ /// <param name="dwUIHint"></param>
800
+ /// <param name="wzMessage"></param>
801
+ /// <param name="cData"></param>
802
+ /// <param name="rgwzData"></param>
803
+ /// <param name="nRecommendation"></param>
804
+ /// <param name="pResult"></param>
805
+ /// <returns></returns>
806
[PreserveSig]
807
[return: MarshalAs(UnmanagedType.I4)]
808
int OnExecuteMsiMessage(
@@ -439,6 +816,15 @@ namespace WixToolset.Mba.Core
816
[MarshalAs(UnmanagedType.I4)] ref Result pResult
817
);
818
819
+ /// <summary>
820
+ /// See <see cref="IDefaultBootstrapperApplication.ExecuteFilesInUse"/>.
821
+ /// </summary>
822
+ /// <param name="wzPackageId"></param>
823
+ /// <param name="cFiles"></param>
824
+ /// <param name="rgwzFiles"></param>
825
+ /// <param name="nRecommendation"></param>
826
+ /// <param name="pResult"></param>
827
+ /// <returns></returns>
828
[PreserveSig]
829
[return: MarshalAs(UnmanagedType.I4)]
830
int OnExecuteFilesInUse(
@@ -449,6 +835,15 @@ namespace WixToolset.Mba.Core
835
[MarshalAs(UnmanagedType.I4)] ref Result pResult
836
);
837
838
+ /// <summary>
839
+ /// See <see cref="IDefaultBootstrapperApplication.ExecutePackageComplete"/>.
840
+ /// </summary>
841
+ /// <param name="wzPackageId"></param>
842
+ /// <param name="hrStatus"></param>
843
+ /// <param name="restart"></param>
844
+ /// <param name="recommendation"></param>
845
+ /// <param name="pAction"></param>
846
+ /// <returns></returns>
847
[PreserveSig]
848
[return: MarshalAs(UnmanagedType.I4)]
849
int OnExecutePackageComplete(
@@ -459,24 +854,47 @@ namespace WixToolset.Mba.Core
854
[MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION pAction
855
);
856
857
+ /// <summary>
858
+ /// See <see cref="IDefaultBootstrapperApplication.ExecuteComplete"/>.
859
+ /// </summary>
860
+ /// <param name="hrStatus"></param>
861
+ /// <returns></returns>
862
[PreserveSig]
863
[return: MarshalAs(UnmanagedType.I4)]
864
int OnExecuteComplete(
865
int hrStatus
866
);
867
868
+ /// <summary>
869
+ /// See <see cref="IDefaultBootstrapperApplication.UnregisterBegin"/>.
870
+ /// </summary>
871
+ /// <param name="fCancel"></param>
872
+ /// <returns></returns>
873
[PreserveSig]
874
[return: MarshalAs(UnmanagedType.I4)]
875
int OnUnregisterBegin(
876
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
877
);
878
879
+ /// <summary>
880
+ /// See <see cref="IDefaultBootstrapperApplication.UnregisterComplete"/>.
881
+ /// </summary>
882
+ /// <param name="hrStatus"></param>
883
+ /// <returns></returns>
884
[PreserveSig]
885
[return: MarshalAs(UnmanagedType.I4)]
886
int OnUnregisterComplete(
887
int hrStatus
888
);
889
890
+ /// <summary>
891
+ /// See <see cref="IDefaultBootstrapperApplication.ApplyComplete"/>.
892
+ /// </summary>
893
+ /// <param name="hrStatus"></param>
894
+ /// <param name="restart"></param>
895
+ /// <param name="recommendation"></param>
896
+ /// <param name="pAction"></param>
897
+ /// <returns></returns>
898
[PreserveSig]
899
[return: MarshalAs(UnmanagedType.I4)]
900
int OnApplyComplete(
@@ -486,12 +904,23 @@ namespace WixToolset.Mba.Core
904
[MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_APPLYCOMPLETE_ACTION pAction
905
);
906
907
+ /// <summary>
908
+ /// See <see cref="IDefaultBootstrapperApplication.LaunchApprovedExeBegin"/>.
909
+ /// </summary>
910
+ /// <param name="fCancel"></param>
911
+ /// <returns></returns>
912
[PreserveSig]
913
[return: MarshalAs(UnmanagedType.I4)]
914
int OnLaunchApprovedExeBegin(
915
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
916
);
917
918
+ /// <summary>
919
+ /// See <see cref="IDefaultBootstrapperApplication.LaunchApprovedExeComplete"/>.
920
+ /// </summary>
921
+ /// <param name="hrStatus"></param>
922
+ /// <param name="processId"></param>
923
+ /// <returns></returns>
924
[PreserveSig]
925
[return: MarshalAs(UnmanagedType.I4)]
926
int OnLaunchApprovedExeComplete(
@@ -499,6 +928,12 @@ namespace WixToolset.Mba.Core
928
int processId
929
);
930
931
+ /// <summary>
932
+ /// See <see cref="IDefaultBootstrapperApplication.BeginMsiTransactionBegin"/>.
933
+ /// </summary>
934
+ /// <param name="wzTransactionId"></param>
935
+ /// <param name="fCancel"></param>
936
+ /// <returns></returns>
937
[PreserveSig]
938
[return: MarshalAs(UnmanagedType.I4)]
939
int OnBeginMsiTransactionBegin(
@@ -506,6 +941,12 @@ namespace WixToolset.Mba.Core
941
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
942
);
943
944
+ /// <summary>
945
+ /// See <see cref="IDefaultBootstrapperApplication.BeginMsiTransactionComplete"/>.
946
+ /// </summary>
947
+ /// <param name="wzTransactionId"></param>
948
+ /// <param name="hrStatus"></param>
949
+ /// <returns></returns>
950
[PreserveSig]
951
[return: MarshalAs(UnmanagedType.I4)]
952
int OnBeginMsiTransactionComplete(
@@ -513,6 +954,12 @@ namespace WixToolset.Mba.Core
954
int hrStatus
955
);
956
957
+ /// <summary>
958
+ /// See <see cref="IDefaultBootstrapperApplication.CommitMsiTransactionBegin"/>.
959
+ /// </summary>
960
+ /// <param name="wzTransactionId"></param>
961
+ /// <param name="fCancel"></param>
962
+ /// <returns></returns>
963
[PreserveSig]
964
[return: MarshalAs(UnmanagedType.I4)]
965
int OnCommitMsiTransactionBegin(
@@ -520,6 +967,12 @@ namespace WixToolset.Mba.Core
967
[MarshalAs(UnmanagedType.Bool)] ref bool fCancel
968
);
969
970
+ /// <summary>
971
+ /// See <see cref="IDefaultBootstrapperApplication.CommitMsiTransactionComplete"/>.
972
+ /// </summary>
973
+ /// <param name="wzTransactionId"></param>
974
+ /// <param name="hrStatus"></param>
975
+ /// <returns></returns>
976
[PreserveSig]
977
[return: MarshalAs(UnmanagedType.I4)]
978
int OnCommitMsiTransactionComplete(
@@ -527,12 +980,23 @@ namespace WixToolset.Mba.Core
980
int hrStatus
981
);
982
983
+ /// <summary>
984
+ /// See <see cref="IDefaultBootstrapperApplication.RollbackMsiTransactionBegin"/>.
985
+ /// </summary>
986
+ /// <param name="wzTransactionId"></param>
987
+ /// <returns></returns>
988
[PreserveSig]
989
[return: MarshalAs(UnmanagedType.I4)]
990
int OnRollbackMsiTransactionBegin(
991
[MarshalAs(UnmanagedType.LPWStr)] string wzTransactionId
992
);
993
994
+ /// <summary>
995
+ /// See <see cref="IDefaultBootstrapperApplication.RollbackMsiTransactionComplete"/>.
996
+ /// </summary>
997
+ /// <param name="wzTransactionId"></param>
998
+ /// <param name="hrStatus"></param>
999
+ /// <returns></returns>
1000
[PreserveSig]
1001
[return: MarshalAs(UnmanagedType.I4)]
1002
int OnRollbackMsiTransactionComplete(
@@ -540,28 +1004,54 @@ namespace WixToolset.Mba.Core
1004
int hrStatus
1005
);
1006
1007
+ /// <summary>
1008
+ /// See <see cref="IDefaultBootstrapperApplication.PauseAutomaticUpdatesBegin"/>.
1009
+ /// </summary>
1010
+ /// <returns></returns>
1011
[PreserveSig]
1012
[return: MarshalAs(UnmanagedType.I4)]
1013
int OnPauseAutomaticUpdatesBegin(
1014
);
1015
1016
+ /// <summary>
1017
+ /// See <see cref="IDefaultBootstrapperApplication.PauseAutomaticUpdatesComplete"/>.
1018
+ /// </summary>
1019
+ /// <param name="hrStatus"></param>
1020
+ /// <returns></returns>
1021
[PreserveSig]
1022
[return: MarshalAs(UnmanagedType.I4)]
1023
int OnPauseAutomaticUpdatesComplete(
1024
int hrStatus
1025
);
1026
1027
+ /// <summary>
1028
+ /// See <see cref="IDefaultBootstrapperApplication.SystemRestorePointBegin"/>.
1029
+ /// </summary>
1030
+ /// <returns></returns>
1031
[PreserveSig]
1032
[return: MarshalAs(UnmanagedType.I4)]
1033
int OnSystemRestorePointBegin(
1034
);
1035
1036
+ /// <summary>
1037
+ /// See <see cref="IDefaultBootstrapperApplication.SystemRestorePointComplete"/>.
1038
+ /// </summary>
1039
+ /// <param name="hrStatus"></param>
1040
+ /// <returns></returns>
1041
[PreserveSig]
1042
[return: MarshalAs(UnmanagedType.I4)]
1043
int OnSystemRestorePointComplete(
1044
int hrStatus
1045
);
1046
1047
+ /// <summary>
1048
+ /// Low level method that is called directly from the engine.
1049
+ /// </summary>
1050
+ /// <param name="message"></param>
1051
+ /// <param name="pvArgs"></param>
1052
+ /// <param name="pvResults"></param>
1053
+ /// <param name="pvContext"></param>
1054
+ /// <returns></returns>
1055
[PreserveSig]
1056
[return: MarshalAs(UnmanagedType.I4)]
1057
int BAProc(
@@ -571,6 +1061,14 @@ namespace WixToolset.Mba.Core
1061
IntPtr pvContext
1062
);
1063
1064
+ /// <summary>
1065
+ /// Low level method that is called directly from the engine.
1066
+ /// </summary>
1067
+ /// <param name="message"></param>
1068
+ /// <param name="pvArgs"></param>
1069
+ /// <param name="pvResults"></param>
1070
+ /// <param name="phr"></param>
1071
+ /// <param name="pvContext"></param>
1072
void BAProcFallback(
1073
int message,
1074
IntPtr pvArgs,
@@ -585,34 +1083,131 @@ namespace WixToolset.Mba.Core
1083
/// </summary>
1084
public enum Display
1085
{
1086
+ /// <summary>
1087
+ ///
1088
+ /// </summary>
1089
Unknown,
1090
+
1091
+ /// <summary>
1092
+ ///
1093
+ /// </summary>
1094
Embedded,
1095
+
1096
+ /// <summary>
1097
+ ///
1098
+ /// </summary>
1099
None,
1100
+
1101
+ /// <summary>
1102
+ ///
1103
+ /// </summary>
1104
Passive,
1105
+
1106
+ /// <summary>
1107
+ ///
1108
+ /// </summary>
1109
Full,
1110
}
1111
1112
/// <summary>
596
- /// Messages from Windows Installer.
1113
+ /// Messages from Windows Installer (msi.h).
1114
/// </summary>
1115
public enum InstallMessage
1116
{
1117
+ /// <summary>
1118
+ /// premature termination, possibly fatal OOM
1119
+ /// </summary>
1120
FatalExit,
1121
+
1122
+ /// <summary>
1123
+ /// formatted error message
1124
+ /// </summary>
1125
Error = 0x01000000,
1126
+
1127
+ /// <summary>
1128
+ /// formatted warning message
1129
+ /// </summary>
1130
Warning = 0x02000000,
1131
+
1132
+ /// <summary>
1133
+ /// user request message
1134
+ /// </summary>
1135
User = 0x03000000,
1136
+
1137
+ /// <summary>
1138
+ /// informative message for log
1139
+ /// </summary>
1140
Info = 0x04000000,
1141
+
1142
+ /// <summary>
1143
+ /// list of files in use that need to be replaced
1144
+ /// </summary>
1145
FilesInUse = 0x05000000,
1146
+
1147
+ /// <summary>
1148
+ /// request to determine a valid source location
1149
+ /// </summary>
1150
ResolveSource = 0x06000000,
1151
+
1152
+ /// <summary>
1153
+ /// insufficient disk space message
1154
+ /// </summary>
1155
OutOfDiskSpace = 0x07000000,
1156
+
1157
+ /// <summary>
1158
+ /// start of action: action name & description
1159
+ /// </summary>
1160
ActionStart = 0x08000000,
1161
+
1162
+ /// <summary>
1163
+ /// formatted data associated with individual action item
1164
+ /// </summary>
1165
ActionData = 0x09000000,
1166
+
1167
+ /// <summary>
1168
+ /// progress gauge info: units so far, total
1169
+ /// </summary>
1170
Progress = 0x0a000000,
1171
+
1172
+ /// <summary>
1173
+ /// product info for dialog: language Id, dialog caption
1174
+ /// </summary>
1175
CommonData = 0x0b000000,
1176
+
1177
+ /// <summary>
1178
+ /// sent prior to UI initialization, no string data
1179
+ /// </summary>
1180
Initialize = 0x0c000000,
1181
+
1182
+ /// <summary>
1183
+ /// sent after UI termination, no string data
1184
+ /// </summary>
1185
Terminate = 0x0d000000,
1186
+
1187
+ /// <summary>
1188
+ /// sent prior to display or authored dialog or wizard
1189
+ /// </summary>
1190
ShowDialog = 0x0e000000,
1191
+
1192
+ /// <summary>
1193
+ /// log only, to log performance number like action time
1194
+ /// </summary>
1195
+ Performance = 0x0f000000,
1196
+
1197
+ /// <summary>
1198
+ /// the list of apps that the user can request Restart Manager to shut down and restart
1199
+ /// </summary>
1200
RMFilesInUse = 0x19000000,
1201
+
1202
+ /// <summary>
1203
+ /// sent prior to server-side install of a product
1204
+ /// </summary>
1205
+ InstallStart = 0x1a000000,
1206
+
1207
+ /// <summary>
1208
+ /// sent after server-side install
1209
+ /// </summary>
1210
+ InstallEnd = 0x1B000000,
1211
}
1212
1213
/// <summary>
@@ -620,30 +1215,100 @@ namespace WixToolset.Mba.Core
1215
/// </summary>
1216
public enum Restart
1217
{
1218
+ /// <summary>
1219
+ ///
1220
+ /// </summary>
1221
Unknown,
1222
+
1223
+ /// <summary>
1224
+ ///
1225
+ /// </summary>
1226
Never,
1227
+
1228
+ /// <summary>
1229
+ ///
1230
+ /// </summary>
1231
Prompt,
1232
+
1233
+ /// <summary>
1234
+ ///
1235
+ /// </summary>
1236
Automatic,
1237
+
1238
+ /// <summary>
1239
+ ///
1240
+ /// </summary>
1241
Always,
1242
}
1243
1244
/// <summary>
631
- /// Result codes.
1245
+ /// Result codes (based on Dialog Box Command IDs from WinUser.h).
1246
/// </summary>
1247
public enum Result
1248
{
1249
+ /// <summary>
1250
+ ///
1251
+ /// </summary>
1252
Error = -1,
1253
+
1254
+ /// <summary>
1255
+ ///
1256
+ /// </summary>
1257
None,
1258
+
1259
+ /// <summary>
1260
+ ///
1261
+ /// </summary>
1262
Ok,
1263
+
1264
+ /// <summary>
1265
+ ///
1266
+ /// </summary>
1267
Cancel,
1268
+
1269
+ /// <summary>
1270
+ ///
1271
+ /// </summary>
1272
Abort,
1273
+
1274
+ /// <summary>
1275
+ ///
1276
+ /// </summary>
1277
Retry,
1278
+
1279
+ /// <summary>
1280
+ ///
1281
+ /// </summary>
1282
Ignore,
1283
+
1284
+ /// <summary>
1285
+ ///
1286
+ /// </summary>
1287
Yes,
1288
+
1289
+ /// <summary>
1290
+ ///
1291
+ /// </summary>
1292
No,
1293
+
1294
+ /// <summary>
1295
+ /// /
1296
+ /// </summary>
1297
Close,
1298
+
1299
+ /// <summary>
1300
+ ///
1301
+ /// </summary>
1302
Help,
1303
+
1304
+ /// <summary>
1305
+ ///
1306
+ /// </summary>
1307
TryAgain,
1308
+
1309
+ /// <summary>
1310
+ ///
1311
+ /// </summary>
1312
Continue,
1313
}
1314
@@ -652,6 +1317,9 @@ namespace WixToolset.Mba.Core
1317
/// </summary>
1318
public enum ResumeType
1319
{
1320
+ /// <summary>
1321
+ ///
1322
+ /// </summary>
1323
None,
1324
1325
/// <summary>
@@ -721,8 +1389,14 @@ namespace WixToolset.Mba.Core
1389
Apply,
1390
};
1391
1392
+ /// <summary>
1393
+ /// The calculated operation for the related bundle.
1394
+ /// </summary>
1395
public enum RelatedOperation
1396
{
1397
+ /// <summary>
1398
+ ///
1399
+ /// </summary>
1400
None,
1401
1402
/// <summary>
@@ -803,12 +1477,39 @@ namespace WixToolset.Mba.Core
1477
/// </summary>
1478
public enum RelationType
1479
{
1480
+ /// <summary>
1481
+ ///
1482
+ /// </summary>
1483
None,
1484
+
1485
+ /// <summary>
1486
+ ///
1487
+ /// </summary>
1488
Detect,
1489
+
1490
+ /// <summary>
1491
+ ///
1492
+ /// </summary>
1493
Upgrade,
1494
+
1495
+ /// <summary>
1496
+ ///
1497
+ /// </summary>
1498
Addon,
1499
+
1500
+ /// <summary>
1501
+ ///
1502
+ /// </summary>
1503
Patch,
1504
+
1505
+ /// <summary>
1506
+ ///
1507
+ /// </summary>
1508
Dependent,
1509
+
1510
+ /// <summary>
1511
+ ///
1512
+ /// </summary>
1513
Update,
1514
}
1515
@@ -840,72 +1541,161 @@ namespace WixToolset.Mba.Core
1541
}
1542
1543
/// <summary>
843
- /// The available actions for OnApplyComplete.
1544
+ /// The available actions for <see cref="IDefaultBootstrapperApplication.ApplyComplete"/>.
1545
/// </summary>
1546
public enum BOOTSTRAPPER_APPLYCOMPLETE_ACTION
1547
{
1548
+ /// <summary>
1549
+ ///
1550
+ /// </summary>
1551
None,
1552
+
1553
+ /// <summary>
1554
+ /// Instructs the engine to restart.
1555
+ /// The engine will not launch again after the machine is rebooted.
1556
+ /// Ignored if reboot was already initiated by <see cref="IDefaultBootstrapperApplication.ExecutePackageComplete"/>.
1557
+ /// </summary>
1558
Restart,
1559
}
1560
1561
/// <summary>
852
- /// The available actions for OnCacheAcquireComplete.
1562
+ /// The available actions for <see cref="IDefaultBootstrapperApplication.CacheAcquireComplete"/>.
1563
/// </summary>
1564
public enum BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION
1565
{
1566
+ /// <summary>
1567
+ ///
1568
+ /// </summary>
1569
None,
1570
+
1571
+ /// <summary>
1572
+ /// Instructs the engine to try the acquisition of the package again.
1573
+ /// Ignored if hrStatus is a success.
1574
+ /// </summary>
1575
Retry,
1576
}
1577
1578
/// <summary>
861
- /// The available actions for OnCachePackageComplete.
1579
+ /// The available actions for <see cref="IDefaultBootstrapperApplication.CachePackageComplete"/>.
1580
/// </summary>
1581
public enum BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION
1582
{
1583
+ /// <summary>
1584
+ ///
1585
+ /// </summary>
1586
None,
1587
+
1588
+ /// <summary>
1589
+ /// Instructs the engine to ignore non-vital package failures and continue with the caching.
1590
+ /// Ignored if hrStatus is a success or the package is vital.
1591
+ /// </summary>
1592
Ignore,
1593
+
1594
+ /// <summary>
1595
+ /// Instructs the engine to try the acquisition and verification of the package again.
1596
+ /// Ignored if hrStatus is a success.
1597
+ /// </summary>
1598
Retry,
1599
}
1600
1601
/// <summary>
871
- /// The available actions for OnCacheVerifyComplete.
1602
+ /// The available actions for <see cref="IDefaultBootstrapperApplication.CacheVerifyComplete"/>.
1603
/// </summary>
1604
public enum BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION
1605
{
1606
+ /// <summary>
1607
+ ///
1608
+ /// </summary>
1609
None,
1610
+
1611
+ /// <summary>
1612
+ /// Ignored if hrStatus is a success.
1613
+ /// </summary>
1614
RetryVerification,
1615
+
1616
+ /// <summary>
1617
+ /// Ignored if hrStatus is a success.
1618
+ /// </summary>
1619
RetryAcquisition,
1620
}
1621
1622
/// <summary>
881
- /// The available actions for OnExecutePackageComplete.
1623
+ /// The available actions for <see cref="IDefaultBootstrapperApplication.ExecutePackageComplete"/>.
1624
/// </summary>
1625
public enum BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION
1626
{
1627
+ /// <summary>
1628
+ ///
1629
+ /// </summary>
1630
None,
1631
+
1632
+ /// <summary>
1633
+ /// Instructs the engine to ignore non-vital package failures and continue with the install.
1634
+ /// Ignored if hrStatus is a success or the package is vital.
1635
+ /// </summary>
1636
Ignore,
1637
+
1638
+ /// <summary>
1639
+ /// Instructs the engine to try the execution of the package again.
1640
+ /// Ignored if hrStatus is a success.
1641
+ /// </summary>
1642
Retry,
1643
+
1644
+ /// <summary>
1645
+ /// Instructs the engine to stop processing the chain and restart.
1646
+ /// The engine will launch again after the machine is restarted.
1647
+ /// </summary>
1648
Restart,
1649
+
1650
+ /// <summary>
1651
+ /// Instructs the engine to stop processing the chain and suspend the current state.
1652
+ /// </summary>
1653
Suspend,
1654
}
1655
1656
/// <summary>
893
- /// The available actions for OnResolveSource.
1657
+ /// The available actions for <see cref="IDefaultBootstrapperApplication.ResolveSource"/>.
1658
/// </summary>
1659
public enum BOOTSTRAPPER_RESOLVESOURCE_ACTION
1660
{
1661
+ /// <summary>
1662
+ /// Instructs the engine that the source can't be found.
1663
+ /// </summary>
1664
None,
1665
+
1666
+ /// <summary>
1667
+ /// Instructs the engine to try the local source again.
1668
+ /// </summary>
1669
Retry,
1670
+
1671
+ /// <summary>
1672
+ /// Instructs the engine to try the download source.
1673
+ /// </summary>
1674
Download,
1675
}
1676
1677
/// <summary>
903
- /// The available actions for OnShutdown.
1678
+ /// The available actions for <see cref="IDefaultBootstrapperApplication.Shutdown"/>.
1679
/// </summary>
1680
public enum BOOTSTRAPPER_SHUTDOWN_ACTION
1681
{
1682
+ /// <summary>
1683
+ ///
1684
+ /// </summary>
1685
None,
1686
+
1687
+ /// <summary>
1688
+ /// Instructs the engine to restart.
1689
+ /// The engine will not launch again after the machine is rebooted.
1690
+ /// Ignored if reboot was already initiated by <see cref="IDefaultBootstrapperApplication.ExecutePackageComplete"/>.
1691
+ /// </summary>
1692
Restart,
1693
+
1694
+ /// <summary>
1695
+ /// Instructs the engine to unload the bootstrapper application and
1696
+ /// restart the engine which will load the bootstrapper application again.
1697
+ /// Typically used to switch from a native bootstrapper application to a managed one.
1698
+ /// </summary>
1699
ReloadBootstrapper,
1700
}
1701
src/WixToolset.Mba.Core/IBootstrapperApplicationData.cs
+10
@@ -4,9 +4,19 @@ namespace WixToolset.Mba.Core
4
{
5
using System.IO;
6
7
+ /// <summary>
8
+ /// Interface for BootstrapperApplicationData.xml.
9
+ /// </summary>
10
public interface IBootstrapperApplicationData
11
{
12
+ /// <summary>
13
+ /// The BootstrapperApplicationData.xml file.
14
+ /// </summary>
15
FileInfo BADataFile { get; }
16
+
17
+ /// <summary>
18
+ /// The BA manifest.
19
+ /// </summary>
20
IBundleInfo Bundle { get; }
21
}
22
}
\ No newline at end of file
src/WixToolset.Mba.Core/IBootstrapperApplicationFactory.cs
+9
-22
@@ -6,12 +6,20 @@ namespace WixToolset.Mba.Core
6
using System.CodeDom.Compiler;
7
using System.Runtime.InteropServices;
8
9
+ /// <summary>
10
+ /// Interface used by WixToolset.Mba.Host to dynamically load the BA.
11
+ /// </summary>
12
[ComVisible(true)]
13
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
14
[Guid("2965A12F-AC7B-43A0-85DF-E4B2168478A4")]
15
[GeneratedCodeAttribute("WixToolset.Bootstrapper.InteropCodeGenerator", "1.0.0.0")]
16
public interface IBootstrapperApplicationFactory
17
{
18
+ /// <summary>
19
+ /// Low level method called by the native host.
20
+ /// </summary>
21
+ /// <param name="pArgs"></param>
22
+ /// <param name="pResults"></param>
23
void Create(
24
IntPtr pArgs,
25
IntPtr pResults
@@ -21,7 +29,7 @@ namespace WixToolset.Mba.Core
29
[Serializable]
30
[StructLayout(LayoutKind.Sequential)]
31
[GeneratedCodeAttribute("WixToolset.Bootstrapper.InteropCodeGenerator", "1.0.0.0")]
24
- public struct Command
32
+ internal struct Command
33
{
34
// Strings must be declared as pointers so that Marshaling doesn't free them.
35
[MarshalAs(UnmanagedType.I4)] internal int cbSize;
@@ -55,25 +63,4 @@ namespace WixToolset.Mba.Core
63
Marshal.PtrToStringUni(this.wzBootstrapperApplicationDataPath));
64
}
65
}
58
-
59
- [Serializable]
60
- [StructLayout(LayoutKind.Sequential)]
61
- [GeneratedCodeAttribute("WixToolset.Bootstrapper.InteropCodeGenerator", "1.0.0.0")]
62
- public struct BootstrapperCreateArgs
63
- {
64
- [MarshalAs(UnmanagedType.I4)] public readonly int cbSize;
65
- [MarshalAs(UnmanagedType.I8)] public readonly long qwEngineAPIVersion;
66
- public readonly IntPtr pfnBootstrapperEngineProc;
67
- public readonly IntPtr pvBootstrapperEngineProcContext;
68
- public readonly IntPtr pCommand;
69
-
70
- public BootstrapperCreateArgs(long version, IntPtr pEngineProc, IntPtr pEngineContext, IntPtr pCommand)
71
- {
72
- this.cbSize = Marshal.SizeOf(typeof(BootstrapperCreateArgs));
73
- this.qwEngineAPIVersion = version;
74
- this.pfnBootstrapperEngineProc = pEngineProc;
75
- this.pvBootstrapperEngineProcContext = pEngineContext;
76
- this.pCommand = pCommand;
77
- }
78
- }
66
}
src/WixToolset.Mba.Core/IBootstrapperCommand.cs
+3
@@ -33,6 +33,9 @@ namespace WixToolset.Mba.Core
33
/// <exception type="Win32Exception">The command line could not be parsed into an array.</exception>
34
string[] CommandLineArgs { get; }
35
36
+ /// <summary>
37
+ /// Hint for the initial visibility of the window.
38
+ /// </summary>
39
int CmdShow { get; }
40
41
/// <summary>
src/WixToolset.Mba.Core/IBootstrapperEngine.cs
+303
@@ -16,16 +16,33 @@ namespace WixToolset.Mba.Core
16
[GeneratedCodeAttribute("WixToolset.Bootstrapper.InteropCodeGenerator", "1.0.0.0")]
17
public interface IBootstrapperEngine
18
{
19
+ /// <summary>
20
+ /// See <see cref="IEngine.PackageCount"/>.
21
+ /// </summary>
22
+ /// <param name="pcPackages"></param>
23
void GetPackageCount(
24
[MarshalAs(UnmanagedType.U4)] out int pcPackages
25
);
26
27
+ /// <summary>
28
+ /// See <see cref="IEngine.GetVariableNumeric(string)"/>.
29
+ /// </summary>
30
+ /// <param name="wzVariable"></param>
31
+ /// <param name="pllValue"></param>
32
+ /// <returns></returns>
33
[PreserveSig]
34
int GetVariableNumeric(
35
[MarshalAs(UnmanagedType.LPWStr)] string wzVariable,
36
out long pllValue
37
);
38
39
+ /// <summary>
40
+ /// See <see cref="IEngine.GetVariableString(string)"/>.
41
+ /// </summary>
42
+ /// <param name="wzVariable"></param>
43
+ /// <param name="wzValue"></param>
44
+ /// <param name="pcchValue"></param>
45
+ /// <returns></returns>
46
[PreserveSig]
47
int GetVariableString(
48
[MarshalAs(UnmanagedType.LPWStr)] string wzVariable,
@@ -33,6 +50,13 @@ namespace WixToolset.Mba.Core
50
[MarshalAs(UnmanagedType.U4)] ref int pcchValue
51
);
52
53
+ /// <summary>
54
+ /// See <see cref="IEngine.GetVariableVersion(string)"/>.
55
+ /// </summary>
56
+ /// <param name="wzVariable"></param>
57
+ /// <param name="wzValue"></param>
58
+ /// <param name="pcchValue"></param>
59
+ /// <returns></returns>
60
[PreserveSig]
61
int GetVariableVersion(
62
[MarshalAs(UnmanagedType.LPWStr)] string wzVariable,
@@ -40,6 +64,13 @@ namespace WixToolset.Mba.Core
64
[MarshalAs(UnmanagedType.U4)] ref int pcchValue
65
);
66
67
+ /// <summary>
68
+ /// See <see cref="IEngine.FormatString(string)"/>.
69
+ /// </summary>
70
+ /// <param name="wzIn"></param>
71
+ /// <param name="wzOut"></param>
72
+ /// <param name="pcchOut"></param>
73
+ /// <returns></returns>
74
[PreserveSig]
75
int FormatString(
76
[MarshalAs(UnmanagedType.LPWStr)] string wzIn,
@@ -47,6 +78,13 @@ namespace WixToolset.Mba.Core
78
[MarshalAs(UnmanagedType.U4)] ref int pcchOut
79
);
80
81
+ /// <summary>
82
+ /// See <see cref="IEngine.EscapeString(string)"/>.
83
+ /// </summary>
84
+ /// <param name="wzIn"></param>
85
+ /// <param name="wzOut"></param>
86
+ /// <param name="pcchOut"></param>
87
+ /// <returns></returns>
88
[PreserveSig]
89
int EscapeString(
90
[MarshalAs(UnmanagedType.LPWStr)] string wzIn,
@@ -54,16 +92,33 @@ namespace WixToolset.Mba.Core
92
[MarshalAs(UnmanagedType.U4)] ref int pcchOut
93
);
94
95
+ /// <summary>
96
+ /// See <see cref="IEngine.EvaluateCondition(string)"/>.
97
+ /// </summary>
98
+ /// <param name="wzCondition"></param>
99
+ /// <param name="pf"></param>
100
void EvaluateCondition(
101
[MarshalAs(UnmanagedType.LPWStr)] string wzCondition,
102
[MarshalAs(UnmanagedType.Bool)] out bool pf
103
);
104
105
+ /// <summary>
106
+ /// See <see cref="IEngine.Log(LogLevel, string)"/>.
107
+ /// </summary>
108
+ /// <param name="level"></param>
109
+ /// <param name="wzMessage"></param>
110
void Log(
111
[MarshalAs(UnmanagedType.U4)] LogLevel level,
112
[MarshalAs(UnmanagedType.LPWStr)] string wzMessage
113
);
114
115
+ /// <summary>
116
+ /// See <see cref="IEngine.SendEmbeddedError(int, string, int)"/>.
117
+ /// </summary>
118
+ /// <param name="dwErrorCode"></param>
119
+ /// <param name="wzMessage"></param>
120
+ /// <param name="dwUIHint"></param>
121
+ /// <param name="pnResult"></param>
122
void SendEmbeddedError(
123
[MarshalAs(UnmanagedType.U4)] int dwErrorCode,
124
[MarshalAs(UnmanagedType.LPWStr)] string wzMessage,
@@ -71,12 +126,27 @@ namespace WixToolset.Mba.Core
126
[MarshalAs(UnmanagedType.I4)] out int pnResult
127
);
128
129
+ /// <summary>
130
+ /// See <see cref="IEngine.SendEmbeddedProgress(int, int)"/>.
131
+ /// </summary>
132
+ /// <param name="dwProgressPercentage"></param>
133
+ /// <param name="dwOverallProgressPercentage"></param>
134
+ /// <param name="pnResult"></param>
135
void SendEmbeddedProgress(
136
[MarshalAs(UnmanagedType.U4)] int dwProgressPercentage,
137
[MarshalAs(UnmanagedType.U4)] int dwOverallProgressPercentage,
138
[MarshalAs(UnmanagedType.I4)] out int pnResult
139
);
140
141
+ /// <summary>
142
+ /// See <see cref="IEngine.SetUpdate(string, string, long, UpdateHashType, byte[])"/>.
143
+ /// </summary>
144
+ /// <param name="wzLocalSource"></param>
145
+ /// <param name="wzDownloadSource"></param>
146
+ /// <param name="qwValue"></param>
147
+ /// <param name="hashType"></param>
148
+ /// <param name="rgbHash"></param>
149
+ /// <param name="cbHash"></param>
150
void SetUpdate(
151
[MarshalAs(UnmanagedType.LPWStr)] string wzLocalSource,
152
[MarshalAs(UnmanagedType.LPWStr)] string wzDownloadSource,
@@ -86,12 +156,26 @@ namespace WixToolset.Mba.Core
156
[MarshalAs(UnmanagedType.U4)] int cbHash
157
);
158
159
+ /// <summary>
160
+ /// See <see cref="IEngine.SetLocalSource(string, string, string)"/>.
161
+ /// </summary>
162
+ /// <param name="wzPackageOrContainerId"></param>
163
+ /// <param name="wzPayloadId"></param>
164
+ /// <param name="wzPath"></param>
165
void SetLocalSource(
166
[MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId,
167
[MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId,
168
[MarshalAs(UnmanagedType.LPWStr)] string wzPath
169
);
170
171
+ /// <summary>
172
+ /// See <see cref="IEngine.SetDownloadSource(string, string, string, string, string)"/>.
173
+ /// </summary>
174
+ /// <param name="wzPackageOrContainerId"></param>
175
+ /// <param name="wzPayloadId"></param>
176
+ /// <param name="wzUrl"></param>
177
+ /// <param name="wzUser"></param>
178
+ /// <param name="wzPassword"></param>
179
void SetDownloadSource(
180
[MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId,
181
[MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId,
@@ -100,45 +184,92 @@ namespace WixToolset.Mba.Core
184
[MarshalAs(UnmanagedType.LPWStr)] string wzPassword
185
);
186
187
+ /// <summary>
188
+ /// See <see cref="IEngine.SetVariableNumeric(string, long)"/>.
189
+ /// </summary>
190
+ /// <param name="wzVariable"></param>
191
+ /// <param name="llValue"></param>
192
void SetVariableNumeric(
193
[MarshalAs(UnmanagedType.LPWStr)] string wzVariable,
194
long llValue
195
);
196
197
+ /// <summary>
198
+ /// See <see cref="IEngine.SetVariableString(string, string, bool)"/>.
199
+ /// </summary>
200
+ /// <param name="wzVariable"></param>
201
+ /// <param name="wzValue"></param>
202
+ /// <param name="fFormatted"></param>
203
void SetVariableString(
204
[MarshalAs(UnmanagedType.LPWStr)] string wzVariable,
205
IntPtr wzValue,
206
[MarshalAs(UnmanagedType.Bool)] bool fFormatted
207
);
208
209
+ /// <summary>
210
+ /// See <see cref="IEngine.SetVariableVersion(string, string)"/>.
211
+ /// </summary>
212
+ /// <param name="wzVariable"></param>
213
+ /// <param name="wzValue"></param>
214
void SetVariableVersion(
215
[MarshalAs(UnmanagedType.LPWStr)] string wzVariable,
216
IntPtr wzValue
217
);
218
219
+ /// <summary>
220
+ /// See <see cref="IEngine.CloseSplashScreen"/>.
221
+ /// </summary>
222
void CloseSplashScreen();
223
224
+ /// <summary>
225
+ /// See <see cref="IEngine.Detect(IntPtr)"/>.
226
+ /// </summary>
227
+ /// <param name="hwndParent"></param>
228
void Detect(
229
IntPtr hwndParent
230
);
231
232
+ /// <summary>
233
+ /// See <see cref="IEngine.Plan(LaunchAction)"/>.
234
+ /// </summary>
235
+ /// <param name="action"></param>
236
void Plan(
237
[MarshalAs(UnmanagedType.U4)] LaunchAction action
238
);
239
240
+ /// <summary>
241
+ /// See <see cref="IEngine.Elevate(IntPtr)"/>.
242
+ /// </summary>
243
+ /// <param name="hwndParent"></param>
244
+ /// <returns></returns>
245
[PreserveSig]
246
int Elevate(
247
IntPtr hwndParent
248
);
249
250
+ /// <summary>
251
+ /// See <see cref="IEngine.Apply(IntPtr)"/>.
252
+ /// </summary>
253
+ /// <param name="hwndParent"></param>
254
void Apply(
255
IntPtr hwndParent
256
);
257
258
+ /// <summary>
259
+ /// See <see cref="IEngine.Quit(int)"/>.
260
+ /// </summary>
261
+ /// <param name="dwExitCode"></param>
262
void Quit(
263
[MarshalAs(UnmanagedType.U4)] int dwExitCode
264
);
265
266
+ /// <summary>
267
+ /// See <see cref="IEngine.LaunchApprovedExe(IntPtr, string, string, int)"/>.
268
+ /// </summary>
269
+ /// <param name="hwndParent"></param>
270
+ /// <param name="wzApprovedExeForElevationId"></param>
271
+ /// <param name="wzArguments"></param>
272
+ /// <param name="dwWaitForInputIdleTimeout"></param>
273
void LaunchApprovedExe(
274
IntPtr hwndParent,
275
[MarshalAs(UnmanagedType.LPWStr)] string wzApprovedExeForElevationId,
@@ -146,6 +277,12 @@ namespace WixToolset.Mba.Core
277
[MarshalAs(UnmanagedType.U4)] int dwWaitForInputIdleTimeout
278
);
279
280
+ /// <summary>
281
+ /// See <see cref="IEngine.CompareVersions(string, string)"/>.
282
+ /// </summary>
283
+ /// <param name="wzVersion1"></param>
284
+ /// <param name="wzVersion2"></param>
285
+ /// <param name="pnResult"></param>
286
void CompareVersions(
287
[MarshalAs(UnmanagedType.LPWStr)] string wzVersion1,
288
[MarshalAs(UnmanagedType.LPWStr)] string wzVersion2,
@@ -158,14 +295,49 @@ namespace WixToolset.Mba.Core
295
/// </summary>
296
public enum ActionState
297
{
298
+ /// <summary>
299
+ ///
300
+ /// </summary>
301
None,
302
+
303
+ /// <summary>
304
+ ///
305
+ /// </summary>
306
Uninstall,
307
+
308
+ /// <summary>
309
+ ///
310
+ /// </summary>
311
Install,
312
+
313
+ /// <summary>
314
+ ///
315
+ /// </summary>
316
AdminInstall,
317
+
318
+ /// <summary>
319
+ ///
320
+ /// </summary>
321
Modify,
322
+
323
+ /// <summary>
324
+ ///
325
+ /// </summary>
326
Repair,
327
+
328
+ /// <summary>
329
+ ///
330
+ /// </summary>
331
MinorUpgrade,
332
+
333
+ /// <summary>
334
+ ///
335
+ /// </summary>
336
MajorUpgrade,
337
+
338
+ /// <summary>
339
+ ///
340
+ /// </summary>
341
Patch,
342
}
343
@@ -174,15 +346,54 @@ namespace WixToolset.Mba.Core
346
/// </summary>
347
public enum LaunchAction
348
{
349
+ /// <summary>
350
+ ///
351
+ /// </summary>
352
Unknown,
353
+
354
+ /// <summary>
355
+ ///
356
+ /// </summary>
357
Help,
358
+
359
+ /// <summary>
360
+ ///
361
+ /// </summary>
362
Layout,
363
+
364
+ /// <summary>
365
+ ///
366
+ /// </summary>
367
Uninstall,
368
+
369
+ /// <summary>
370
+ ///
371
+ /// </summary>
372
Cache,
373
+
374
+ /// <summary>
375
+ ///
376
+ /// </summary>
377
Install,
378
+
379
+ /// <summary>
380
+ ///
381
+ /// </summary>
382
Modify,
383
+
384
+ /// <summary>
385
+ ///
386
+ /// </summary>
387
Repair,
388
+
389
+ /// <summary>
390
+ ///
391
+ /// </summary>
392
UpdateReplace,
393
+
394
+ /// <summary>
395
+ ///
396
+ /// </summary>
397
UpdateReplaceEmbedded,
398
}
399
@@ -238,11 +449,34 @@ namespace WixToolset.Mba.Core
449
/// </summary>
450
public enum PackageState
451
{
452
+ /// <summary>
453
+ ///
454
+ /// </summary>
455
Unknown,
456
+
457
+ /// <summary>
458
+ ///
459
+ /// </summary>
460
Obsolete,
461
+
462
+ /// <summary>
463
+ ///
464
+ /// </summary>
465
Absent,
466
+
467
+ /// <summary>
468
+ ///
469
+ /// </summary>
470
Cached,
471
+
472
+ /// <summary>
473
+ ///
474
+ /// </summary>
475
Present,
476
+
477
+ /// <summary>
478
+ ///
479
+ /// </summary>
480
Superseded,
481
}
482
@@ -251,11 +485,34 @@ namespace WixToolset.Mba.Core
485
/// </summary>
486
public enum RequestState
487
{
488
+ /// <summary>
489
+ ///
490
+ /// </summary>
491
None,
492
+
493
+ /// <summary>
494
+ /// /
495
+ /// </summary>
496
ForceAbsent,
497
+
498
+ /// <summary>
499
+ ///
500
+ /// </summary>
501
Absent,
502
+
503
+ /// <summary>
504
+ ///
505
+ /// </summary>
506
Cache,
507
+
508
+ /// <summary>
509
+ ///
510
+ /// </summary>
511
Present,
512
+
513
+ /// <summary>
514
+ ///
515
+ /// </summary>
516
Repair,
517
}
518
@@ -264,10 +521,29 @@ namespace WixToolset.Mba.Core
521
/// </summary>
522
public enum FeatureState
523
{
524
+ /// <summary>
525
+ ///
526
+ /// </summary>
527
Unknown,
528
+
529
+ /// <summary>
530
+ ///
531
+ /// </summary>
532
Absent,
533
+
534
+ /// <summary>
535
+ ///
536
+ /// </summary>
537
Advertised,
538
+
539
+ /// <summary>
540
+ ///
541
+ /// </summary>
542
Local,
543
+
544
+ /// <summary>
545
+ ///
546
+ /// </summary>
547
Source,
548
}
549
@@ -276,12 +552,39 @@ namespace WixToolset.Mba.Core
552
/// </summary>
553
public enum FeatureAction
554
{
555
+ /// <summary>
556
+ ///
557
+ /// </summary>
558
None,
559
+
560
+ /// <summary>
561
+ ///
562
+ /// </summary>
563
AddLocal,
564
+
565
+ /// <summary>
566
+ ///
567
+ /// </summary>
568
AddSource,
569
+
570
+ /// <summary>
571
+ ///
572
+ /// </summary>
573
AddDefault,
574
+
575
+ /// <summary>
576
+ ///
577
+ /// </summary>
578
Reinstall,
579
+
580
+ /// <summary>
581
+ ///
582
+ /// </summary>
583
Advertise,
584
+
585
+ /// <summary>
586
+ ///
587
+ /// </summary>
588
Remove,
589
}
590
}
src/WixToolset.Mba.Core/IBundleInfo.cs
+23
@@ -4,13 +4,36 @@ namespace WixToolset.Mba.Core
4
{
5
using System.Collections.Generic;
6
7
+ /// <summary>
8
+ /// BA manifest data.
9
+ /// </summary>
10
public interface IBundleInfo
11
{
12
+ /// <summary>
13
+ ///
14
+ /// </summary>
15
string LogVariable { get; }
16
+
17
+ /// <summary>
18
+ ///
19
+ /// </summary>
20
string Name { get; }
21
+
22
+ /// <summary>
23
+ ///
24
+ /// </summary>
25
IDictionary<string, IPackageInfo> Packages { get; }
26
+
27
+ /// <summary>
28
+ ///
29
+ /// </summary>
30
bool PerMachine { get; }
31
32
+ /// <summary>
33
+ /// Adds a related bundle as a package.
34
+ /// </summary>
35
+ /// <param name="e"></param>
36
+ /// <returns>The created <see cref="IPackageInfo"/>.</returns>
37
IPackageInfo AddRelatedBundleAsPackage(DetectRelatedBundleEventArgs e);
38
}
39
}
\ No newline at end of file
src/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs
+278
@@ -4,73 +4,351 @@ namespace WixToolset.Mba.Core
4
{
5
using System;
6
7
+ /// <summary>
8
+ /// Interface for built-in implementation of <see cref="IBootstrapperApplication"/>.
9
+ /// </summary>
10
public interface IDefaultBootstrapperApplication : IBootstrapperApplication
11
{
12
+ /// <summary>
13
+ /// Fired when the engine has begun installing the bundle.
14
+ /// </summary>
15
event EventHandler<ApplyBeginEventArgs> ApplyBegin;
16
+
17
+ /// <summary>
18
+ /// Fired when the engine has completed installing the bundle.
19
+ /// </summary>
20
event EventHandler<ApplyCompleteEventArgs> ApplyComplete;
21
+
22
+ /// <summary>
23
+ /// Fired when the engine is about to begin an MSI transaction.
24
+ /// </summary>
25
event EventHandler<BeginMsiTransactionBeginEventArgs> BeginMsiTransactionBegin;
26
+
27
+ /// <summary>
28
+ /// Fired when the engine has completed beginning an MSI transaction.
29
+ /// </summary>
30
event EventHandler<BeginMsiTransactionCompleteEventArgs> BeginMsiTransactionComplete;
31
+
32
+ /// <summary>
33
+ /// Fired when the engine has begun acquiring the installation sources.
34
+ /// </summary>
35
event EventHandler<CacheAcquireBeginEventArgs> CacheAcquireBegin;
36
+
37
+ /// <summary>
38
+ /// Fired when the engine has completed the acquisition of the installation sources.
39
+ /// </summary>
40
event EventHandler<CacheAcquireCompleteEventArgs> CacheAcquireComplete;
41
+
42
+ /// <summary>
43
+ /// Fired when the engine has progress acquiring the installation sources.
44
+ /// </summary>
45
event EventHandler<CacheAcquireProgressEventArgs> CacheAcquireProgress;
46
+
47
+ /// <summary>
48
+ /// Fired when the engine has begun caching the installation sources.
49
+ /// </summary>
50
event EventHandler<CacheBeginEventArgs> CacheBegin;
51
+
52
+ /// <summary>
53
+ /// Fired after the engine has cached the installation sources.
54
+ /// </summary>
55
event EventHandler<CacheCompleteEventArgs> CacheComplete;
56
+
57
+ /// <summary>
58
+ /// Fired when the engine has begun caching a specific package.
59
+ /// </summary>
60
event EventHandler<CachePackageBeginEventArgs> CachePackageBegin;
61
+
62
+ /// <summary>
63
+ /// Fired when the engine has completed caching a specific package.
64
+ /// </summary>
65
event EventHandler<CachePackageCompleteEventArgs> CachePackageComplete;
66
+
67
+ /// <summary>
68
+ /// Fired when the engine begins the verification of the acquired installation sources.
69
+ /// </summary>
70
event EventHandler<CacheVerifyBeginEventArgs> CacheVerifyBegin;
71
+
72
+ /// <summary>
73
+ /// Fired when the engine complete the verification of the acquired installation sources.
74
+ /// </summary>
75
event EventHandler<CacheVerifyCompleteEventArgs> CacheVerifyComplete;
76
+
77
+ /// <summary>
78
+ /// Fired when the engine is about to commit an MSI transaction.
79
+ /// </summary>
80
event EventHandler<CommitMsiTransactionBeginEventArgs> CommitMsiTransactionBegin;
81
+
82
+ /// <summary>
83
+ /// Fired when the engine has completed comitting an MSI transaction.
84
+ /// </summary>
85
event EventHandler<CommitMsiTransactionCompleteEventArgs> CommitMsiTransactionComplete;
86
+
87
+ /// <summary>
88
+ /// Fired when the overall detection phase has begun.
89
+ /// </summary>
90
event EventHandler<DetectBeginEventArgs> DetectBegin;
91
+
92
+ /// <summary>
93
+ /// Fired when a package was not detected but a package using the same provider key was.
94
+ /// </summary>
95
event EventHandler<DetectCompatibleMsiPackageEventArgs> DetectCompatibleMsiPackage;
96
+
97
+ /// <summary>
98
+ /// Fired when the detection phase has completed.
99
+ /// </summary>
100
event EventHandler<DetectCompleteEventArgs> DetectComplete;
101
+
102
+ /// <summary>
103
+ /// Fired when a forward compatible bundle is detected.
104
+ /// </summary>
105
event EventHandler<DetectForwardCompatibleBundleEventArgs> DetectForwardCompatibleBundle;
106
+
107
+ /// <summary>
108
+ /// Fired when a feature in an MSI package has been detected.
109
+ /// </summary>
110
event EventHandler<DetectMsiFeatureEventArgs> DetectMsiFeature;
111
+
112
+ /// <summary>
113
+ /// Fired when the detection for a specific package has begun.
114
+ /// </summary>
115
event EventHandler<DetectPackageBeginEventArgs> DetectPackageBegin;
116
+
117
+ /// <summary>
118
+ /// Fired when the detection for a specific package has completed.
119
+ /// </summary>
120
event EventHandler<DetectPackageCompleteEventArgs> DetectPackageComplete;
121
+
122
+ /// <summary>
123
+ /// Fired when a related bundle has been detected for a bundle.
124
+ /// </summary>
125
event EventHandler<DetectRelatedBundleEventArgs> DetectRelatedBundle;
126
+
127
+ /// <summary>
128
+ /// Fired when a related MSI package has been detected for a package.
129
+ /// </summary>
130
event EventHandler<DetectRelatedMsiPackageEventArgs> DetectRelatedMsiPackage;
131
+
132
+ /// <summary>
133
+ /// Fired when an MSP package detects a target MSI has been detected.
134
+ /// </summary>
135
event EventHandler<DetectTargetMsiPackageEventArgs> DetectTargetMsiPackage;
136
+
137
+ /// <summary>
138
+ /// Fired when the update detection has found a potential update candidate.
139
+ /// </summary>
140
event EventHandler<DetectUpdateEventArgs> DetectUpdate;
141
+
142
+ /// <summary>
143
+ /// Fired when the update detection phase has begun.
144
+ /// </summary>
145
event EventHandler<DetectUpdateBeginEventArgs> DetectUpdateBegin;
146
+
147
+ /// <summary>
148
+ /// Fired when the update detection phase has completed.
149
+ /// </summary>
150
event EventHandler<DetectUpdateCompleteEventArgs> DetectUpdateComplete;
151
+
152
+ /// <summary>
153
+ /// Fired when the engine is about to start the elevated process.
154
+ /// </summary>
155
event EventHandler<ElevateBeginEventArgs> ElevateBegin;
156
+
157
+ /// <summary>
158
+ /// Fired when the engine has completed starting the elevated process.
159
+ /// </summary>
160
event EventHandler<ElevateCompleteEventArgs> ElevateComplete;
161
+
162
+ /// <summary>
163
+ /// Fired when the engine has encountered an error.
164
+ /// </summary>
165
event EventHandler<ErrorEventArgs> Error;
166
+
167
+ /// <summary>
168
+ /// Fired when the engine has begun installing packages.
169
+ /// </summary>
170
event EventHandler<ExecuteBeginEventArgs> ExecuteBegin;
171
+
172
+ /// <summary>
173
+ /// Fired when the engine has completed installing packages.
174
+ /// </summary>
175
event EventHandler<ExecuteCompleteEventArgs> ExecuteComplete;
176
+
177
+ /// <summary>
178
+ /// Fired when Windows Installer sends a files in use installation message.
179
+ /// </summary>
180
event EventHandler<ExecuteFilesInUseEventArgs> ExecuteFilesInUse;
181
+
182
+ /// <summary>
183
+ /// Fired when Windows Installer sends an installation message.
184
+ /// </summary>
185
event EventHandler<ExecuteMsiMessageEventArgs> ExecuteMsiMessage;
186
+
187
+ /// <summary>
188
+ /// Fired when the engine has begun installing a specific package.
189
+ /// </summary>
190
event EventHandler<ExecutePackageBeginEventArgs> ExecutePackageBegin;
191
+
192
+ /// <summary>
193
+ /// Fired when the engine has completed installing a specific package.
194
+ /// </summary>
195
event EventHandler<ExecutePackageCompleteEventArgs> ExecutePackageComplete;
196
+
197
+ /// <summary>
198
+ /// Fired when the engine executes one or more patches targeting a product.
199
+ /// </summary>
200
event EventHandler<ExecutePatchTargetEventArgs> ExecutePatchTarget;
201
+
202
+ /// <summary>
203
+ /// Fired by the engine while executing on payload.
204
+ /// </summary>
205
event EventHandler<ExecuteProgressEventArgs> ExecuteProgress;
206
+
207
+ /// <summary>
208
+ /// Fired when the engine is about to launch the preapproved executable.
209
+ /// </summary>
210
event EventHandler<LaunchApprovedExeBeginEventArgs> LaunchApprovedExeBegin;
211
+
212
+ /// <summary>
213
+ /// Fired when the engine has completed launching the preapproved executable.
214
+ /// </summary>
215
event EventHandler<LaunchApprovedExeCompleteEventArgs> LaunchApprovedExeComplete;
216
+
217
+ /// <summary>
218
+ /// Fired when the engine is about to pause Windows automatic updates.
219
+ /// </summary>
220
event EventHandler<PauseAutomaticUpdatesBeginEventArgs> PauseAutomaticUpdatesBegin;
221
+
222
+ /// <summary>
223
+ /// Fired when the engine has completed pausing Windows automatic updates.
224
+ /// </summary>
225
event EventHandler<PauseAutomaticUpdatesCompleteEventArgs> PauseAutomaticUpdatesComplete;
226
+
227
+ /// <summary>
228
+ /// Fired when the engine has begun planning the installation.
229
+ /// </summary>
230
event EventHandler<PlanBeginEventArgs> PlanBegin;
231
+
232
+ /// <summary>
233
+ /// Fired when the engine plans a new, compatible package using the same provider key.
234
+ /// </summary>
235
event EventHandler<PlanCompatibleMsiPackageBeginEventArgs> PlanCompatibleMsiPackageBegin;
236
+
237
+ /// <summary>
238
+ /// Fired when the engine has completed planning the installation of a specific package.
239
+ /// </summary>
240
event EventHandler<PlanCompatibleMsiPackageCompleteEventArgs> PlanCompatibleMsiPackageComplete;
241
+
242
+ /// <summary>
243
+ /// Fired when the engine has completed planning the installation.
244
+ /// </summary>
245
event EventHandler<PlanCompleteEventArgs> PlanComplete;
246
+
247
+ /// <summary>
248
+ /// Fired when the engine is about to plan a feature in an MSI package.
249
+ /// </summary>
250
event EventHandler<PlanMsiFeatureEventArgs> PlanMsiFeature;
251
+
252
+ /// <summary>
253
+ /// Fired when the engine is planning an MSI or MSP package.
254
+ /// </summary>
255
event EventHandler<PlanMsiPackageEventArgs> PlanMsiPackage;
256
+
257
+ /// <summary>
258
+ /// Fired when the engine has begun planning the installation of a specific package.
259
+ /// </summary>
260
event EventHandler<PlanPackageBeginEventArgs> PlanPackageBegin;
261
+
262
+ /// <summary>
263
+ /// Fired when the engine has completed planning the installation of a specific package.
264
+ /// </summary>
265
event EventHandler<PlanPackageCompleteEventArgs> PlanPackageComplete;
266
+
267
+ /// <summary>
268
+ /// Fired when the engine has begun planning for a related bundle.
269
+ /// </summary>
270
event EventHandler<PlanRelatedBundleEventArgs> PlanRelatedBundle;
271
+
272
+ /// <summary>
273
+ /// Fired when the engine is about to plan the target MSI of a MSP package.
274
+ /// </summary>
275
event EventHandler<PlanTargetMsiPackageEventArgs> PlanTargetMsiPackage;
276
+
277
+ /// <summary>
278
+ /// Fired when the engine has changed progress for the bundle installation.
279
+ /// </summary>
280
event EventHandler<ProgressEventArgs> Progress;
281
+
282
+ /// <summary>
283
+ /// Fired when the engine has begun registering the location and visibility of the bundle.
284
+ /// </summary>
285
event EventHandler<RegisterBeginEventArgs> RegisterBegin;
286
+
287
+ /// <summary>
288
+ /// Fired when the engine has completed registering the location and visibility of the bundle.
289
+ /// </summary>
290
event EventHandler<RegisterCompleteEventArgs> RegisterComplete;
291
+
292
+ /// <summary>
293
+ /// Fired by the engine to allow the BA to change the source
294
+ /// using <see cref="IEngine.SetLocalSource(string, string, string)"/> or <see cref="IEngine.SetDownloadSource(string, string, string, string, string)"/>.
295
+ /// </summary>
296
event EventHandler<ResolveSourceEventArgs> ResolveSource;
297
+
298
+ /// <summary>
299
+ /// Fired when the engine is about to rollback an MSI transaction.
300
+ /// </summary>
301
event EventHandler<RollbackMsiTransactionBeginEventArgs> RollbackMsiTransactionBegin;
302
+
303
+ /// <summary>
304
+ /// Fired when the engine has completed rolling back an MSI transaction.
305
+ /// </summary>
306
event EventHandler<RollbackMsiTransactionCompleteEventArgs> RollbackMsiTransactionComplete;
307
+
308
+ /// <summary>
309
+ /// Fired when the engine is shutting down the bootstrapper application.
310
+ /// </summary>
311
event EventHandler<ShutdownEventArgs> Shutdown;
312
+
313
+ /// <summary>
314
+ /// Fired when the engine is starting up the bootstrapper application.
315
+ /// </summary>
316
event EventHandler<StartupEventArgs> Startup;
317
+
318
+ /// <summary>
319
+ /// Fired when the engine is about to take a system restore point.
320
+ /// </summary>
321
event EventHandler<SystemRestorePointBeginEventArgs> SystemRestorePointBegin;
322
+
323
+ /// <summary>
324
+ /// Fired when the engine has completed taking a system restore point.
325
+ /// </summary>
326
event EventHandler<SystemRestorePointCompleteEventArgs> SystemRestorePointComplete;
327
+
328
+ /// <summary>
329
+ /// Fired when the system is shutting down or user is logging off.
330
+ /// </summary>
331
+ /// <remarks>
332
+ /// <para>To prevent shutting down or logging off, set <see cref="CancellableHResultEventArgs.Cancel"/> to
333
+ /// true; otherwise, set it to false.</para>
334
+ /// <para>By default setup will prevent shutting down or logging off between
335
+ /// <see cref="IDefaultBootstrapperApplication.ApplyBegin"/> and <see cref="IDefaultBootstrapperApplication.ApplyComplete"/>.
336
+ /// Derivatives can change this behavior by handling <see cref="IDefaultBootstrapperApplication.SystemShutdown"/>.</para>
337
+ /// <para>If <see cref="SystemShutdownEventArgs.Reasons"/> contains <see cref="EndSessionReasons.Critical"/>
338
+ /// the bootstrapper cannot prevent the shutdown and only has a few seconds to save state or perform any other
339
+ /// critical operations before being closed by the operating system.</para>
340
+ /// <para>This event may be fired on a different thread.</para>
341
+ /// </remarks>
342
event EventHandler<SystemShutdownEventArgs> SystemShutdown;
343
+
344
+ /// <summary>
345
+ /// Fired when the engine has begun removing the registration for the location and visibility of the bundle.
346
+ /// </summary>
347
event EventHandler<UnregisterBeginEventArgs> UnregisterBegin;
348
+
349
+ /// <summary>
350
+ /// Fired when the engine has completed removing the registration for the location and visibility of the bundle.
351
+ /// </summary>
352
event EventHandler<UnregisterCompleteEventArgs> UnregisterComplete;
353
}
354
}
\ No newline at end of file
src/WixToolset.Mba.Core/IEngine.cs
+3
@@ -6,6 +6,9 @@ namespace WixToolset.Mba.Core
6
using System.ComponentModel;
7
using System.Security;
8
9
+ /// <summary>
10
+ /// High level abstraction over the <see cref="IBootstrapperEngine"/> interface.
11
+ /// </summary>
12
public interface IEngine
13
{
14
/// <summary>
src/WixToolset.Mba.Core/IPackageInfo.cs
+66
@@ -2,23 +2,89 @@
2
3
namespace WixToolset.Mba.Core
4
{
5
+ /// <summary>
6
+ /// Package information from the BA manifest.
7
+ /// </summary>
8
public interface IPackageInfo
9
{
10
+ /// <summary>
11
+ ///
12
+ /// </summary>
13
CacheType CacheType { get; }
14
+
15
+ /// <summary>
16
+ /// Place for the BA to store it's own custom data for this package.
17
+ /// </summary>
18
object CustomData { get; set; }
19
+
20
+ /// <summary>
21
+ ///
22
+ /// </summary>
23
string Description { get; }
24
+
25
+ /// <summary>
26
+ ///
27
+ /// </summary>
28
string DisplayInternalUICondition { get; }
29
+
30
+ /// <summary>
31
+ ///
32
+ /// </summary>
33
string DisplayName { get; }
34
+
35
+ /// <summary>
36
+ ///
37
+ /// </summary>
38
string Id { get; }
39
+
40
+ /// <summary>
41
+ ///
42
+ /// </summary>
43
string InstallCondition { get; }
44
+
45
+ /// <summary>
46
+ ///
47
+ /// </summary>
48
bool Permanent { get; }
49
+
50
+ /// <summary>
51
+ ///
52
+ /// </summary>
53
bool PrereqPackage { get; }
54
+
55
+ /// <summary>
56
+ ///
57
+ /// </summary>
58
string PrereqLicenseFile { get; }
59
+
60
+ /// <summary>
61
+ ///
62
+ /// </summary>
63
string PrereqLicenseUrl { get; }
64
+
65
+ /// <summary>
66
+ ///
67
+ /// </summary>
68
string ProductCode { get; }
69
+
70
+ /// <summary>
71
+ ///
72
+ /// </summary>
73
PackageType Type { get; }
74
+
75
+ /// <summary>
76
+ ///
77
+ /// </summary>
78
string UpgradeCode { get; }
79
+
80
+ /// <summary>
81
+ ///
82
+ /// </summary>
83
string Version { get; }
84
+
85
+ /// <summary>
86
+ ///
87
+ /// </summary>
88
bool Vital { get; }
89
}
90
}
\ No newline at end of file
src/WixToolset.Mba.Core/PackageInfo.cs
+107
@@ -7,46 +7,133 @@ namespace WixToolset.Mba.Core
7
using System.Xml;
8
using System.Xml.XPath;
9
10
+ /// <summary>
11
+ ///
12
+ /// </summary>
13
public enum CacheType
14
{
15
+ /// <summary>
16
+ ///
17
+ /// </summary>
18
No,
19
+
20
+ /// <summary>
21
+ ///
22
+ /// </summary>
23
Yes,
24
+
25
+ /// <summary>
26
+ ///
27
+ /// </summary>
28
Always,
29
}
30
31
+ /// <summary>
32
+ ///
33
+ /// </summary>
34
public enum PackageType
35
{
36
+ /// <summary>
37
+ ///
38
+ /// </summary>
39
Unknown,
40
+
41
+ /// <summary>
42
+ ///
43
+ /// </summary>
44
Exe,
45
+
46
+ /// <summary>
47
+ ///
48
+ /// </summary>
49
Msi,
50
+
51
+ /// <summary>
52
+ ///
53
+ /// </summary>
54
Msp,
55
+
56
+ /// <summary>
57
+ ///
58
+ /// </summary>
59
Msu,
60
+
61
+ /// <summary>
62
+ ///
63
+ /// </summary>
64
UpgradeBundle,
65
+
66
+ /// <summary>
67
+ ///
68
+ /// </summary>
69
AddonBundle,
70
+
71
+ /// <summary>
72
+ ///
73
+ /// </summary>
74
PatchBundle,
75
}
76
77
+ /// <summary>
78
+ /// Default implementation of <see cref="IPackageInfo"/>.
79
+ /// </summary>
80
public class PackageInfo : IPackageInfo
81
{
82
+ /// <inheritdoc/>
83
public string Id { get; internal set; }
84
+
85
+ /// <inheritdoc/>
86
public string DisplayName { get; internal set; }
87
+
88
+ /// <inheritdoc/>
89
public string Description { get; internal set; }
90
+
91
+ /// <inheritdoc/>
92
public PackageType Type { get; internal set; }
93
+
94
+ /// <inheritdoc/>
95
public bool Permanent { get; internal set; }
96
+
97
+ /// <inheritdoc/>
98
public bool Vital { get; internal set; }
99
+
100
+ /// <inheritdoc/>
101
public string DisplayInternalUICondition { get; internal set; }
102
+
103
+ /// <inheritdoc/>
104
public string ProductCode { get; internal set; }
105
+
106
+ /// <inheritdoc/>
107
public string UpgradeCode { get; internal set; }
108
+
109
+ /// <inheritdoc/>
110
public string Version { get; internal set; }
111
+
112
+ /// <inheritdoc/>
113
public string InstallCondition { get; internal set; }
114
+
115
+ /// <inheritdoc/>
116
public CacheType CacheType { get; internal set; }
117
+
118
+ /// <inheritdoc/>
119
public bool PrereqPackage { get; internal set; }
120
+
121
+ /// <inheritdoc/>
122
public string PrereqLicenseFile { get; internal set; }
123
+
124
+ /// <inheritdoc/>
125
public string PrereqLicenseUrl { get; internal set; }
126
+
127
+ /// <inheritdoc/>
128
public object CustomData { get; set; }
129
130
internal PackageInfo() { }
131
132
+ /// <summary>
133
+ ///
134
+ /// </summary>
135
+ /// <param name="root"></param>
136
+ /// <returns></returns>
137
public static IDictionary<string, IPackageInfo> ParsePackagesFromXml(XPathNavigator root)
138
{
139
var packagesById = new Dictionary<string, IPackageInfo>();
@@ -105,6 +192,12 @@ namespace WixToolset.Mba.Core
192
return packagesById;
193
}
194
195
+ /// <summary>
196
+ ///
197
+ /// </summary>
198
+ /// <param name="node"></param>
199
+ /// <param name="attributeName"></param>
200
+ /// <returns></returns>
201
public static CacheType? GetCacheTypeAttribute(XPathNavigator node, string attributeName)
202
{
203
string attributeValue = BootstrapperApplicationData.GetAttribute(node, attributeName);
@@ -128,6 +221,12 @@ namespace WixToolset.Mba.Core
221
}
222
}
223
224
+ /// <summary>
225
+ ///
226
+ /// </summary>
227
+ /// <param name="node"></param>
228
+ /// <param name="attributeName"></param>
229
+ /// <returns></returns>
230
public static PackageType? GetPackageTypeAttribute(XPathNavigator node, string attributeName)
231
{
232
string attributeValue = BootstrapperApplicationData.GetAttribute(node, attributeName);
@@ -159,6 +258,14 @@ namespace WixToolset.Mba.Core
258
}
259
}
260
261
+ /// <summary>
262
+ ///
263
+ /// </summary>
264
+ /// <param name="id"></param>
265
+ /// <param name="relationType"></param>
266
+ /// <param name="perMachine"></param>
267
+ /// <param name="version"></param>
268
+ /// <returns></returns>
269
public static IPackageInfo GetRelatedBundleAsPackage(string id, RelationType relationType, bool perMachine, string version)
270
{
271
PackageInfo package = new PackageInfo();
src/WixToolset.Mba.Core/VerUtil.cs
+19
@@ -6,6 +6,9 @@ namespace WixToolset.Mba.Core
6
using System.Runtime.InteropServices;
7
using System.Text;
8
9
+ /// <summary>
10
+ /// Managed wrapper for verutil.
11
+ /// </summary>
12
public static class VerUtil
13
{
14
[DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)]
@@ -105,18 +108,34 @@ namespace WixToolset.Mba.Core
108
return VerCompareStringVersions(version1, version2, strict);
109
}
110
111
+ /// <summary>
112
+ ///
113
+ /// </summary>
114
+ /// <param name="version"></param>
115
+ /// <returns></returns>
116
public static VerUtilVersion CopyVersion(VerUtilVersion version)
117
{
118
var handle = VerCopyVersion(version.GetHandle());
119
return new VerUtilVersion(handle);
120
}
121
122
+ /// <summary>
123
+ ///
124
+ /// </summary>
125
+ /// <param name="version"></param>
126
+ /// <param name="strict">Whether to throw exception on invalid version.</param>
127
+ /// <returns></returns>
128
public static VerUtilVersion ParseVersion(string version, bool strict)
129
{
130
var handle = VerParseVersion(version, 0, strict);
131
return new VerUtilVersion(handle);
132
}
133
134
+ /// <summary>
135
+ ///
136
+ /// </summary>
137
+ /// <param name="version"></param>
138
+ /// <returns></returns>
139
public static VerUtilVersion VersionFromQword(long version)
140
{
141
var handle = VerVersionFromQword(version);
src/WixToolset.Mba.Core/VerUtilVersion.cs
+36
@@ -5,6 +5,9 @@ namespace WixToolset.Mba.Core
5
using System;
6
using System.Runtime.InteropServices;
7
8
+ /// <summary>
9
+ /// An enhanced implementation of SemVer 2.0.
10
+ /// </summary>
11
public sealed class VerUtilVersion : IDisposable
12
{
13
internal VerUtilVersion(VerUtil.VersionHandle handle)
@@ -30,15 +33,48 @@ namespace WixToolset.Mba.Core
33
}
34
}
35
36
+ /// <summary>
37
+ /// String version, which would have stripped the leading 'v'.
38
+ /// </summary>
39
public string Version { get; private set; }
40
+
41
+ /// <summary>
42
+ /// For version A.B.C.D, Major is A. It is 0 if not specified.
43
+ /// </summary>
44
public uint Major { get; private set; }
45
+
46
+ /// <summary>
47
+ /// For version A.B.C.D, Minor is B. It is 0 if not specified.
48
+ /// </summary>
49
public uint Minor { get; private set; }
50
+
51
+ /// <summary>
52
+ /// For version A.B.C.D, Patch is C. It is 0 if not specified.
53
+ /// </summary>
54
public uint Patch { get; private set; }
55
+
56
+ /// <summary>
57
+ /// For version A.B.C.D, Revision is D. It is 0 if not specified.
58
+ /// </summary>
59
public uint Revision { get; private set; }
60
+
61
+ /// <summary>
62
+ /// For version X.Y.Z-releaselabels+metadata, ReleaseLabels is the parsed information for releaselabels.
63
+ /// </summary>
64
public VerUtilVersionReleaseLabel[] ReleaseLabels { get; private set; }
65
+
66
+ /// <summary>
67
+ /// For version X.Y.Z-releaselabels+metadata, Metadata is the rest of the string after +.
68
+ /// For invalid versions, it is all of the string after the point where it was an invalid string.
69
+ /// </summary>
70
public string Metadata { get; private set; }
71
+
72
+ /// <summary>
73
+ /// Whether the version conformed to the spec.
74
+ /// </summary>
75
public bool IsInvalid { get; private set; }
76
77
+ /// <inheritdoc/>
78
public void Dispose()
79
{
80
if (this.Handle != null)
src/WixToolset.Mba.Core/VerUtilVersionReleaseLabel.cs
+14
@@ -5,6 +5,9 @@ namespace WixToolset.Mba.Core
5
using System;
6
using System.Runtime.InteropServices;
7
8
+ /// <summary>
9
+ /// A release label from a <see cref="VerUtilVersion"/>.
10
+ /// </summary>
11
public sealed class VerUtilVersionReleaseLabel
12
{
13
internal VerUtilVersionReleaseLabel(IntPtr pReleaseLabel, IntPtr wzVersion)
@@ -15,8 +18,19 @@ namespace WixToolset.Mba.Core
18
this.Label = VerUtil.VersionStringFromOffset(wzVersion, releaseLabel.cchLabelOffset, releaseLabel.cchLabel);
19
}
20
21
+ /// <summary>
22
+ /// Whether the label was parsed as a number.
23
+ /// </summary>
24
public bool IsNumeric { get; private set; }
25
+
26
+ /// <summary>
27
+ /// If <see cref="IsNumeric"/> then the value that was parsed.
28
+ /// </summary>
29
public uint Value { get; private set; }
30
+
31
+ /// <summary>
32
+ /// The string version of the label.
33
+ /// </summary>
34
public string Label { get; private set; }
35
}
36
}
src/WixToolset.Mba.Core/WixToolset.Mba.Core.csproj
+1
-5
@@ -10,11 +10,7 @@
10
<Description>Managed Bootstrapper Application Core</Description>
11
<NuspecFile>$(MSBuildThisFileName).nuspec</NuspecFile>
12
<IncludeSymbols>true</IncludeSymbols>
13
- <NBGV_EmitThisAssemblyClass>false</NBGV_EmitThisAssemblyClass>
14
- </PropertyGroup>
15
-
16
- <PropertyGroup Condition=" '$(UsingMicrosoftNETSdk)'!='true' and '$(CreateDocumentation)'!='false' ">
17
- <DocumentationFile>$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
13
+ <CreateDocumentationFile>true</CreateDocumentationFile>
14
</PropertyGroup>
15
16
<ItemGroup>
src/WixToolset.Mba.Core/WixToolset.Mba.Core.nuspec
+2
@@ -19,7 +19,9 @@
19
20
<files>
21
<file src="net20\$id$.dll" target="lib\net20" />
22
+ <file src="net20\$id$.xml" target="lib\net20" />
23
<file src="netstandard2.0\$id$.dll" target="lib\netstandard2.0" />
24
+ <file src="netstandard2.0\$id$.xml" target="lib\netstandard2.0" />
25
26
<file src="v142\ARM64\mbanative.dll" target="runtimes\win-arm64\native" />
27
<file src="v142\ARM64\mbanative.pdb" target="runtimes\win-arm64\native" />
src/test/WixToolsetTest.Mba.Core/BaseBootstrapperApplicationFactoryFixture.cs
+19
@@ -102,6 +102,25 @@ namespace WixToolsetTest.Mba.Core
102
[MarshalAs(UnmanagedType.LPWStr)] public string wzLayoutDirectory;
103
}
104
105
+ [StructLayout(LayoutKind.Sequential)]
106
+ public struct BootstrapperCreateArgs
107
+ {
108
+ [MarshalAs(UnmanagedType.I4)] public readonly int cbSize;
109
+ [MarshalAs(UnmanagedType.I8)] public readonly long qwEngineAPIVersion;
110
+ public readonly IntPtr pfnBootstrapperEngineProc;
111
+ public readonly IntPtr pvBootstrapperEngineProcContext;
112
+ public readonly IntPtr pCommand;
113
+
114
+ public BootstrapperCreateArgs(long version, IntPtr pEngineProc, IntPtr pEngineContext, IntPtr pCommand)
115
+ {
116
+ this.cbSize = Marshal.SizeOf(typeof(BootstrapperCreateArgs));
117
+ this.qwEngineAPIVersion = version;
118
+ this.pfnBootstrapperEngineProc = pEngineProc;
119
+ this.pvBootstrapperEngineProcContext = pEngineContext;
120
+ this.pCommand = pCommand;
121
+ }
122
+ }
123
+
124
[StructLayout(LayoutKind.Sequential)]
125
public struct TestCreateResults
126
{