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