WIP - BA header simplification
Rob Mensching committed
Mar 6, 2024 at 10:20 UTC
a8504dc4eb1c2d09965b0858699ac737336ef3c1
23 files changed
+50
-67
src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h
renamed
+9
@@ -1,6 +1,11 @@
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
+#include "BootstrapperEngine.h"
5
+
6
+#if defined(__cplusplus)
7
+extern "C" {
8
+#endif
9
10
const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_API_VERSION = L"burn.ba.apiver";
11
const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_PIPE_NAME = L"burn.ba.pipe";
@@ -1595,3 +1600,7 @@ extern "C" typedef HRESULT(WINAPI *PFN_BOOTSTRAPPER_APPLICATION_CREATE)(
1600
);
1601
1602
#endif
1603
+
1604
+#if defined(__cplusplus)
1605
+}
1606
+#endif
src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h
renamed
src/api/burn/balutil/balutil.cpp
+17
-17
@@ -38,21 +38,6 @@ static void MsgProc(
38
39
// prototypes
40
41
-DAPI_(void) BalInitialize(
42
- __in IBootstrapperEngine* pEngine
43
- )
44
-{
45
- pEngine->AddRef();
46
-
47
- ReleaseObject(vpEngine);
48
- vpEngine = pEngine;
49
-}
50
-
51
-DAPI_(void) BalUninitialize()
52
-{
53
- ReleaseNullObject(vpEngine);
54
-}
55
-
41
DAPI_(HRESULT) BootstrapperApplicationRun(
42
__in IBootstrapperApplication* pApplication
43
)
@@ -86,7 +71,7 @@ DAPI_(HRESULT) BootstrapperApplicationRun(
71
BalInitialize(pEngine);
72
fInitializedBal = TRUE;
73
89
- BootstrapperApplicationDebuggerCheck();
74
+ BalDebuggerCheck();
75
76
hr = MsgPump(hBAPipe, pApplication, pEngine);
77
BalExitOnFailure(hr, "Failed while pumping messages.");
@@ -111,7 +96,22 @@ LExit:
96
return hr;
97
}
98
114
-DAPI_(VOID) BootstrapperApplicationDebuggerCheck()
99
+DAPI_(void) BalInitialize(
100
+ __in IBootstrapperEngine* pEngine
101
+ )
102
+{
103
+ pEngine->AddRef();
104
+
105
+ ReleaseObject(vpEngine);
106
+ vpEngine = pEngine;
107
+}
108
+
109
+DAPI_(void) BalUninitialize()
110
+{
111
+ ReleaseNullObject(vpEngine);
112
+}
113
+
114
+DAPI_(VOID) BalDebuggerCheck()
115
{
116
HRESULT hr = S_OK;
117
HKEY hk = NULL;
src/api/burn/balutil/inc/BalBaseBAFunctions.h
+1
-1
@@ -4,7 +4,7 @@
4
#include <windows.h>
5
#include <msiquery.h>
6
7
-#include <batypes.h>
7
+#include <BootstrapperApplication.h>
8
9
#include "IBAFunctions.h"
10
src/api/burn/balutil/inc/BalBaseBootstrapperApplication.h
-1
@@ -3,7 +3,6 @@
3
#include <windows.h>
4
#include <msiquery.h>
5
6
-#include "IBootstrapperEngine.h"
6
#include "IBootstrapperApplication.h"
7
8
#include "balutil.h"
src/api/burn/balutil/inc/IBAFunctions.h
+1
@@ -3,6 +3,7 @@
3
4
5
#include "IBootstrapperApplication.h"
6
+#include "BAFunctions.h"
7
8
DECLARE_INTERFACE_IID_(IBAFunctions, IBootstrapperApplication, "0FB445ED-17BD-49C7-BE19-479776F8AE96")
9
{
src/api/burn/balutil/inc/IBootstrapperApplication.h
+2
-2
@@ -1,8 +1,8 @@
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
-#include <batypes.h>
5
-
4
+#include <BootstrapperApplication.h>
5
+#include <IBootstrapperEngine.h>
6
7
DECLARE_INTERFACE_IID_(IBootstrapperApplication, IUnknown, "53C31D56-49C0-426B-AB06-099D717C67FE")
8
{
src/api/burn/balutil/inc/IBootstrapperEngine.h
+1
-1
@@ -1,7 +1,7 @@
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
-#include <baenginetypes.h>
4
+#include "BootstrapperEngine.h"
5
6
DECLARE_INTERFACE_IID_(IBootstrapperEngine, IUnknown, "6480D616-27A0-44D7-905B-81512C29C2FB")
7
{
src/api/burn/balutil/inc/balutil.h
+8
-9
@@ -42,15 +42,6 @@ static const HRESULT E_WIXSTDBA_CONDITION_FAILED = MAKE_HRESULT(SEVERITY_ERROR,
42
static const HRESULT E_PREREQBA_INFINITE_LOOP = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIX, 1002);
43
44
45
-/*******************************************************************
46
- BootstrapperApplicationDebuggerCheck - allows bootstrapper application to
47
- explicitly check whether a debugger should be attached to the boostrapper
48
- application.
49
-
50
- Note: Automatically called in BootstrapperApplicationRun().
51
-********************************************************************/
52
-DAPI_(VOID) BootstrapperApplicationDebuggerCheck();
53
-
45
/*******************************************************************
46
BootstrapperApplicationRun - runs the IBootstrapperApplication until
47
the application quits.
@@ -60,6 +51,14 @@ DAPI_(HRESULT) BootstrapperApplicationRun(
51
__in IBootstrapperApplication* pApplication
52
);
53
54
+/*******************************************************************
55
+ BalDebuggerCheck - allows bootstrapper application to explicitly check
56
+ whether a debugger should be attached to the boostrapper application.
57
+
58
+ Note: Automatically called in BootstrapperApplicationRun().
59
+********************************************************************/
60
+DAPI_(VOID) BalDebuggerCheck();
61
+
62
/*******************************************************************
63
BalInitialize - remembers the engine interface to enable logging and
64
other functions.
src/api/burn/balutil/precomp.h
-7
@@ -30,13 +30,6 @@
30
#include <thmutil.h>
31
#include <xmlutil.h>
32
33
-#include <baenginetypes.h>
34
-#include <batypes.h>
35
-
36
-#include "IBootstrapperEngine.h"
37
-#include "IBootstrapperApplication.h"
38
-
39
-#include "BAFunctions.h"
33
#include "IBAFunctions.h"
34
35
#include "balutil.h"
src/api/burn/mbanative/mbanative.def
+1
-1
@@ -8,7 +8,7 @@ EXPORTS
8
BalGetVersionVariableFromEngine
9
BalGetRelatedBundleVariableFromEngine
10
BalVariableExistsFromEngine
11
- BootstrapperApplicationDebuggerCheck
11
+ BalDebuggerCheck
12
BootstrapperApplicationRun
13
StrFree
14
VerCompareParsedVersions
src/api/burn/mbanative/precomp.h
-4
@@ -8,9 +8,5 @@
8
#include <dutil.h>
9
#include <verutil.h>
10
11
-// #include <BootstrapperEngine.h>
12
-// #include <BootstrapperApplication.h>
13
-
14
-#include <IBootstrapperEngine.h>
11
#include <IBootstrapperApplication.h>
12
#include <balutil.h>
src/api/burn/test/BalUtilUnitTest/precomp.h
-5
@@ -15,11 +15,6 @@
15
#include <dutil.h>
16
#include <dictutil.h>
17
18
-#include <baenginetypes.h>
19
-#include <batypes.h>
20
-
21
-#include <BAFunctions.h>
22
-#include <IBootstrapperEngine.h>
18
#include <IBootstrapperApplication.h>
19
#include <IBAFunctions.h>
20
#include <balutil.h>
src/burn/engine/ba.h
renamed
src/burn/engine/engine.vcxproj
+3
-3
@@ -102,12 +102,12 @@
102
<ItemGroup>
103
<ClInclude Include="apply.h" />
104
<ClInclude Include="approvedexe.h" />
105
- <ClInclude Include="..\..\api\burn\WixToolset.BootstrapperCore.Native\inc\batypes.h" />
106
- <ClInclude Include="..\..\api\burn\WixToolset.BootstrapperCore.Native\inc\baenginetypes.h" />
105
+ <ClInclude Include="..\..\api\burn\WixToolset.BootstrapperCore.Native\inc\BootstrapperApplication.h" />
106
+ <ClInclude Include="..\..\api\burn\WixToolset.BootstrapperCore.Native\inc\BootstrapperEngine.h" />
107
<ClInclude Include="..\..\api\burn\WixToolset.BootstrapperCore.Native\inc\BundleExtension.h" />
108
<ClInclude Include="..\..\api\burn\WixToolset.BootstrapperCore.Native\inc\BundleExtensionEngine.h" />
109
+ <ClInclude Include="ba.h" />
110
<ClInclude Include="bacallback.h" />
110
- <ClInclude Include="bootstrapperapplication.h" />
111
<ClInclude Include="bundlepackageengine.h" />
112
<ClInclude Include="burnextension.h" />
113
<ClInclude Include="cabextract.h" />
src/burn/engine/precomp.h
+3
-3
@@ -61,8 +61,8 @@
61
#include <dpiutil.h>
62
#include <butil.h>
63
64
-#include "baenginetypes.h"
65
-#include "batypes.h"
64
+#include "BootstrapperApplication.h"
65
+
66
#include "BundleExtensionEngine.h"
67
#include "BundleExtension.h"
68
@@ -77,7 +77,7 @@
77
#include "cabextract.h"
78
#include "burnextension.h"
79
#include "search.h"
80
-#include "bootstrapperapplication.h"
80
+#include "ba.h"
81
#include "userexperience.h"
82
#include "package.h"
83
#include "update.h"
src/burn/test/BurnUnitTest/precomp.h
+2
-3
@@ -37,8 +37,7 @@
37
#include <deputil.h>
38
#include <butil.h>
39
40
-#include "baenginetypes.h"
41
-#include "batypes.h"
40
+#include "BootstrapperApplication.h"
41
#include "BundleExtensionEngine.h"
42
#include "BundleExtension.h"
43
@@ -53,7 +52,7 @@
52
#include "cabextract.h"
53
#include "burnextension.h"
54
#include "search.h"
56
-#include "bootstrapperapplication.h"
55
+#include "ba.h"
56
#include "userexperience.h"
57
#include "package.h"
58
#include "update.h"
src/ext/Bal/Samples/bafunctions/precomp.h
-1
@@ -34,7 +34,6 @@
34
//#include "xmlutil.h"
35
#include "regutil.h"
36
37
-//#include "IBootstrapperEngine.h"
37
//#include "IBootstrapperApplication.h"
38
39
#include "BalBaseBootstrapperApplication.h"
src/ext/Bal/stdbas/precomp.h
-1
@@ -36,7 +36,6 @@
36
#include <uriutil.h>
37
#include <xmlutil.h>
38
39
-#include <IBootstrapperEngine.h>
39
#include <IBootstrapperApplication.h>
40
41
#include <balutil.h>
src/ext/Bal/test/examples/TestEngine/precomp.h
+2
-2
@@ -11,8 +11,8 @@
11
#include "pathutil.h"
12
#include "strutil.h"
13
14
-#include <baenginetypes.h>
15
-#include <batypes.h>
14
+// #include <baenginetypes.h>
15
+// #include <batypes.h>
16
17
#include "TestEngine.h"
18
#include "ReloadEngine.h"
src/ext/Bal/wixiuiba/precomp.h
-4
@@ -15,10 +15,6 @@
15
#include <strutil.h>
16
#include <xmlutil.h>
17
18
-#include <baenginetypes.h>
19
-#include <batypes.h>
20
-
21
-#include <IBootstrapperEngine.h>
18
#include <IBootstrapperApplication.h>
19
20
#include <balutil.h>
src/ext/Bal/wixprqba/precomp.h
-1
@@ -35,7 +35,6 @@
35
#include <uriutil.h>
36
#include <xmlutil.h>
37
38
-#include <IBootstrapperEngine.h>
38
#include <IBootstrapperApplication.h>
39
40
#include <balutil.h>
src/ext/Bal/wixstdba/precomp.h
-1
@@ -35,7 +35,6 @@
35
#include <uriutil.h>
36
#include <xmlutil.h>
37
38
-#include <IBootstrapperEngine.h>
38
#include <IBootstrapperApplication.h>
39
40
#include <balutil.h>