From 90cdebbe94c7f60db86965ffb97d9ba51d0bc9fc Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 21 Mar 2024 00:59:21 -0700 Subject: Simplify BootstrapperApplication header files Take this breaking change opportunity to simplify the header files used by BA devs. --- src/ext/Bal/Samples/bafunctions/precomp.h | 7 +------ .../Bal/stdbas/WixInternalUIBootstrapperApplication.cpp | 9 ++++----- src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp | 15 +++++++-------- src/ext/Bal/stdbas/precomp.h | 8 ++------ .../test/WixStdFnUnitTest/TestBootstrapperApplication.cpp | 5 ++--- src/ext/Bal/test/WixStdFnUnitTest/precomp.h | 4 +--- src/ext/Bal/wixiuiba/precomp.h | 6 +----- src/ext/Bal/wixprqba/precomp.h | 7 +------ src/ext/Bal/wixstdba/precomp.h | 6 +----- 9 files changed, 20 insertions(+), 47 deletions(-) (limited to 'src/ext') diff --git a/src/ext/Bal/Samples/bafunctions/precomp.h b/src/ext/Bal/Samples/bafunctions/precomp.h index 542ac606..4e88a4a0 100644 --- a/src/ext/Bal/Samples/bafunctions/precomp.h +++ b/src/ext/Bal/Samples/bafunctions/precomp.h @@ -34,12 +34,7 @@ //#include "xmlutil.h" #include "regutil.h" -//#include "IBootstrapperApplication.h" - -#include "BalBaseBootstrapperApplication.h" -//#include "balinfo.h" -//#include "balcondition.h" -#include "balutil.h" +#include "BootstrapperApplicationBase.h" #include "BAFunctions.h" #include "IBAFunctions.h" diff --git a/src/ext/Bal/stdbas/WixInternalUIBootstrapperApplication.cpp b/src/ext/Bal/stdbas/WixInternalUIBootstrapperApplication.cpp index a8967a31..23db7c5f 100644 --- a/src/ext/Bal/stdbas/WixInternalUIBootstrapperApplication.cpp +++ b/src/ext/Bal/stdbas/WixInternalUIBootstrapperApplication.cpp @@ -1,7 +1,6 @@ // 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. #include "precomp.h" -#include "BalBaseBootstrapperApplication.h" static const LPCWSTR WIXIUIBA_WINDOW_CLASS = L"WixInternalUIBA"; @@ -15,10 +14,10 @@ enum WM_WIXIUIBA }; -class CWixInternalUIBootstrapperApplication : public CBalBaseBootstrapperApplication +class CWixInternalUIBootstrapperApplication : public CBootstrapperApplicationBase { public: // IBootstrapperApplication - STDMETHODIMP OnCreate( + virtual STDMETHODIMP OnCreate( __in IBootstrapperEngine* pEngine, __in BOOTSTRAPPER_COMMAND* pCommand ) @@ -26,7 +25,7 @@ public: // IBootstrapperApplication HRESULT hr = S_OK; hr = __super::OnCreate(pEngine, pCommand); - BalExitOnFailure(hr, "CBalBaseBootstrapperApplication initialization failed."); + BalExitOnFailure(hr, "CBootstrapperApplicationBase initialization failed."); m_commandAction = pCommand->action; m_commandDisplay = pCommand->display; @@ -794,7 +793,7 @@ public: // CWixInternalUIBootstrapperApplication( __in HMODULE hModule - ) : CBalBaseBootstrapperApplication(3, 3000) + ) : CBootstrapperApplicationBase(3, 3000) { m_hModule = hModule; m_commandAction = BOOTSTRAPPER_ACTION_UNKNOWN; diff --git a/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp index 233cabbc..c86a4a1d 100644 --- a/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp +++ b/src/ext/Bal/stdbas/WixStandardBootstrapperApplication.cpp @@ -1,7 +1,6 @@ // 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. #include "precomp.h" -#include "BalBaseBootstrapperApplication.h" static const LPCWSTR WIXBUNDLE_VARIABLE_CANRESTART = L"WixCanRestart"; static const LPCWSTR WIXBUNDLE_VARIABLE_ELEVATED = L"WixBundleElevated"; @@ -178,10 +177,10 @@ static LPCSTR LoggingMsiFeatureStateToString( ); -class CWixStandardBootstrapperApplication : public CBalBaseBootstrapperApplication +class CWixStandardBootstrapperApplication : public CBootstrapperApplicationBase { public: // IBootstrapperApplication - STDMETHODIMP OnCreate( + virtual STDMETHODIMP OnCreate( __in IBootstrapperEngine* pEngine, __in BOOTSTRAPPER_COMMAND* pCommand ) @@ -189,7 +188,7 @@ public: // IBootstrapperApplication HRESULT hr = S_OK; hr = __super::OnCreate(pEngine, pCommand); - BalExitOnFailure(hr, "CBalBaseBootstrapperApplication initialization failed."); + BalExitOnFailure(hr, "CBootstrapperApplicationBase initialization failed."); m_commandAction = pCommand->action; m_commandDisplay = pCommand->display; @@ -388,7 +387,7 @@ public: // IBootstrapperApplication } LExit: - return CBalBaseBootstrapperApplication::OnDetectRelatedBundle(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, pfCancel); + return CBootstrapperApplicationBase::OnDetectRelatedBundle(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, pfCancel); } @@ -563,7 +562,7 @@ public: // IBootstrapperApplication *pRequestedType = BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_NONE; } - return CBalBaseBootstrapperApplication::OnPlanRelatedBundleType(wzBundleId, recommendedType, pRequestedType, pfCancel); + return CBootstrapperApplicationBase::OnPlanRelatedBundleType(wzBundleId, recommendedType, pRequestedType, pfCancel); } @@ -633,7 +632,7 @@ public: // IBootstrapperApplication } } - return CBalBaseBootstrapperApplication::OnPlanPackageBegin(wzPackageId, state, fCached, installCondition, repairCondition, recommendedState, recommendedCacheType, pRequestState, pRequestedCacheType, pfCancel); + return CBootstrapperApplicationBase::OnPlanPackageBegin(wzPackageId, state, fCached, installCondition, repairCondition, recommendedState, recommendedCacheType, pRequestState, pRequestedCacheType, pfCancel); } @@ -4778,7 +4777,7 @@ public: CWixStandardBootstrapperApplication( __in HMODULE hModule, __in BOOL fRunAsPrereqBA - ) : CBalBaseBootstrapperApplication(3, 3000) + ) : CBootstrapperApplicationBase(3, 3000) { THEME_ASSIGN_CONTROL_ID* pAssignControl = NULL; DWORD dwAutomaticBehaviorType = THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_ENABLED | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_VISIBLE | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_ACTION | THEME_CONTROL_AUTOMATIC_BEHAVIOR_EXCLUDE_VALUE; diff --git a/src/ext/Bal/stdbas/precomp.h b/src/ext/Bal/stdbas/precomp.h index 00d0d03f..a6c4cfe4 100644 --- a/src/ext/Bal/stdbas/precomp.h +++ b/src/ext/Bal/stdbas/precomp.h @@ -36,13 +36,9 @@ #include #include -#include - -#include -#include -#include - +#include #include +#include #include "stdbas.messages.h" #include "WixStandardBootstrapperApplication.h" diff --git a/src/ext/Bal/test/WixStdFnUnitTest/TestBootstrapperApplication.cpp b/src/ext/Bal/test/WixStdFnUnitTest/TestBootstrapperApplication.cpp index b345ab9f..d0b38064 100644 --- a/src/ext/Bal/test/WixStdFnUnitTest/TestBootstrapperApplication.cpp +++ b/src/ext/Bal/test/WixStdFnUnitTest/TestBootstrapperApplication.cpp @@ -1,12 +1,11 @@ // 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. #include "precomp.h" -#include "BalBaseBootstrapperApplication.h" -class CTestBootstrapperApplication : public CBalBaseBootstrapperApplication +class CTestBootstrapperApplication : public CBootstrapperApplicationBase { public: - CTestBootstrapperApplication() : CBalBaseBootstrapperApplication() + CTestBootstrapperApplication() : CBootstrapperApplicationBase() { } }; diff --git a/src/ext/Bal/test/WixStdFnUnitTest/precomp.h b/src/ext/Bal/test/WixStdFnUnitTest/precomp.h index 4cdd262c..23bc7a6c 100644 --- a/src/ext/Bal/test/WixStdFnUnitTest/precomp.h +++ b/src/ext/Bal/test/WixStdFnUnitTest/precomp.h @@ -15,10 +15,8 @@ #include #include -#include +#include #include -#include -#include #include "TestBAFunctions.h" #include "TestBootstrapperApplication.h" diff --git a/src/ext/Bal/wixiuiba/precomp.h b/src/ext/Bal/wixiuiba/precomp.h index 782c0b1b..a4ce6776 100644 --- a/src/ext/Bal/wixiuiba/precomp.h +++ b/src/ext/Bal/wixiuiba/precomp.h @@ -15,10 +15,6 @@ #include #include -#include - -#include -#include -#include +#include #include "WixInternalUIBootstrapperApplication.h" diff --git a/src/ext/Bal/wixprqba/precomp.h b/src/ext/Bal/wixprqba/precomp.h index a47f411b..b6178be3 100644 --- a/src/ext/Bal/wixprqba/precomp.h +++ b/src/ext/Bal/wixprqba/precomp.h @@ -35,12 +35,7 @@ #include #include -#include - -#include -#include -#include - +#include #include #include "WixStandardBootstrapperApplication.h" diff --git a/src/ext/Bal/wixstdba/precomp.h b/src/ext/Bal/wixstdba/precomp.h index a47f411b..66c5152d 100644 --- a/src/ext/Bal/wixstdba/precomp.h +++ b/src/ext/Bal/wixstdba/precomp.h @@ -35,12 +35,8 @@ #include #include -#include - +#include #include -#include -#include - #include #include "WixStandardBootstrapperApplication.h" -- cgit v1.2.3-55-g6feb