@joebigelow / wix / commits / 655a166a

Move Burn headers from BootstrapperCore repo.

Sean Hall committed Jul 18, 2020 at 16:48 UTC 655a166adbd56ea7036b2001258ede77f58baee0
14 files changed +1788 -16
appveyor.cmd
+1
@@ -6,6 +6,7 @@ nuget restore || exit /b
6 msbuild -p:Configuration=Release;Platform=x86 || exit /b
7
8 msbuild -p:Configuration=Release -t:Pack src\stub\stub.vcxproj || exit /b
9 +msbuild -p:Configuration=Release -t:Pack src\WixToolset.BootstrapperCore.Native\WixToolset.BootstrapperCore.Native.proj || exit /b
10
11 @popd
12 @endlocal
\ No newline at end of file
nuget.config
-1
@@ -3,7 +3,6 @@
3 <packageSources>
4 <clear />
5 <add key="wixbuildtools" value="https://ci.appveyor.com/nuget/wixbuildtools" />
6 - <add key="wixtoolset-bootstrappercore" value="https://ci.appveyor.com/nuget/wixtoolset-bootstrappercore" />
6 <add key="wixtoolset-dutil" value="https://ci.appveyor.com/nuget/wixtoolset-dutil" />
7 <add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
8 </packageSources>
src/WixToolset.BootstrapperCore.Native/WixToolset.BootstrapperCore.Native.nuspec new
+19
@@ -0,0 +1,19 @@
1 +<?xml version="1.0"?>
2 +<package >
3 + <metadata>
4 + <id>$id$</id>
5 + <version>$version$</version>
6 + <authors>WiX Toolset Team</authors>
7 + <owners>WiX Toolset Team</owners>
8 + <license type="expression">MS-RL</license>
9 + <projectUrl>https://github.com/wixtoolset/BootstrapperCore</projectUrl>
10 + <requireLicenseAcceptance>false</requireLicenseAcceptance>
11 + <description>$description$</description>
12 + <copyright>$copyright$</copyright>
13 + </metadata>
14 +
15 + <files>
16 + <file src="build\$id$.props" target="build\" />
17 + <file src="inc\*" target="build\native\include" />
18 + </files>
19 +</package>
src/WixToolset.BootstrapperCore.Native/WixToolset.BootstrapperCore.Native.proj new
+19
@@ -0,0 +1,19 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +
5 +<Project ToolsVersion="4.0" DefaultTargets="Pack" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6 + <PropertyGroup>
7 + <PackageId>WixToolset.BootstrapperCore.Native</PackageId>
8 + <Description>WiX Bootstrapper native interfaces</Description>
9 + </PropertyGroup>
10 +
11 + <Target Name="Pack" DependsOnTargets="GetBuildVersion">
12 + <Exec Command='nuget pack $(PackageId).nuspec -OutputDirectory "$(BaseOutputPath)$(Configuration)" -Properties Id=$(PackageId);Version="$(BuildVersionSimple)";Authors="$(Authors)";Copyright="$(Copyright)";Description="$(Description)"' />
13 + </Target>
14 +
15 + <Import Project="..\Directory.Build.props" />
16 + <Import Project="..\Directory.Build.targets" />
17 +
18 + <Import Project="..\..\packages\Nerdbank.GitVersioning.3.1.91\build\Nerdbank.GitVersioning.targets" Condition="Exists('..\..\packages\Nerdbank.GitVersioning.3.1.91\build\Nerdbank.GitVersioning.targets')" />
19 +</Project>
\ No newline at end of file
src/WixToolset.BootstrapperCore.Native/build/WixToolset.BootstrapperCore.Native.props new
+13
@@ -0,0 +1,13 @@
1 +<?xml version="1.0" encoding="utf-8"?>
2 +<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3 +
4 +<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 + <ItemDefinitionGroup>
6 + <ClCompile>
7 + <AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)native\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
8 + </ClCompile>
9 + <ResourceCompile>
10 + <AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)native\include\;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
11 + </ResourceCompile>
12 + </ItemDefinitionGroup>
13 +</Project>
src/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h new
+1054
@@ -0,0 +1,1054 @@
1 +#pragma once
2 +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3 +
4 +
5 +enum BOOTSTRAPPER_DISPLAY
6 +{
7 + BOOTSTRAPPER_DISPLAY_UNKNOWN,
8 + BOOTSTRAPPER_DISPLAY_EMBEDDED,
9 + BOOTSTRAPPER_DISPLAY_NONE,
10 + BOOTSTRAPPER_DISPLAY_PASSIVE,
11 + BOOTSTRAPPER_DISPLAY_FULL,
12 +};
13 +
14 +enum BOOTSTRAPPER_RESTART
15 +{
16 + BOOTSTRAPPER_RESTART_UNKNOWN,
17 + BOOTSTRAPPER_RESTART_NEVER,
18 + BOOTSTRAPPER_RESTART_PROMPT,
19 + BOOTSTRAPPER_RESTART_AUTOMATIC,
20 + BOOTSTRAPPER_RESTART_ALWAYS,
21 +};
22 +
23 +enum BOOTSTRAPPER_RESUME_TYPE
24 +{
25 + BOOTSTRAPPER_RESUME_TYPE_NONE,
26 + BOOTSTRAPPER_RESUME_TYPE_INVALID, // resume information is present but invalid
27 + BOOTSTRAPPER_RESUME_TYPE_INTERRUPTED, // relaunched after an unexpected interruption
28 + BOOTSTRAPPER_RESUME_TYPE_REBOOT_PENDING, // reboot has not taken place yet
29 + BOOTSTRAPPER_RESUME_TYPE_REBOOT, // relaunched after reboot
30 + BOOTSTRAPPER_RESUME_TYPE_SUSPEND, // relaunched after suspend
31 + BOOTSTRAPPER_RESUME_TYPE_ARP, // launched from ARP
32 +};
33 +
34 +enum BOOTSTRAPPER_ERROR_TYPE
35 +{
36 + BOOTSTRAPPER_ERROR_TYPE_ELEVATE, // error occurred trying to elevate.
37 + BOOTSTRAPPER_ERROR_TYPE_WINDOWS_INSTALLER, // error came from windows installer.
38 + BOOTSTRAPPER_ERROR_TYPE_EXE_PACKAGE, // error came from an exe package.
39 + BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_SERVER, // error occurred trying to authenticate with HTTP server.
40 + BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_PROXY, // error occurred trying to authenticate with HTTP proxy.
41 + BOOTSTRAPPER_ERROR_TYPE_APPLY, // error occurred during apply.
42 +};
43 +
44 +enum BOOTSTRAPPER_RELATED_OPERATION
45 +{
46 + BOOTSTRAPPER_RELATED_OPERATION_NONE,
47 + BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE,
48 + BOOTSTRAPPER_RELATED_OPERATION_MINOR_UPDATE,
49 + BOOTSTRAPPER_RELATED_OPERATION_MAJOR_UPGRADE,
50 + BOOTSTRAPPER_RELATED_OPERATION_REMOVE,
51 + BOOTSTRAPPER_RELATED_OPERATION_INSTALL,
52 + BOOTSTRAPPER_RELATED_OPERATION_REPAIR,
53 +};
54 +
55 +enum BOOTSTRAPPER_CACHE_OPERATION
56 +{
57 + BOOTSTRAPPER_CACHE_OPERATION_COPY,
58 + BOOTSTRAPPER_CACHE_OPERATION_DOWNLOAD,
59 + BOOTSTRAPPER_CACHE_OPERATION_EXTRACT,
60 +};
61 +
62 +enum BOOTSTRAPPER_APPLY_RESTART
63 +{
64 + BOOTSTRAPPER_APPLY_RESTART_NONE,
65 + BOOTSTRAPPER_APPLY_RESTART_REQUIRED,
66 + BOOTSTRAPPER_APPLY_RESTART_INITIATED,
67 +};
68 +
69 +enum BOOTSTRAPPER_RELATION_TYPE
70 +{
71 + BOOTSTRAPPER_RELATION_NONE,
72 + BOOTSTRAPPER_RELATION_DETECT,
73 + BOOTSTRAPPER_RELATION_UPGRADE,
74 + BOOTSTRAPPER_RELATION_ADDON,
75 + BOOTSTRAPPER_RELATION_PATCH,
76 + BOOTSTRAPPER_RELATION_DEPENDENT,
77 + BOOTSTRAPPER_RELATION_UPDATE,
78 +};
79 +
80 +enum BOOTSTRAPPER_APPLICATION_MESSAGE
81 +{
82 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN,
83 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPLETE,
84 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANBEGIN,
85 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE,
86 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP,
87 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN,
88 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMSHUTDOWN,
89 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE,
90 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATEBEGIN,
91 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATE,
92 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATECOMPLETE,
93 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLE,
94 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGEBEGIN,
95 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE,
96 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDMSIPACKAGE,
97 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTTARGETMSIPACKAGE,
98 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTMSIFEATURE,
99 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGECOMPLETE,
100 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLE,
101 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGEBEGIN,
102 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN,
103 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE,
104 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANTARGETMSIPACKAGE,
105 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIFEATURE,
106 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGECOMPLETE,
107 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYBEGIN,
108 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATEBEGIN,
109 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATECOMPLETE,
110 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPROGRESS,
111 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONERROR,
112 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERBEGIN,
113 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERCOMPLETE,
114 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEBEGIN,
115 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGEBEGIN,
116 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREBEGIN,
117 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS,
118 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONRESOLVESOURCE,
119 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE,
120 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN,
121 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE,
122 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGECOMPLETE,
123 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECOMPLETE,
124 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEBEGIN,
125 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGEBEGIN,
126 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPATCHTARGET,
127 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROGRESS,
128 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEMSIMESSAGE,
129 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEFILESINUSE,
130 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGECOMPLETE,
131 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTECOMPLETE,
132 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERBEGIN,
133 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERCOMPLETE,
134 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYCOMPLETE,
135 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN,
136 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE,
137 + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE,
138 +};
139 +
140 +enum BOOTSTRAPPER_APPLYCOMPLETE_ACTION
141 +{
142 + BOOTSTRAPPER_APPLYCOMPLETE_ACTION_NONE,
143 + // Instructs the engine to restart.
144 + // The engine will not launch again after the machine is rebooted.
145 + // Ignored if reboot was already initiated by OnExecutePackageComplete().
146 + BOOTSTRAPPER_APPLYCOMPLETE_ACTION_RESTART,
147 +};
148 +
149 +enum BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION
150 +{
151 + BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION_NONE,
152 + // Instructs the engine to try the acquisition of the package again.
153 + // Ignored if hrStatus is a success.
154 + BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION_RETRY,
155 +};
156 +
157 +enum BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION
158 +{
159 + BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION_NONE,
160 + // Instructs the engine to ignore non-vital package failures and
161 + // continue with the caching.
162 + // Ignored if hrStatus is a success or the package is vital.
163 + BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION_IGNORE,
164 + // Instructs the engine to try the acquisition and verification of the package again.
165 + // Ignored if hrStatus is a success.
166 + BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION_RETRY,
167 +};
168 +
169 +enum BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION
170 +{
171 + BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION_NONE,
172 + // Ignored if hrStatus is a success.
173 + BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION_RETRYVERIFICATION,
174 + // Ignored if hrStatus is a success.
175 + BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION_RETRYACQUISITION,
176 +};
177 +
178 +enum BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION
179 +{
180 + BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_NONE,
181 + // Instructs the engine to ignore non-vital package failures and
182 + // continue with the install.
183 + // Ignored if hrStatus is a success or the package is vital.
184 + BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_IGNORE,
185 + // Instructs the engine to try the execution of the package again.
186 + // Ignored if hrStatus is a success.
187 + BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_RETRY,
188 + // Instructs the engine to stop processing the chain and restart.
189 + // The engine will launch again after the machine is restarted.
190 + BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_RESTART,
191 + // Instructs the engine to stop processing the chain and
192 + // suspend the current state.
193 + BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_SUSPEND,
194 +};
195 +
196 +enum BOOTSTRAPPER_RESOLVESOURCE_ACTION
197 +{
198 + // Instructs the engine that the source can't be found.
199 + BOOTSTRAPPER_RESOLVESOURCE_ACTION_NONE,
200 + // Instructs the engine to try the local source again.
201 + BOOTSTRAPPER_RESOLVESOURCE_ACTION_RETRY,
202 + // Instructs the engine to try the download source.
203 + BOOTSTRAPPER_RESOLVESOURCE_ACTION_DOWNLOAD,
204 +};
205 +
206 +enum BOOTSTRAPPER_SHUTDOWN_ACTION
207 +{
208 + BOOTSTRAPPER_SHUTDOWN_ACTION_NONE,
209 + // Instructs the engine to restart.
210 + // The engine will not launch again after the machine is rebooted.
211 + // Ignored if reboot was already initiated by OnExecutePackageComplete().
212 + BOOTSTRAPPER_SHUTDOWN_ACTION_RESTART,
213 + // Instructs the engine to unload the bootstrapper application and
214 + // restart the engine which will load the bootstrapper application again.
215 + // Typically used to switch from a native bootstrapper application to a managed one.
216 + BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER,
217 +};
218 +
219 +enum BURN_MSI_PROPERTY
220 +{
221 + BURN_MSI_PROPERTY_NONE, // no property added
222 + BURN_MSI_PROPERTY_INSTALL, // add BURNMSIINSTALL=1
223 + BURN_MSI_PROPERTY_MODIFY, // add BURNMSIMODIFY=1
224 + BURN_MSI_PROPERTY_REPAIR, // add BURNMSIREPAIR=1
225 + BURN_MSI_PROPERTY_UNINSTALL,// add BURNMSIUNINSTALL=1
226 +};
227 +
228 +struct BOOTSTRAPPER_COMMAND
229 +{
230 + DWORD cbSize;
231 + BOOTSTRAPPER_ACTION action;
232 + BOOTSTRAPPER_DISPLAY display;
233 + BOOTSTRAPPER_RESTART restart;
234 +
235 + LPWSTR wzCommandLine;
236 + int nCmdShow;
237 +
238 + BOOTSTRAPPER_RESUME_TYPE resumeType;
239 + HWND hwndSplashScreen;
240 +
241 + // If this was run from a related bundle, specifies the relation type
242 + BOOTSTRAPPER_RELATION_TYPE relationType;
243 + BOOL fPassthrough;
244 +
245 + LPWSTR wzLayoutDirectory;
246 + LPWSTR wzBootstrapperWorkingFolder;
247 + LPWSTR wzBootstrapperApplicationDataPath;
248 +};
249 +
250 +struct BA_ONAPPLYBEGIN_ARGS
251 +{
252 + DWORD cbSize;
253 + DWORD dwPhaseCount;
254 +};
255 +
256 +struct BA_ONAPPLYBEGIN_RESULTS
257 +{
258 + DWORD cbSize;
259 + BOOL fCancel;
260 +};
261 +
262 +struct BA_ONAPPLYCOMPLETE_ARGS
263 +{
264 + DWORD cbSize;
265 + HRESULT hrStatus;
266 + // Indicates whether any package required a reboot or initiated the reboot already.
267 + BOOTSTRAPPER_APPLY_RESTART restart;
268 + BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation;
269 +};
270 +
271 +struct BA_ONAPPLYCOMPLETE_RESULTS
272 +{
273 + DWORD cbSize;
274 + BOOTSTRAPPER_APPLYCOMPLETE_ACTION action;
275 +};
276 +
277 +struct BA_ONCACHEACQUIREBEGIN_ARGS
278 +{
279 + DWORD cbSize;
280 + LPCWSTR wzPackageOrContainerId;
281 + LPCWSTR wzPayloadId;
282 + BOOTSTRAPPER_CACHE_OPERATION operation;
283 + LPCWSTR wzSource;
284 +};
285 +
286 +struct BA_ONCACHEACQUIREBEGIN_RESULTS
287 +{
288 + DWORD cbSize;
289 + BOOL fCancel;
290 +};
291 +
292 +struct BA_ONCACHEACQUIRECOMPLETE_ARGS
293 +{
294 + DWORD cbSize;
295 + LPCWSTR wzPackageOrContainerId;
296 + LPCWSTR wzPayloadId;
297 + HRESULT hrStatus;
298 + BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation;
299 +};
300 +
301 +struct BA_ONCACHEACQUIRECOMPLETE_RESULTS
302 +{
303 + DWORD cbSize;
304 + BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION action;
305 +};
306 +
307 +struct BA_ONCACHEACQUIREPROGRESS_ARGS
308 +{
309 + DWORD cbSize;
310 + LPCWSTR wzPackageOrContainerId;
311 + LPCWSTR wzPayloadId;
312 + DWORD64 dw64Progress;
313 + DWORD64 dw64Total;
314 + DWORD dwOverallPercentage;
315 +};
316 +
317 +struct BA_ONCACHEACQUIREPROGRESS_RESULTS
318 +{
319 + DWORD cbSize;
320 + BOOL fCancel;
321 +};
322 +
323 +struct BA_ONCACHEBEGIN_ARGS
324 +{
325 + DWORD cbSize;
326 +};
327 +
328 +struct BA_ONCACHEBEGIN_RESULTS
329 +{
330 + DWORD cbSize;
331 + BOOL fCancel;
332 +};
333 +
334 +struct BA_ONCACHECOMPLETE_ARGS
335 +{
336 + DWORD cbSize;
337 + HRESULT hrStatus;
338 +};
339 +
340 +struct BA_ONCACHECOMPLETE_RESULTS
341 +{
342 + DWORD cbSize;
343 +};
344 +
345 +struct BA_ONCACHEPACKAGEBEGIN_ARGS
346 +{
347 + DWORD cbSize;
348 + LPCWSTR wzPackageId;
349 + DWORD cCachePayloads;
350 + DWORD64 dw64PackageCacheSize;
351 +};
352 +
353 +struct BA_ONCACHEPACKAGEBEGIN_RESULTS
354 +{
355 + DWORD cbSize;
356 + BOOL fCancel;
357 +};
358 +
359 +struct BA_ONCACHEPACKAGECOMPLETE_ARGS
360 +{
361 + DWORD cbSize;
362 + LPCWSTR wzPackageId;
363 + HRESULT hrStatus;
364 + BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation;
365 +};
366 +
367 +struct BA_ONCACHEPACKAGECOMPLETE_RESULTS
368 +{
369 + DWORD cbSize;
370 + BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action;
371 +};
372 +
373 +struct BA_ONCACHEVERIFYBEGIN_ARGS
374 +{
375 + DWORD cbSize;
376 + LPCWSTR wzPackageOrContainerId;
377 + LPCWSTR wzPayloadId;
378 +};
379 +
380 +struct BA_ONCACHEVERIFYBEGIN_RESULTS
381 +{
382 + DWORD cbSize;
383 + BOOL fCancel;
384 +};
385 +
386 +struct BA_ONCACHEVERIFYCOMPLETE_ARGS
387 +{
388 + DWORD cbSize;
389 + LPCWSTR wzPackageOrContainerId;
390 + LPCWSTR wzPayloadId;
391 + HRESULT hrStatus;
392 + BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation;
393 +};
394 +
395 +struct BA_ONCACHEVERIFYCOMPLETE_RESULTS
396 +{
397 + DWORD cbSize;
398 + BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action;
399 +};
400 +
401 +struct BA_ONDETECTBEGIN_ARGS
402 +{
403 + DWORD cbSize;
404 + BOOL fInstalled;
405 + DWORD cPackages;
406 +};
407 +
408 +struct BA_ONDETECTBEGIN_RESULTS
409 +{
410 + DWORD cbSize;
411 + BOOL fCancel;
412 +};
413 +
414 +struct BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS
415 +{
416 + DWORD cbSize;
417 + LPCWSTR wzPackageId;
418 + LPCWSTR wzCompatiblePackageId;
419 + DWORD64 dw64CompatiblePackageVersion;
420 +};
421 +
422 +struct BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS
423 +{
424 + DWORD cbSize;
425 + BOOL fCancel;
426 +};
427 +
428 +struct BA_ONDETECTCOMPLETE_ARGS
429 +{
430 + DWORD cbSize;
431 + HRESULT hrStatus;
432 +};
433 +
434 +struct BA_ONDETECTCOMPLETE_RESULTS
435 +{
436 + DWORD cbSize;
437 +};
438 +
439 +struct BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS
440 +{
441 + DWORD cbSize;
442 + LPCWSTR wzBundleId;
443 + BOOTSTRAPPER_RELATION_TYPE relationType;
444 + LPCWSTR wzBundleTag;
445 + BOOL fPerMachine;
446 + DWORD64 dw64Version;
447 +};
448 +
449 +struct BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS
450 +{
451 + DWORD cbSize;
452 + BOOL fCancel;
453 + BOOL fIgnoreBundle;
454 +};
455 +
456 +struct BA_ONDETECTMSIFEATURE_ARGS
457 +{
458 + DWORD cbSize;
459 + LPCWSTR wzPackageId;
460 + LPCWSTR wzFeatureId;
461 + BOOTSTRAPPER_FEATURE_STATE state;
462 +};
463 +
464 +struct BA_ONDETECTMSIFEATURE_RESULTS
465 +{
466 + DWORD cbSize;
467 + BOOL fCancel;
468 +};
469 +
470 +struct BA_ONDETECTPACKAGEBEGIN_ARGS
471 +{
472 + DWORD cbSize;
473 + LPCWSTR wzPackageId;
474 +};
475 +
476 +struct BA_ONDETECTPACKAGEBEGIN_RESULTS
477 +{
478 + DWORD cbSize;
479 + BOOL fCancel;
480 +};
481 +
482 +struct BA_ONDETECTPACKAGECOMPLETE_ARGS
483 +{
484 + DWORD cbSize;
485 + LPCWSTR wzPackageId;
486 + HRESULT hrStatus;
487 + BOOTSTRAPPER_PACKAGE_STATE state;
488 +};
489 +
490 +struct BA_ONDETECTPACKAGECOMPLETE_RESULTS
491 +{
492 + DWORD cbSize;
493 +};
494 +
495 +struct BA_ONDETECTRELATEDBUNDLE_ARGS
496 +{
497 + DWORD cbSize;
498 + LPCWSTR wzBundleId;
499 + BOOTSTRAPPER_RELATION_TYPE relationType;
500 + LPCWSTR wzBundleTag;
501 + BOOL fPerMachine;
502 + DWORD64 dw64Version;
503 + BOOTSTRAPPER_RELATED_OPERATION operation;
504 +};
505 +
506 +struct BA_ONDETECTRELATEDBUNDLE_RESULTS
507 +{
508 + DWORD cbSize;
509 + BOOL fCancel;
510 +};
511 +
512 +struct BA_ONDETECTRELATEDMSIPACKAGE_ARGS
513 +{
514 + DWORD cbSize;
515 + LPCWSTR wzPackageId;
516 + LPCWSTR wzUpgradeCode;
517 + LPCWSTR wzProductCode;
518 + BOOL fPerMachine;
519 + DWORD64 dw64Version;
520 + BOOTSTRAPPER_RELATED_OPERATION operation;
521 +};
522 +
523 +struct BA_ONDETECTRELATEDMSIPACKAGE_RESULTS
524 +{
525 + DWORD cbSize;
526 + BOOL fCancel;
527 +};
528 +
529 +struct BA_ONDETECTTARGETMSIPACKAGE_ARGS
530 +{
531 + DWORD cbSize;
532 + LPCWSTR wzPackageId;
533 + LPCWSTR wzProductCode;
534 + BOOTSTRAPPER_PACKAGE_STATE patchState;
535 +};
536 +
537 +struct BA_ONDETECTTARGETMSIPACKAGE_RESULTS
538 +{
539 + DWORD cbSize;
540 + BOOL fCancel;
541 +};
542 +
543 +struct BA_ONDETECTUPDATE_ARGS
544 +{
545 + DWORD cbSize;
546 + LPCWSTR wzUpdateLocation;
547 + DWORD64 dw64Size;
548 + DWORD64 dw64Version;
549 + LPCWSTR wzTitle;
550 + LPCWSTR wzSummary;
551 + LPCWSTR wzContentType;
552 + LPCWSTR wzContent;
553 +};
554 +
555 +struct BA_ONDETECTUPDATE_RESULTS
556 +{
557 + DWORD cbSize;
558 + BOOL fCancel;
559 + BOOL fStopProcessingUpdates;
560 +};
561 +
562 +struct BA_ONDETECTUPDATEBEGIN_ARGS
563 +{
564 + DWORD cbSize;
565 + LPCWSTR wzUpdateLocation;
566 +};
567 +
568 +struct BA_ONDETECTUPDATEBEGIN_RESULTS
569 +{
570 + DWORD cbSize;
571 + BOOL fCancel;
572 + BOOL fSkip;
573 +};
574 +
575 +struct BA_ONDETECTUPDATECOMPLETE_ARGS
576 +{
577 + DWORD cbSize;
578 + HRESULT hrStatus;
579 +};
580 +
581 +struct BA_ONDETECTUPDATECOMPLETE_RESULTS
582 +{
583 + DWORD cbSize;
584 + BOOL fIgnoreError;
585 +};
586 +
587 +struct BA_ONELEVATEBEGIN_ARGS
588 +{
589 + DWORD cbSize;
590 +};
591 +
592 +struct BA_ONELEVATEBEGIN_RESULTS
593 +{
594 + DWORD cbSize;
595 + BOOL fCancel;
596 +};
597 +
598 +struct BA_ONELEVATECOMPLETE_ARGS
599 +{
600 + DWORD cbSize;
601 + HRESULT hrStatus;
602 +};
603 +
604 +struct BA_ONELEVATECOMPLETE_RESULTS
605 +{
606 + DWORD cbSize;
607 +};
608 +
609 +struct BA_ONERROR_ARGS
610 +{
611 + DWORD cbSize;
612 + BOOTSTRAPPER_ERROR_TYPE errorType;
613 + LPCWSTR wzPackageId;
614 + DWORD dwCode;
615 + LPCWSTR wzError;
616 + DWORD dwUIHint;
617 + DWORD cData;
618 + LPCWSTR* rgwzData;
619 + int nRecommendation;
620 +};
621 +
622 +struct BA_ONERROR_RESULTS
623 +{
624 + DWORD cbSize;
625 + int nResult;
626 +};
627 +
628 +struct BA_ONEXECUTEBEGIN_ARGS
629 +{
630 + DWORD cbSize;
631 + DWORD cExecutingPackages;
632 +};
633 +
634 +struct BA_ONEXECUTEBEGIN_RESULTS
635 +{
636 + DWORD cbSize;
637 + BOOL fCancel;
638 +};
639 +
640 +struct BA_ONEXECUTECOMPLETE_ARGS
641 +{
642 + DWORD cbSize;
643 + HRESULT hrStatus;
644 +};
645 +
646 +struct BA_ONEXECUTECOMPLETE_RESULTS
647 +{
648 + DWORD cbSize;
649 +};
650 +
651 +struct BA_ONEXECUTEFILESINUSE_ARGS
652 +{
653 + DWORD cbSize;
654 + LPCWSTR wzPackageId;
655 + DWORD cFiles;
656 + LPCWSTR* rgwzFiles;
657 + int nRecommendation;
658 +};
659 +
660 +struct BA_ONEXECUTEFILESINUSE_RESULTS
661 +{
662 + DWORD cbSize;
663 + int nResult;
664 +};
665 +
666 +struct BA_ONEXECUTEMSIMESSAGE_ARGS
667 +{
668 + DWORD cbSize;
669 + LPCWSTR wzPackageId;
670 + INSTALLMESSAGE messageType;
671 + DWORD dwUIHint;
672 + LPCWSTR wzMessage;
673 + DWORD cData;
674 + LPCWSTR* rgwzData;
675 + int nRecommendation;
676 +};
677 +
678 +struct BA_ONEXECUTEMSIMESSAGE_RESULTS
679 +{
680 + DWORD cbSize;
681 + int nResult;
682 +};
683 +
684 +struct BA_ONEXECUTEPACKAGEBEGIN_ARGS
685 +{
686 + DWORD cbSize;
687 + LPCWSTR wzPackageId;
688 + BOOL fExecute; // false means rollback.
689 + BOOTSTRAPPER_ACTION_STATE action;
690 + INSTALLUILEVEL uiLevel;
691 + BOOL fDisableExternalUiHandler;
692 +};
693 +
694 +struct BA_ONEXECUTEPACKAGEBEGIN_RESULTS
695 +{
696 + DWORD cbSize;
697 + BOOL fCancel;
698 +};
699 +
700 +struct BA_ONEXECUTEPACKAGECOMPLETE_ARGS
701 +{
702 + DWORD cbSize;
703 + LPCWSTR wzPackageId;
704 + HRESULT hrStatus;
705 + // Indicates whether this package requires a reboot or initiated the reboot already.
706 + BOOTSTRAPPER_APPLY_RESTART restart;
707 + BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation;
708 +};
709 +
710 +struct BA_ONEXECUTEPACKAGECOMPLETE_RESULTS
711 +{
712 + DWORD cbSize;
713 + BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION action;
714 +};
715 +
716 +struct BA_ONEXECUTEPATCHTARGET_ARGS
717 +{
718 + DWORD cbSize;
719 + LPCWSTR wzPackageId;
720 + LPCWSTR wzTargetProductCode;
721 +};
722 +
723 +struct BA_ONEXECUTEPATCHTARGET_RESULTS
724 +{
725 + DWORD cbSize;
726 + BOOL fCancel;
727 +};
728 +
729 +struct BA_ONEXECUTEPROGRESS_ARGS
730 +{
731 + DWORD cbSize;
732 + LPCWSTR wzPackageId;
733 + DWORD dwProgressPercentage;
734 + DWORD dwOverallPercentage;
735 +};
736 +
737 +struct BA_ONEXECUTEPROGRESS_RESULTS
738 +{
739 + DWORD cbSize;
740 + BOOL fCancel;
741 +};
742 +
743 +struct BA_ONLAUNCHAPPROVEDEXEBEGIN_ARGS
744 +{
745 + DWORD cbSize;
746 +};
747 +
748 +struct BA_ONLAUNCHAPPROVEDEXEBEGIN_RESULTS
749 +{
750 + DWORD cbSize;
751 + BOOL fCancel;
752 +};
753 +
754 +struct BA_ONLAUNCHAPPROVEDEXECOMPLETE_ARGS
755 +{
756 + DWORD cbSize;
757 + HRESULT hrStatus;
758 + // Only valid if the operation succeeded.
759 + DWORD dwProcessId;
760 +};
761 +
762 +struct BA_ONLAUNCHAPPROVEDEXECOMPLETE_RESULTS
763 +{
764 + DWORD cbSize;
765 +};
766 +
767 +struct BA_ONPLANBEGIN_ARGS
768 +{
769 + DWORD cbSize;
770 + DWORD cPackages;
771 +};
772 +
773 +struct BA_ONPLANBEGIN_RESULTS
774 +{
775 + DWORD cbSize;
776 + BOOL fCancel;
777 +};
778 +
779 +struct BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_ARGS
780 +{
781 + DWORD cbSize;
782 + LPCWSTR wzPackageId;
783 + LPCWSTR wzCompatiblePackageId;
784 + DWORD64 dw64CompatiblePackageVersion;
785 + BOOTSTRAPPER_REQUEST_STATE recommendedState;
786 +};
787 +
788 +struct BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_RESULTS
789 +{
790 + DWORD cbSize;
791 + BOOL fCancel;
792 + BOOTSTRAPPER_REQUEST_STATE requestedState;
793 +};
794 +
795 +struct BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_ARGS
796 +{
797 + DWORD cbSize;
798 + LPCWSTR wzPackageId;
799 + LPCWSTR wzCompatiblePackageId;
800 + HRESULT hrStatus;
801 + BOOTSTRAPPER_PACKAGE_STATE state;
802 + BOOTSTRAPPER_REQUEST_STATE requested;
803 + BOOTSTRAPPER_ACTION_STATE execute;
804 + BOOTSTRAPPER_ACTION_STATE rollback;
805 +};
806 +
807 +struct BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_RESULTS
808 +{
809 + DWORD cbSize;
810 +};
811 +
812 +struct BA_ONPLANCOMPLETE_ARGS
813 +{
814 + DWORD cbSize;
815 + HRESULT hrStatus;
816 +};
817 +
818 +struct BA_ONPLANCOMPLETE_RESULTS
819 +{
820 + DWORD cbSize;
821 +};
822 +
823 +struct BA_ONPLANMSIFEATURE_ARGS
824 +{
825 + DWORD cbSize;
826 + LPCWSTR wzPackageId;
827 + LPCWSTR wzFeatureId;
828 + BOOTSTRAPPER_FEATURE_STATE recommendedState;
829 +};
830 +
831 +struct BA_ONPLANMSIFEATURE_RESULTS
832 +{
833 + DWORD cbSize;
834 + BOOTSTRAPPER_FEATURE_STATE requestedState;
835 + BOOL fCancel;
836 +};
837 +
838 +struct BA_ONPLANMSIPACKAGE_ARGS
839 +{
840 + DWORD cbSize;
841 + LPCWSTR wzPackageId;
842 + BOOL fExecute; // false means rollback.
843 + BOOTSTRAPPER_ACTION_STATE action;
844 +};
845 +
846 +struct BA_ONPLANMSIPACKAGE_RESULTS
847 +{
848 + DWORD cbSize;
849 + BOOL fCancel;
850 + BURN_MSI_PROPERTY actionMsiProperty;
851 + INSTALLUILEVEL uiLevel;
852 + BOOL fDisableExternalUiHandler;
853 +};
854 +
855 +struct BA_ONPLANPACKAGEBEGIN_ARGS
856 +{
857 + DWORD cbSize;
858 + LPCWSTR wzPackageId;
859 + BOOTSTRAPPER_REQUEST_STATE recommendedState;
860 +};
861 +
862 +struct BA_ONPLANPACKAGEBEGIN_RESULTS
863 +{
864 + DWORD cbSize;
865 + BOOL fCancel;
866 + BOOTSTRAPPER_REQUEST_STATE requestedState;
867 +};
868 +
869 +struct BA_ONPLANPACKAGECOMPLETE_ARGS
870 +{
871 + DWORD cbSize;
872 + LPCWSTR wzPackageId;
873 + HRESULT hrStatus;
874 + BOOTSTRAPPER_PACKAGE_STATE state;
875 + BOOTSTRAPPER_REQUEST_STATE requested;
876 + BOOTSTRAPPER_ACTION_STATE execute;
877 + BOOTSTRAPPER_ACTION_STATE rollback;
878 +};
879 +
880 +struct BA_ONPLANPACKAGECOMPLETE_RESULTS
881 +{
882 + DWORD cbSize;
883 +};
884 +
885 +struct BA_ONPLANRELATEDBUNDLE_ARGS
886 +{
887 + DWORD cbSize;
888 + LPCWSTR wzBundleId;
889 + BOOTSTRAPPER_REQUEST_STATE recommendedState;
890 +};
891 +
892 +struct BA_ONPLANRELATEDBUNDLE_RESULTS
893 +{
894 + DWORD cbSize;
895 + BOOL fCancel;
896 + BOOTSTRAPPER_REQUEST_STATE requestedState;
897 +};
898 +
899 +struct BA_ONPLANTARGETMSIPACKAGE_ARGS
900 +{
901 + DWORD cbSize;
902 + LPCWSTR wzPackageId;
903 + LPCWSTR wzProductCode;
904 + BOOTSTRAPPER_REQUEST_STATE recommendedState;
905 +};
906 +
907 +struct BA_ONPLANTARGETMSIPACKAGE_RESULTS
908 +{
909 + DWORD cbSize;
910 + BOOTSTRAPPER_REQUEST_STATE requestedState;
911 + BOOL fCancel;
912 +};
913 +
914 +struct BA_ONPROGRESS_ARGS
915 +{
916 + DWORD cbSize;
917 + DWORD dwProgressPercentage;
918 + DWORD dwOverallPercentage;
919 +};
920 +
921 +struct BA_ONPROGRESS_RESULTS
922 +{
923 + DWORD cbSize;
924 + BOOL fCancel;
925 +};
926 +
927 +struct BA_ONREGISTERBEGIN_ARGS
928 +{
929 + DWORD cbSize;
930 +};
931 +
932 +struct BA_ONREGISTERBEGIN_RESULTS
933 +{
934 + DWORD cbSize;
935 + BOOL fCancel;
936 +};
937 +
938 +struct BA_ONREGISTERCOMPLETE_ARGS
939 +{
940 + DWORD cbSize;
941 + HRESULT hrStatus;
942 +};
943 +
944 +struct BA_ONREGISTERCOMPLETE_RESULTS
945 +{
946 + DWORD cbSize;
947 +};
948 +
949 +struct BA_ONRESOLVESOURCE_ARGS
950 +{
951 + DWORD cbSize;
952 + LPCWSTR wzPackageOrContainerId;
953 + LPCWSTR wzPayloadId;
954 + LPCWSTR wzLocalSource;
955 + LPCWSTR wzDownloadSource;
956 + BOOTSTRAPPER_RESOLVESOURCE_ACTION recommendation;
957 +};
958 +
959 +struct BA_ONRESOLVESOURCE_RESULTS
960 +{
961 + DWORD cbSize;
962 + BOOTSTRAPPER_RESOLVESOURCE_ACTION action;
963 + BOOL fCancel;
964 +};
965 +
966 +struct BA_ONSHUTDOWN_ARGS
967 +{
968 + DWORD cbSize;
969 +};
970 +
971 +struct BA_ONSHUTDOWN_RESULTS
972 +{
973 + DWORD cbSize;
974 + BOOTSTRAPPER_SHUTDOWN_ACTION action;
975 +};
976 +
977 +struct BA_ONSTARTUP_ARGS
978 +{
979 + DWORD cbSize;
980 +};
981 +
982 +struct BA_ONSTARTUP_RESULTS
983 +{
984 + DWORD cbSize;
985 +};
986 +
987 +struct BA_ONSYSTEMSHUTDOWN_ARGS
988 +{
989 + DWORD cbSize;
990 + DWORD dwEndSession;
991 +};
992 +
993 +struct BA_ONSYSTEMSHUTDOWN_RESULTS
994 +{
995 + DWORD cbSize;
996 + BOOL fCancel;
997 +};
998 +
999 +struct BA_ONUNREGISTERBEGIN_ARGS
1000 +{
1001 + DWORD cbSize;
1002 +};
1003 +
1004 +struct BA_ONUNREGISTERBEGIN_RESULTS
1005 +{
1006 + DWORD cbSize;
1007 + BOOL fCancel;
1008 +};
1009 +
1010 +struct BA_ONUNREGISTERCOMPLETE_ARGS
1011 +{
1012 + DWORD cbSize;
1013 + HRESULT hrStatus;
1014 +};
1015 +
1016 +struct BA_ONUNREGISTERCOMPLETE_RESULTS
1017 +{
1018 + DWORD cbSize;
1019 +};
1020 +
1021 +
1022 +
1023 +extern "C" typedef HRESULT(WINAPI *PFN_BOOTSTRAPPER_APPLICATION_PROC)(
1024 + __in BOOTSTRAPPER_APPLICATION_MESSAGE message,
1025 + __in const LPVOID pvArgs,
1026 + __inout LPVOID pvResults,
1027 + __in_opt LPVOID pvContext
1028 + );
1029 +
1030 +extern "C" typedef void (WINAPI *PFN_BOOTSTRAPPER_APPLICATION_DESTROY)();
1031 +
1032 +
1033 +
1034 +struct BOOTSTRAPPER_CREATE_ARGS
1035 +{
1036 + DWORD cbSize;
1037 + DWORD64 qwEngineAPIVersion;
1038 + PFN_BOOTSTRAPPER_ENGINE_PROC pfnBootstrapperEngineProc;
1039 + LPVOID pvBootstrapperEngineProcContext;
1040 + BOOTSTRAPPER_COMMAND* pCommand;
1041 +};
1042 +
1043 +struct BOOTSTRAPPER_CREATE_RESULTS
1044 +{
1045 + DWORD cbSize;
1046 + PFN_BOOTSTRAPPER_APPLICATION_PROC pfnBootstrapperApplicationProc;
1047 + LPVOID pvBootstrapperApplicationProcContext;
1048 + BOOL fDisableUnloading; // indicates the BA dll must not be unloaded after BootstrapperApplicationDestroy.
1049 +};
1050 +
1051 +extern "C" typedef HRESULT(WINAPI *PFN_BOOTSTRAPPER_APPLICATION_CREATE)(
1052 + __in const BOOTSTRAPPER_CREATE_ARGS* pArgs,
1053 + __inout BOOTSTRAPPER_CREATE_RESULTS* pResults
1054 + );
src/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h new
+430
@@ -0,0 +1,430 @@
1 +#pragma once
2 +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3 +
4 +
5 +#if defined(__cplusplus)
6 +extern "C" {
7 +#endif
8 +
9 +#define IDERROR -1
10 +#define IDNOACTION 0
11 +
12 +#ifndef FACILITY_WIX
13 +#define FACILITY_WIX 500
14 +#endif
15 +
16 +static const HRESULT E_SUSPECTED_AV_INTERFERENCE = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIX, 2000);
17 +
18 +// Note that ordering of the enumeration values is important.
19 +// Some code paths use < or > comparisions and simply reording values will break those comparisons.
20 +enum BOOTSTRAPPER_ACTION
21 +{
22 + BOOTSTRAPPER_ACTION_UNKNOWN,
23 + BOOTSTRAPPER_ACTION_HELP,
24 + BOOTSTRAPPER_ACTION_LAYOUT,
25 + BOOTSTRAPPER_ACTION_UNINSTALL,
26 + BOOTSTRAPPER_ACTION_CACHE,
27 + BOOTSTRAPPER_ACTION_INSTALL,
28 + BOOTSTRAPPER_ACTION_MODIFY,
29 + BOOTSTRAPPER_ACTION_REPAIR,
30 + BOOTSTRAPPER_ACTION_UPDATE_REPLACE,
31 + BOOTSTRAPPER_ACTION_UPDATE_REPLACE_EMBEDDED,
32 +};
33 +
34 +enum BOOTSTRAPPER_ACTION_STATE
35 +{
36 + BOOTSTRAPPER_ACTION_STATE_NONE,
37 + BOOTSTRAPPER_ACTION_STATE_UNINSTALL,
38 + BOOTSTRAPPER_ACTION_STATE_INSTALL,
39 + BOOTSTRAPPER_ACTION_STATE_ADMIN_INSTALL,
40 + BOOTSTRAPPER_ACTION_STATE_MODIFY,
41 + BOOTSTRAPPER_ACTION_STATE_REPAIR,
42 + BOOTSTRAPPER_ACTION_STATE_MINOR_UPGRADE,
43 + BOOTSTRAPPER_ACTION_STATE_MAJOR_UPGRADE,
44 + BOOTSTRAPPER_ACTION_STATE_PATCH,
45 +};
46 +
47 +enum BOOTSTRAPPER_PACKAGE_STATE
48 +{
49 + BOOTSTRAPPER_PACKAGE_STATE_UNKNOWN,
50 + BOOTSTRAPPER_PACKAGE_STATE_OBSOLETE,
51 + BOOTSTRAPPER_PACKAGE_STATE_ABSENT,
52 + BOOTSTRAPPER_PACKAGE_STATE_CACHED,
53 + BOOTSTRAPPER_PACKAGE_STATE_PRESENT,
54 + BOOTSTRAPPER_PACKAGE_STATE_SUPERSEDED,
55 +};
56 +
57 +enum BOOTSTRAPPER_REQUEST_STATE
58 +{
59 + BOOTSTRAPPER_REQUEST_STATE_NONE,
60 + BOOTSTRAPPER_REQUEST_STATE_FORCE_ABSENT,
61 + BOOTSTRAPPER_REQUEST_STATE_ABSENT,
62 + BOOTSTRAPPER_REQUEST_STATE_CACHE,
63 + BOOTSTRAPPER_REQUEST_STATE_PRESENT,
64 + BOOTSTRAPPER_REQUEST_STATE_REPAIR,
65 +};
66 +
67 +enum BOOTSTRAPPER_FEATURE_STATE
68 +{
69 + BOOTSTRAPPER_FEATURE_STATE_UNKNOWN,
70 + BOOTSTRAPPER_FEATURE_STATE_ABSENT,
71 + BOOTSTRAPPER_FEATURE_STATE_ADVERTISED,
72 + BOOTSTRAPPER_FEATURE_STATE_LOCAL,
73 + BOOTSTRAPPER_FEATURE_STATE_SOURCE,
74 +};
75 +
76 +enum BOOTSTRAPPER_FEATURE_ACTION
77 +{
78 + BOOTSTRAPPER_FEATURE_ACTION_NONE,
79 + BOOTSTRAPPER_FEATURE_ACTION_ADDLOCAL,
80 + BOOTSTRAPPER_FEATURE_ACTION_ADDSOURCE,
81 + BOOTSTRAPPER_FEATURE_ACTION_ADDDEFAULT,
82 + BOOTSTRAPPER_FEATURE_ACTION_REINSTALL,
83 + BOOTSTRAPPER_FEATURE_ACTION_ADVERTISE,
84 + BOOTSTRAPPER_FEATURE_ACTION_REMOVE,
85 +};
86 +
87 +enum BOOTSTRAPPER_LOG_LEVEL
88 +{
89 + BOOTSTRAPPER_LOG_LEVEL_NONE, // turns off report (only valid for XXXSetLevel())
90 + BOOTSTRAPPER_LOG_LEVEL_STANDARD, // written if reporting is on
91 + BOOTSTRAPPER_LOG_LEVEL_VERBOSE, // written only if verbose reporting is on
92 + BOOTSTRAPPER_LOG_LEVEL_DEBUG, // reporting useful when debugging code
93 + BOOTSTRAPPER_LOG_LEVEL_ERROR, // always gets reported, but can never be specified
94 +};
95 +
96 +enum BOOTSTRAPPER_UPDATE_HASH_TYPE
97 +{
98 + BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE,
99 + BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA1,
100 +};
101 +
102 +enum BOOTSTRAPPER_ENGINE_MESSAGE
103 +{
104 + BOOTSTRAPPER_ENGINE_MESSAGE_GETPACKAGECOUNT,
105 + BOOTSTRAPPER_ENGINE_MESSAGE_GETVARIABLENUMERIC,
106 + BOOTSTRAPPER_ENGINE_MESSAGE_GETVARIABLESTRING,
107 + BOOTSTRAPPER_ENGINE_MESSAGE_GETVARIABLEVERSION,
108 + BOOTSTRAPPER_ENGINE_MESSAGE_FORMATSTRING,
109 + BOOTSTRAPPER_ENGINE_MESSAGE_ESCAPESTRING,
110 + BOOTSTRAPPER_ENGINE_MESSAGE_EVALUATECONDITION,
111 + BOOTSTRAPPER_ENGINE_MESSAGE_LOG,
112 + BOOTSTRAPPER_ENGINE_MESSAGE_SENDEMBEDDEDERROR,
113 + BOOTSTRAPPER_ENGINE_MESSAGE_SENDEMBEDDEDPROGRESS,
114 + BOOTSTRAPPER_ENGINE_MESSAGE_SETUPDATE,
115 + BOOTSTRAPPER_ENGINE_MESSAGE_SETLOCALSOURCE,
116 + BOOTSTRAPPER_ENGINE_MESSAGE_SETDOWNLOADSOURCE,
117 + BOOTSTRAPPER_ENGINE_MESSAGE_SETVARIABLENUMERIC,
118 + BOOTSTRAPPER_ENGINE_MESSAGE_SETVARIABLESTRING,
119 + BOOTSTRAPPER_ENGINE_MESSAGE_SETVARIABLEVERSION,
120 + BOOTSTRAPPER_ENGINE_MESSAGE_CLOSESPLASHSCREEN,
121 + BOOTSTRAPPER_ENGINE_MESSAGE_DETECT,
122 + BOOTSTRAPPER_ENGINE_MESSAGE_PLAN,
123 + BOOTSTRAPPER_ENGINE_MESSAGE_ELEVATE,
124 + BOOTSTRAPPER_ENGINE_MESSAGE_APPLY,
125 + BOOTSTRAPPER_ENGINE_MESSAGE_QUIT,
126 + BOOTSTRAPPER_ENGINE_MESSAGE_LAUNCHAPPROVEDEXE,
127 +};
128 +
129 +typedef struct _BAENGINE_APPLY_ARGS
130 +{
131 + DWORD cbSize;
132 + HWND hwndParent;
133 +} BAENGINE_APPLY_ARGS;
134 +
135 +typedef struct _BAENGINE_APPLY_RESULTS
136 +{
137 + DWORD cbSize;
138 +} BAENGINE_APPLY_RESULTS;
139 +
140 +typedef struct _BAENGINE_CLOSESPLASHSCREEN_ARGS
141 +{
142 + DWORD cbSize;
143 +} BAENGINE_CLOSESPLASHSCREEN_ARGS;
144 +
145 +typedef struct _BAENGINE_CLOSESPLASHSCREEN_RESULTS
146 +{
147 + DWORD cbSize;
148 +} BAENGINE_CLOSESPLASHSCREEN_RESULTS;
149 +
150 +typedef struct _BAENGINE_DETECT_ARGS
151 +{
152 + DWORD cbSize;
153 + HWND hwndParent;
154 +} BAENGINE_DETECT_ARGS;
155 +
156 +typedef struct _BAENGINE_DETECT_RESULTS
157 +{
158 + DWORD cbSize;
159 +} BAENGINE_DETECT_RESULTS;
160 +
161 +typedef struct _BAENGINE_ELEVATE_ARGS
162 +{
163 + DWORD cbSize;
164 + HWND hwndParent;
165 +} BAENGINE_ELEVATE_ARGS;
166 +
167 +typedef struct _BAENGINE_ELEVATE_RESULTS
168 +{
169 + DWORD cbSize;
170 +} BAENGINE_ELEVATE_RESULTS;
171 +
172 +typedef struct _BAENGINE_ESCAPESTRING_ARGS
173 +{
174 + DWORD cbSize;
175 + LPCWSTR wzIn;
176 +} BAENGINE_ESCAPESTRING_ARGS;
177 +
178 +typedef struct _BAENGINE_ESCAPESTRING_RESULTS
179 +{
180 + DWORD cbSize;
181 + LPWSTR wzOut;
182 + // Should be initialized to the size of wzOut.
183 + DWORD cchOut;
184 +} BAENGINE_ESCAPESTRING_RESULTS;
185 +
186 +typedef struct _BAENGINE_EVALUATECONDITION_ARGS
187 +{
188 + DWORD cbSize;
189 + LPCWSTR wzCondition;
190 +} BAENGINE_EVALUATECONDITION_ARGS;
191 +
192 +typedef struct _BAENGINE_EVALUATECONDITION_RESULTS
193 +{
194 + DWORD cbSize;
195 + BOOL f;
196 +} BAENGINE_EVALUATECONDITION_RESULTS;
197 +
198 +typedef struct _BAENGINE_FORMATSTRING_ARGS
199 +{
200 + DWORD cbSize;
201 + LPCWSTR wzIn;
202 +} BAENGINE_FORMATSTRING_ARGS;
203 +
204 +typedef struct _BAENGINE_FORMATSTRING_RESULTS
205 +{
206 + DWORD cbSize;
207 + // The contents of wzOut may be sensitive, should keep encrypted and SecureZeroFree.
208 + LPWSTR wzOut;
209 + // Should be initialized to the size of wzOut.
210 + DWORD cchOut;
211 +} BAENGINE_FORMATSTRING_RESULTS;
212 +
213 +typedef struct _BAENGINE_GETPACKAGECOUNT_ARGS
214 +{
215 + DWORD cbSize;
216 +} BAENGINE_GETPACKAGECOUNT_ARGS;
217 +
218 +typedef struct _BAENGINE_GETPACKAGECOUNT_RESULTS
219 +{
220 + DWORD cbSize;
221 + DWORD cPackages;
222 +} BAENGINE_GETPACKAGECOUNT_RESULTS;
223 +
224 +typedef struct _BAENGINE_GETVARIABLENUMERIC_ARGS
225 +{
226 + DWORD cbSize;
227 + LPCWSTR wzVariable;
228 +} BAENGINE_GETVARIABLENUMERIC_ARGS;
229 +
230 +typedef struct _BAENGINE_GETVARIABLENUMERIC_RESULTS
231 +{
232 + DWORD cbSize;
233 + // The contents of llValue may be sensitive, if variable is hidden should keep value encrypted and SecureZeroMemory.
234 + LONGLONG llValue;
235 +} BAENGINE_GETVARIABLENUMERIC_RESULTS;
236 +
237 +typedef struct _BAENGINE_GETVARIABLESTRING_ARGS
238 +{
239 + DWORD cbSize;
240 + LPCWSTR wzVariable;
241 +} BAENGINE_GETVARIABLESTRING_ARGS;
242 +
243 +typedef struct _BAENGINE_GETVARIABLESTRING_RESULTS
244 +{
245 + DWORD cbSize;
246 + // The contents of wzValue may be sensitive, if variable is hidden should keep value encrypted and SecureZeroFree.
247 + LPWSTR wzValue;
248 + // Should be initialized to the size of wzValue.
249 + DWORD cchValue;
250 +} BAENGINE_GETVARIABLESTRING_RESULTS;
251 +
252 +typedef struct _BAENGINE_GETVARIABLEVERSION_ARGS
253 +{
254 + DWORD cbSize;
255 + LPCWSTR wzVariable;
256 +} BAENGINE_GETVARIABLEVERSION_ARGS;
257 +
258 +typedef struct _BAENGINE_GETVARIABLEVERSION_RESULTS
259 +{
260 + DWORD cbSize;
261 + // The contents of qwValue may be sensitive, if variable is hidden should keep value encrypted and SecureZeroMemory.
262 + DWORD64 qwValue;
263 +} BAENGINE_GETVARIABLEVERSION_RESULTS;
264 +
265 +typedef struct _BAENGINE_LAUNCHAPPROVEDEXE_ARGS
266 +{
267 + DWORD cbSize;
268 + HWND hwndParent;
269 + LPCWSTR wzApprovedExeForElevationId;
270 + LPCWSTR wzArguments;
271 + DWORD dwWaitForInputIdleTimeout;
272 +} BAENGINE_LAUNCHAPPROVEDEXE_ARGS;
273 +
274 +typedef struct _BAENGINE_LAUNCHAPPROVEDEXE_RESULTS
275 +{
276 + DWORD cbSize;
277 +} BAENGINE_LAUNCHAPPROVEDEXE_RESULTS;
278 +
279 +typedef struct _BAENGINE_LOG_ARGS
280 +{
281 + DWORD cbSize;
282 + BOOTSTRAPPER_LOG_LEVEL level;
283 + LPCWSTR wzMessage;
284 +} BAENGINE_LOG_ARGS;
285 +
286 +typedef struct _BAENGINE_LOG_RESULTS
287 +{
288 + DWORD cbSize;
289 +} BAENGINE_LOG_RESULTS;
290 +
291 +typedef struct _BAENGINE_PLAN_ARGS
292 +{
293 + DWORD cbSize;
294 + BOOTSTRAPPER_ACTION action;
295 +} BAENGINE_PLAN_ARGS;
296 +
297 +typedef struct _BAENGINE_PLAN_RESULTS
298 +{
299 + DWORD cbSize;
300 +} BAENGINE_PLAN_RESULTS;
301 +
302 +typedef struct _BAENGINE_QUIT_ARGS
303 +{
304 + DWORD cbSize;
305 + DWORD dwExitCode;
306 +} BAENGINE_QUIT_ARGS;
307 +
308 +typedef struct _BAENGINE_QUIT_RESULTS
309 +{
310 + DWORD cbSize;
311 +} BAENGINE_QUIT_RESULTS;
312 +
313 +typedef struct _BAENGINE_SENDEMBEDDEDERROR_ARGS
314 +{
315 + DWORD cbSize;
316 + DWORD dwErrorCode;
317 + LPCWSTR wzMessage;
318 + DWORD dwUIHint;
319 +} BAENGINE_SENDEMBEDDEDERROR_ARGS;
320 +
321 +typedef struct _BAENGINE_SENDEMBEDDEDERROR_RESULTS
322 +{
323 + DWORD cbSize;
324 + int nResult;
325 +} BAENGINE_SENDEMBEDDEDERROR_RESULTS;
326 +
327 +typedef struct _BAENGINE_SENDEMBEDDEDPROGRESS_ARGS
328 +{
329 + DWORD cbSize;
330 + DWORD dwProgressPercentage;
331 + DWORD dwOverallProgressPercentage;
332 +} BAENGINE_SENDEMBEDDEDPROGRESS_ARGS;
333 +
334 +typedef struct _BAENGINE_SENDEMBEDDEDPROGRESS_RESULTS
335 +{
336 + DWORD cbSize;
337 + int nResult;
338 +} BAENGINE_SENDEMBEDDEDPROGRESS_RESULTS;
339 +
340 +typedef struct _BAENGINE_SETDOWNLOADSOURCE_ARGS
341 +{
342 + DWORD cbSize;
343 + LPCWSTR wzPackageOrContainerId;
344 + LPCWSTR wzPayloadId;
345 + LPCWSTR wzUrl;
346 + LPCWSTR wzUser;
347 + LPCWSTR wzPassword;
348 +} BAENGINE_SETDOWNLOADSOURCE_ARGS;
349 +
350 +typedef struct _BAENGINE_SETDOWNLOADSOURCE_RESULTS
351 +{
352 + DWORD cbSize;
353 +} BAENGINE_SETDOWNLOADSOURCE_RESULTS;
354 +
355 +typedef struct _BAENGINE_SETLOCALSOURCE_ARGS
356 +{
357 + DWORD cbSize;
358 + LPCWSTR wzPackageOrContainerId;
359 + LPCWSTR wzPayloadId;
360 + LPCWSTR wzPath;
361 +} BAENGINE_SETLOCALSOURCE_ARGS;
362 +
363 +typedef struct _BAENGINE_SETLOCALSOURCE_RESULTS
364 +{
365 + DWORD cbSize;
366 +} BAENGINE_SETLOCALSOURCE_RESULTS;
367 +
368 +typedef struct _BAENGINE_SETUPDATE_ARGS
369 +{
370 + DWORD cbSize;
371 + LPCWSTR wzLocalSource;
372 + LPCWSTR wzDownloadSource;
373 + DWORD64 qwSize;
374 + BOOTSTRAPPER_UPDATE_HASH_TYPE hashType;
375 + BYTE* rgbHash;
376 + DWORD cbHash;
377 +} BAENGINE_SETUPDATE_ARGS;
378 +
379 +typedef struct _BAENGINE_SETUPDATE_RESULTS
380 +{
381 + DWORD cbSize;
382 +} BAENGINE_SETUPDATE_RESULTS;
383 +
384 +typedef struct _BAENGINE_SETVARIABLENUMERIC_ARGS
385 +{
386 + DWORD cbSize;
387 + LPCWSTR wzVariable;
388 + LONGLONG llValue;
389 +} BAENGINE_SETVARIABLENUMERIC_ARGS;
390 +
391 +typedef struct _BAENGINE_SETVARIABLENUMERIC_RESULTS
392 +{
393 + DWORD cbSize;
394 +} BAENGINE_SETVARIABLENUMERIC_RESULTS;
395 +
396 +typedef struct _BAENGINE_SETVARIABLESTRING_ARGS
397 +{
398 + DWORD cbSize;
399 + LPCWSTR wzVariable;
400 + LPCWSTR wzValue;
401 +} BAENGINE_SETVARIABLESTRING_ARGS;
402 +
403 +typedef struct _BAENGINE_SETVARIABLESTRING_RESULTS
404 +{
405 + DWORD cbSize;
406 +} BAENGINE_SETVARIABLESTRING_RESULTS;
407 +
408 +typedef struct _BAENGINE_SETVARIABLEVERSION_ARGS
409 +{
410 + DWORD cbSize;
411 + LPCWSTR wzVariable;
412 + DWORD64 qwValue;
413 +} BAENGINE_SETVARIABLEVERSION_ARGS;
414 +
415 +typedef struct _BAENGINE_SETVARIABLEVERSION_RESULTS
416 +{
417 + DWORD cbSize;
418 +} BAENGINE_SETVARIABLEVERSION_RESULTS;
419 +
420 +
421 +extern "C" typedef HRESULT(WINAPI *PFN_BOOTSTRAPPER_ENGINE_PROC)(
422 + __in BOOTSTRAPPER_ENGINE_MESSAGE message,
423 + __in const LPVOID pvArgs,
424 + __inout LPVOID pvResults,
425 + __in_opt LPVOID pvContext
426 + );
427 +
428 +#if defined(__cplusplus)
429 +}
430 +#endif
src/WixToolset.BootstrapperCore.Native/inc/BundleExtension.h new
+59
@@ -0,0 +1,59 @@
1 +#pragma once
2 +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3 +
4 +
5 +#if defined(__cplusplus)
6 +extern "C" {
7 +#endif
8 +
9 +enum BUNDLE_EXTENSION_MESSAGE
10 +{
11 + BUNDLE_EXTENSION_MESSAGE_SEARCH,
12 +};
13 +
14 +typedef struct _BUNDLE_EXTENSION_SEARCH_ARGS
15 +{
16 + DWORD cbSize;
17 + LPCWSTR wzId;
18 + LPCWSTR wzVariable;
19 +} BUNDLE_EXTENSION_SEARCH_ARGS;
20 +
21 +typedef struct _BUNDLE_EXTENSION_SEARCH_RESULTS
22 +{
23 + DWORD cbSize;
24 +} BUNDLE_EXTENSION_SEARCH_RESULTS;
25 +
26 +extern "C" typedef HRESULT(WINAPI *PFN_BUNDLE_EXTENSION_PROC)(
27 + __in BUNDLE_EXTENSION_MESSAGE message,
28 + __in const LPVOID pvArgs,
29 + __inout LPVOID pvResults,
30 + __in_opt LPVOID pvContext
31 + );
32 +
33 +typedef struct _BUNDLE_EXTENSION_CREATE_ARGS
34 +{
35 + DWORD cbSize;
36 + DWORD64 qwEngineAPIVersion;
37 + PFN_BUNDLE_EXTENSION_ENGINE_PROC pfnBundleExtensionEngineProc;
38 + LPVOID pvBundleExtensionEngineProcContext;
39 + LPCWSTR wzBootstrapperWorkingFolder;
40 + LPCWSTR wzBundleExtensionDataPath;
41 +} BUNDLE_EXTENSION_CREATE_ARGS;
42 +
43 +typedef struct _BUNDLE_EXTENSION_CREATE_RESULTS
44 +{
45 + DWORD cbSize;
46 + PFN_BUNDLE_EXTENSION_PROC pfnBundleExtensionProc;
47 + LPVOID pvBundleExtensionProcContext;
48 +} BUNDLE_EXTENSION_CREATE_RESULTS;
49 +
50 +extern "C" typedef HRESULT(WINAPI *PFN_BUNDLE_EXTENSION_CREATE)(
51 + __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs,
52 + __inout BUNDLE_EXTENSION_CREATE_RESULTS* pResults
53 + );
54 +
55 +extern "C" typedef void (WINAPI *PFN_BUNDLE_EXTENSION_DESTROY)();
56 +
57 +#if defined(__cplusplus)
58 +}
59 +#endif
src/WixToolset.BootstrapperCore.Native/inc/BundleExtensionEngine.h new
+184
@@ -0,0 +1,184 @@
1 +#pragma once
2 +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
3 +
4 +
5 +#if defined(__cplusplus)
6 +extern "C" {
7 +#endif
8 +
9 +enum BUNDLE_EXTENSION_LOG_LEVEL
10 +{
11 + BUNDLE_EXTENSION_LOG_LEVEL_NONE, // turns off report (only valid for XXXSetLevel())
12 + BUNDLE_EXTENSION_LOG_LEVEL_STANDARD, // written if reporting is on
13 + BUNDLE_EXTENSION_LOG_LEVEL_VERBOSE, // written only if verbose reporting is on
14 + BUNDLE_EXTENSION_LOG_LEVEL_DEBUG, // reporting useful when debugging code
15 + BUNDLE_EXTENSION_LOG_LEVEL_ERROR, // always gets reported, but can never be specified
16 +};
17 +
18 +enum BUNDLE_EXTENSION_ENGINE_MESSAGE
19 +{
20 + BUNDLE_EXTENSION_ENGINE_MESSAGE_ESCAPESTRING,
21 + BUNDLE_EXTENSION_ENGINE_MESSAGE_EVALUATECONDITION,
22 + BUNDLE_EXTENSION_ENGINE_MESSAGE_FORMATSTRING,
23 + BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLENUMERIC,
24 + BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLESTRING,
25 + BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLEVERSION,
26 + BUNDLE_EXTENSION_ENGINE_MESSAGE_LOG,
27 + BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLELITERALSTRING,
28 + BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLENUMERIC,
29 + BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLESTRING,
30 + BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLEVERSION,
31 +};
32 +
33 +typedef struct _BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_ARGS
34 +{
35 + DWORD cbSize;
36 + LPCWSTR wzIn;
37 +} BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_ARGS;
38 +
39 +typedef struct _BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_RESULTS
40 +{
41 + DWORD cbSize;
42 + LPWSTR wzOut;
43 + // Should be initialized to the size of wzOut.
44 + DWORD cchOut;
45 +} BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_RESULTS;
46 +
47 +typedef struct _BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_ARGS
48 +{
49 + DWORD cbSize;
50 + LPCWSTR wzCondition;
51 +} BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_ARGS;
52 +
53 +typedef struct _BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_RESULTS
54 +{
55 + DWORD cbSize;
56 + BOOL f;
57 +} BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_RESULTS;
58 +
59 +typedef struct _BUNDLE_EXTENSION_ENGINE_FORMATSTRING_ARGS
60 +{
61 + DWORD cbSize;
62 + LPCWSTR wzIn;
63 +} BUNDLE_EXTENSION_ENGINE_FORMATSTRING_ARGS;
64 +
65 +typedef struct _BUNDLE_EXTENSION_ENGINE_FORMATSTRING_RESULTS
66 +{
67 + DWORD cbSize;
68 + // The contents of wzOut may be sensitive, should keep encrypted and SecureZeroFree.
69 + LPWSTR wzOut;
70 + // Should be initialized to the size of wzOut.
71 + DWORD cchOut;
72 +} BUNDLE_EXTENSION_ENGINE_FORMATSTRING_RESULTS;
73 +
74 +typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS
75 +{
76 + DWORD cbSize;
77 + LPCWSTR wzVariable;
78 +} BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS;
79 +
80 +typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_RESULTS
81 +{
82 + DWORD cbSize;
83 + // The contents of llValue may be sensitive, if variable is hidden should keep value encrypted and SecureZeroMemory.
84 + LONGLONG llValue;
85 +} BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_RESULTS;
86 +
87 +typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_ARGS
88 +{
89 + DWORD cbSize;
90 + LPCWSTR wzVariable;
91 +} BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_ARGS;
92 +
93 +typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS
94 +{
95 + DWORD cbSize;
96 + // The contents of wzValue may be sensitive, if variable is hidden should keep value encrypted and SecureZeroFree.
97 + LPWSTR wzValue;
98 + // Should be initialized to the size of wzValue.
99 + DWORD cchValue;
100 +} BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS;
101 +
102 +typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS
103 +{
104 + DWORD cbSize;
105 + LPCWSTR wzVariable;
106 +} BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS;
107 +
108 +typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS
109 +{
110 + DWORD cbSize;
111 + // The contents of qwValue may be sensitive, if variable is hidden should keep value encrypted and SecureZeroMemory.
112 + DWORD64 qwValue;
113 +} BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS;
114 +
115 +typedef struct _BUNDLE_EXTENSION_ENGINE_LOG_ARGS
116 +{
117 + DWORD cbSize;
118 + BUNDLE_EXTENSION_LOG_LEVEL level;
119 + LPCWSTR wzMessage;
120 +} BUNDLE_EXTENSION_ENGINE_LOG_ARGS;
121 +
122 +typedef struct _BUNDLE_EXTENSION_ENGINE_LOG_RESULTS
123 +{
124 + DWORD cbSize;
125 +} BUNDLE_EXTENSION_ENGINE_LOG_RESULTS;
126 +
127 +typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLELITERALSTRING_ARGS
128 +{
129 + DWORD cbSize;
130 + LPCWSTR wzVariable;
131 + LPCWSTR wzValue;
132 +} BUNDLE_EXTENSION_ENGINE_SETVARIABLELITERALSTRING_ARGS;
133 +
134 +typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLELITERALSTRING_RESULTS
135 +{
136 + DWORD cbSize;
137 +} BUNDLE_EXTENSION_ENGINE_SETVARIABLELITERALSTRING_RESULTS;
138 +
139 +typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS
140 +{
141 + DWORD cbSize;
142 + LPCWSTR wzVariable;
143 + LONGLONG llValue;
144 +} BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS;
145 +
146 +typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS
147 +{
148 + DWORD cbSize;
149 +} BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS;
150 +
151 +typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_ARGS
152 +{
153 + DWORD cbSize;
154 + LPCWSTR wzVariable;
155 + LPCWSTR wzValue;
156 +} BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_ARGS;
157 +
158 +typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_RESULTS
159 +{
160 + DWORD cbSize;
161 +} BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_RESULTS;
162 +
163 +typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS
164 +{
165 + DWORD cbSize;
166 + LPCWSTR wzVariable;
167 + DWORD64 qwValue;
168 +} BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS;
169 +
170 +typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_RESULTS
171 +{
172 + DWORD cbSize;
173 +} BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_RESULTS;
174 +
175 +extern "C" typedef HRESULT(WINAPI *PFN_BUNDLE_EXTENSION_ENGINE_PROC)(
176 + __in BUNDLE_EXTENSION_ENGINE_MESSAGE message,
177 + __in const LPVOID pvArgs,
178 + __inout LPVOID pvResults,
179 + __in_opt LPVOID pvContext
180 + );
181 +
182 +#if defined(__cplusplus)
183 +}
184 +#endif
src/engine/engine.vcxproj
+4 -6
@@ -2,7 +2,6 @@
2 <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->
3
4 <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
5 - <Import Project="..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" />
5 <Import Project="..\..\packages\WixToolset.DUtil.4.0.45\build\WixToolset.DUtil.props" Condition="Exists('..\..\packages\WixToolset.DUtil.4.0.45\build\WixToolset.DUtil.props')" />
6
7 <ItemGroup Label="ProjectConfigurations">
@@ -42,10 +41,6 @@
41 <ImportGroup Label="Shared">
42 </ImportGroup>
43
45 - <PropertyGroup>
46 - <ProjectAdditionalIncludeDirectories>$(ProjectDir)..\inc</ProjectAdditionalIncludeDirectories>
47 - </PropertyGroup>
48 -
44 <ItemGroup>
45 <ClCompile Include="apply.cpp" />
46 <ClCompile Include="approvedexe.cpp" />
@@ -96,6 +91,10 @@
91 <ClInclude Include="apply.h" />
92 <ClInclude Include="approvedexe.h" />
93 <ClInclude Include="bitsengine.h" />
94 + <ClInclude Include="..\WixToolset.BootstrapperCore.Native\inc\BootstrapperApplication.h" />
95 + <ClInclude Include="..\WixToolset.BootstrapperCore.Native\inc\BootstrapperEngine.h" />
96 + <ClInclude Include="..\WixToolset.BootstrapperCore.Native\inc\BundleExtension.h" />
97 + <ClInclude Include="..\WixToolset.BootstrapperCore.Native\inc\BundleExtensionEngine.h" />
98 <ClInclude Include="burnextension.h" />
99 <ClInclude Include="cabextract.h" />
100 <ClInclude Include="cache.h" />
@@ -166,7 +165,6 @@ rc.exe -fo "$(OutDir)engine.res" "$(IntDir)engine.messages.rc"</Command>
165 <PropertyGroup>
166 <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
167 </PropertyGroup>
169 - <Error Condition="!Exists('..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props'))" />
168 <Error Condition="!Exists('..\..\packages\WixToolset.DUtil.4.0.45\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\WixToolset.DUtil.4.0.45\build\WixToolset.DUtil.props'))" />
169 <Error Condition="!Exists('..\..\packages\Nerdbank.GitVersioning.3.1.91\build\Nerdbank.GitVersioning.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\packages\Nerdbank.GitVersioning.3.1.91\build\Nerdbank.GitVersioning.targets'))" />
170 </Target>
src/engine/packages.config
-1
@@ -1,6 +1,5 @@
1 <?xml version="1.0" encoding="utf-8"?>
2 <packages>
3 <package id="Nerdbank.GitVersioning" version="3.1.91" targetFramework="native" developmentDependency="true" />
4 - <package id="WixToolset.BootstrapperCore.Native" version="4.0.16" targetFramework="native" />
4 <package id="WixToolset.DUtil" version="4.0.45" targetFramework="native" />
5 </packages>
\ No newline at end of file
src/engine/precomp.h
+4 -4
@@ -61,10 +61,10 @@
61 #include <atomutil.h>
62 #include <apuputil.h>
63
64 -#include "BootstrapperEngine.h"
65 -#include "BootstrapperApplication.h"
66 -#include "BundleExtensionEngine.h"
67 -#include "BundleExtension.h"
64 +#include "..\WixToolset.BootstrapperCore.Native\inc\BootstrapperEngine.h"
65 +#include "..\WixToolset.BootstrapperCore.Native\inc\BootstrapperApplication.h"
66 +#include "..\WixToolset.BootstrapperCore.Native\inc\BundleExtensionEngine.h"
67 +#include "..\WixToolset.BootstrapperCore.Native\inc\BundleExtension.h"
68
69 #include "platform.h"
70 #include "variant.h"
src/test/BurnUnitTest/BurnUnitTest.vcxproj
+1 -3
@@ -4,7 +4,6 @@
4
5 <Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
6 <Import Project="..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.40\build\WixBuildTools.TestSupport.Native.props" Condition="Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.40\build\WixBuildTools.TestSupport.Native.props')" />
7 - <Import Project="..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props" Condition="Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" />
7 <Import Project="..\..\..\packages\WixToolset.DUtil.4.0.45\build\WixToolset.DUtil.props" Condition="Exists('..\..\..\packages\WixToolset.DUtil.4.0.45\build\WixToolset.DUtil.props')" />
8 <ItemGroup Label="ProjectConfigurations">
9 <ProjectConfiguration Include="Debug|Win32">
@@ -28,7 +27,7 @@
27 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
28 <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
29 <PropertyGroup>
31 - <ProjectAdditionalIncludeDirectories>..\..\engine</ProjectAdditionalIncludeDirectories>
30 + <ProjectAdditionalIncludeDirectories>..\..\engine;..\..\WixToolset.BootstrapperCore.Native\inc</ProjectAdditionalIncludeDirectories>
31 <ProjectAdditionalLinkLibraries>cabinet.lib;crypt32.lib;msi.lib;rpcrt4.lib;shlwapi.lib;wininet.lib;wintrust.lib;gdiplus.lib</ProjectAdditionalLinkLibraries>
32 </PropertyGroup>
33 <ItemGroup>
@@ -81,7 +80,6 @@
80 </PropertyGroup>
81 <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.40\build\WixBuildTools.TestSupport.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.40\build\WixBuildTools.TestSupport.Native.props'))" />
82 <Error Condition="!Exists('..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.40\build\WixBuildTools.TestSupport.Native.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixBuildTools.TestSupport.Native.4.0.40\build\WixBuildTools.TestSupport.Native.targets'))" />
84 - <Error Condition="!Exists('..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.BootstrapperCore.Native.4.0.16\build\WixToolset.BootstrapperCore.Native.props'))" />
83 <Error Condition="!Exists('..\..\..\packages\WixToolset.DUtil.4.0.45\build\WixToolset.DUtil.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\WixToolset.DUtil.4.0.45\build\WixToolset.DUtil.props'))" />
84 </Target>
85 </Project>
src/test/BurnUnitTest/packages.config
-1
@@ -9,6 +9,5 @@
9 <package id="xunit.runner.visualstudio" version="2.4.1" />
10 <package id="WixBuildTools.TestSupport" version="4.0.40" />
11 <package id="WixBuildTools.TestSupport.Native" version="4.0.40" />
12 - <package id="WixToolset.BootstrapperCore.Native" version="4.0.16" targetFramework="native" />
12 <package id="WixToolset.DUtil" version="4.0.45" targetFramework="native" />
13 </packages>
\ No newline at end of file