From 5baa1dfe8ba2a3bd4728bca118fe1de225f848d4 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 7 Mar 2024 09:41:29 -0800 Subject: Rename "bundle extension" to "bootstrapper extension" for more consistency Also renames WixToolet.BextUtil nupkg to WixToolset.BootstrapperExtensionApi. --- .../test/BextUtilUnitTest/BextUtilUnitTest.vcxproj | 6 +-- .../BextUtilUnitTest.vcxproj.filters | 8 ++-- .../BootstrapperExtensionTests.cpp | 44 ++++++++++++++++++++++ .../test/BextUtilUnitTest/BundleExtensionTests.cpp | 44 ---------------------- .../BextUtilUnitTest/TestBootstrapperExtension.cpp | 42 +++++++++++++++++++++ .../BextUtilUnitTest/TestBootstrapperExtension.h | 9 +++++ .../test/BextUtilUnitTest/TestBundleExtension.cpp | 42 --------------------- .../test/BextUtilUnitTest/TestBundleExtension.h | 9 ----- src/api/burn/test/BextUtilUnitTest/precomp.h | 2 +- 9 files changed, 103 insertions(+), 103 deletions(-) create mode 100644 src/api/burn/test/BextUtilUnitTest/BootstrapperExtensionTests.cpp delete mode 100644 src/api/burn/test/BextUtilUnitTest/BundleExtensionTests.cpp create mode 100644 src/api/burn/test/BextUtilUnitTest/TestBootstrapperExtension.cpp create mode 100644 src/api/burn/test/BextUtilUnitTest/TestBootstrapperExtension.h delete mode 100644 src/api/burn/test/BextUtilUnitTest/TestBundleExtension.cpp delete mode 100644 src/api/burn/test/BextUtilUnitTest/TestBundleExtension.h (limited to 'src/api/burn/test/BextUtilUnitTest') diff --git a/src/api/burn/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj b/src/api/burn/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj index 6e8dfee1..39135dcf 100644 --- a/src/api/burn/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj +++ b/src/api/burn/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj @@ -36,18 +36,18 @@ - + Create 4564;4691 - + - + diff --git a/src/api/burn/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj.filters b/src/api/burn/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj.filters index 73f2194d..678f04f5 100644 --- a/src/api/burn/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj.filters +++ b/src/api/burn/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj.filters @@ -15,13 +15,13 @@ - + Source Files Source Files - + Source Files @@ -29,8 +29,8 @@ Header Files - + Header Files - \ No newline at end of file + diff --git a/src/api/burn/test/BextUtilUnitTest/BootstrapperExtensionTests.cpp b/src/api/burn/test/BextUtilUnitTest/BootstrapperExtensionTests.cpp new file mode 100644 index 00000000..c2882587 --- /dev/null +++ b/src/api/burn/test/BextUtilUnitTest/BootstrapperExtensionTests.cpp @@ -0,0 +1,44 @@ +// 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" + +using namespace System; +using namespace Xunit; +using namespace WixInternal::TestSupport; +using namespace WixInternal::TestSupport::XunitExtensions; + +namespace BextUtilTests +{ + public ref class BootstrapperExtension + { + public: + [Fact] + void CanCreateTestBootstrapperExtension() + { + HRESULT hr = S_OK; + BOOTSTRAPPER_EXTENSION_CREATE_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_CREATE_RESULTS results = { }; + IBootstrapperExtensionEngine* pEngine = NULL; + IBootstrapperExtension* pBootstrapperExtension = NULL; + + args.cbSize = sizeof(args); + args.wzBootstrapperExtensionDataPath = L"test.xml"; + + results.cbSize = sizeof(results); + + try + { + hr = BextInitializeFromCreateArgs(&args, &pEngine); + NativeAssert::Succeeded(hr, "Failed to create engine."); + + hr = TestBootstrapperExtensionCreate(pEngine, &args, &results, &pBootstrapperExtension); + NativeAssert::Succeeded(hr, "Failed to create BootstrapperApplication."); + } + finally + { + ReleaseObject(pEngine); + ReleaseObject(pBootstrapperExtension); + } + } + }; +} diff --git a/src/api/burn/test/BextUtilUnitTest/BundleExtensionTests.cpp b/src/api/burn/test/BextUtilUnitTest/BundleExtensionTests.cpp deleted file mode 100644 index 5c5c5812..00000000 --- a/src/api/burn/test/BextUtilUnitTest/BundleExtensionTests.cpp +++ /dev/null @@ -1,44 +0,0 @@ -// 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" - -using namespace System; -using namespace Xunit; -using namespace WixInternal::TestSupport; -using namespace WixInternal::TestSupport::XunitExtensions; - -namespace BextUtilTests -{ - public ref class BundleExtension - { - public: - [Fact] - void CanCreateTestBundleExtension() - { - HRESULT hr = S_OK; - BUNDLE_EXTENSION_CREATE_ARGS args = { }; - BUNDLE_EXTENSION_CREATE_RESULTS results = { }; - IBundleExtensionEngine* pEngine = NULL; - IBundleExtension* pBundleExtension = NULL; - - args.cbSize = sizeof(args); - args.wzBundleExtensionDataPath = L"test.xml"; - - results.cbSize = sizeof(results); - - try - { - hr = BextInitializeFromCreateArgs(&args, &pEngine); - NativeAssert::Succeeded(hr, "Failed to create engine."); - - hr = TestBundleExtensionCreate(pEngine, &args, &results, &pBundleExtension); - NativeAssert::Succeeded(hr, "Failed to create BootstrapperApplication."); - } - finally - { - ReleaseObject(pEngine); - ReleaseObject(pBundleExtension); - } - } - }; -} diff --git a/src/api/burn/test/BextUtilUnitTest/TestBootstrapperExtension.cpp b/src/api/burn/test/BextUtilUnitTest/TestBootstrapperExtension.cpp new file mode 100644 index 00000000..225123da --- /dev/null +++ b/src/api/burn/test/BextUtilUnitTest/TestBootstrapperExtension.cpp @@ -0,0 +1,42 @@ +// 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 "BextBaseBootstrapperExtension.h" +#include "BextBaseBootstrapperExtensionProc.h" + +class CTestBootstrapperExtension : public CBextBaseBootstrapperExtension +{ +public: + CTestBootstrapperExtension( + __in IBootstrapperExtensionEngine* pEngine + ) : CBextBaseBootstrapperExtension(pEngine) + { + } +}; + +HRESULT TestBootstrapperExtensionCreate( + __in IBootstrapperExtensionEngine* pEngine, + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pArgs, + __inout BOOTSTRAPPER_EXTENSION_CREATE_RESULTS* pResults, + __out IBootstrapperExtension** ppBootstrapperExtension + ) +{ + HRESULT hr = S_OK; + CTestBootstrapperExtension* pExtension = NULL; + + pExtension = new CTestBootstrapperExtension(pEngine); + ExitOnNull(pExtension, hr, E_OUTOFMEMORY, "Failed to create new CTestBootstrapperExtension."); + + hr = pExtension->Initialize(pArgs); + ExitOnFailure(hr, "CTestBootstrapperExtension initialization failed"); + + pResults->pfnBootstrapperExtensionProc = BextBaseBootstrapperExtensionProc; + pResults->pvBootstrapperExtensionProcContext = pExtension; + + *ppBootstrapperExtension = pExtension; + pExtension = NULL; + +LExit: + ReleaseObject(pExtension); + return hr; +} diff --git a/src/api/burn/test/BextUtilUnitTest/TestBootstrapperExtension.h b/src/api/burn/test/BextUtilUnitTest/TestBootstrapperExtension.h new file mode 100644 index 00000000..00e4243c --- /dev/null +++ b/src/api/burn/test/BextUtilUnitTest/TestBootstrapperExtension.h @@ -0,0 +1,9 @@ +#pragma once +// 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. + +HRESULT TestBootstrapperExtensionCreate( + __in IBootstrapperExtensionEngine* pEngine, + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pArgs, + __inout BOOTSTRAPPER_EXTENSION_CREATE_RESULTS* pResults, + __out IBootstrapperExtension** ppBootstrapperExtension + ); diff --git a/src/api/burn/test/BextUtilUnitTest/TestBundleExtension.cpp b/src/api/burn/test/BextUtilUnitTest/TestBundleExtension.cpp deleted file mode 100644 index 921303bb..00000000 --- a/src/api/burn/test/BextUtilUnitTest/TestBundleExtension.cpp +++ /dev/null @@ -1,42 +0,0 @@ -// 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 "BextBaseBundleExtension.h" -#include "BextBaseBundleExtensionProc.h" - -class CTestBundleExtension : public CBextBaseBundleExtension -{ -public: - CTestBundleExtension( - __in IBundleExtensionEngine* pEngine - ) : CBextBaseBundleExtension(pEngine) - { - } -}; - -HRESULT TestBundleExtensionCreate( - __in IBundleExtensionEngine* pEngine, - __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, - __inout BUNDLE_EXTENSION_CREATE_RESULTS* pResults, - __out IBundleExtension** ppBundleExtension - ) -{ - HRESULT hr = S_OK; - CTestBundleExtension* pExtension = NULL; - - pExtension = new CTestBundleExtension(pEngine); - ExitOnNull(pExtension, hr, E_OUTOFMEMORY, "Failed to create new CTestBundleExtension."); - - hr = pExtension->Initialize(pArgs); - ExitOnFailure(hr, "CTestBundleExtension initialization failed"); - - pResults->pfnBundleExtensionProc = BextBaseBundleExtensionProc; - pResults->pvBundleExtensionProcContext = pExtension; - - *ppBundleExtension = pExtension; - pExtension = NULL; - -LExit: - ReleaseObject(pExtension); - return hr; -} diff --git a/src/api/burn/test/BextUtilUnitTest/TestBundleExtension.h b/src/api/burn/test/BextUtilUnitTest/TestBundleExtension.h deleted file mode 100644 index 5cfe8b39..00000000 --- a/src/api/burn/test/BextUtilUnitTest/TestBundleExtension.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once -// 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. - -HRESULT TestBundleExtensionCreate( - __in IBundleExtensionEngine* pEngine, - __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, - __inout BUNDLE_EXTENSION_CREATE_RESULTS* pResults, - __out IBundleExtension** ppBundleExtension - ); diff --git a/src/api/burn/test/BextUtilUnitTest/precomp.h b/src/api/burn/test/BextUtilUnitTest/precomp.h index 00bf872f..893a2ac4 100644 --- a/src/api/burn/test/BextUtilUnitTest/precomp.h +++ b/src/api/burn/test/BextUtilUnitTest/precomp.h @@ -9,7 +9,7 @@ #include #include -#include "TestBundleExtension.h" +#include "TestBootstrapperExtension.h" #pragma managed #include -- cgit v1.2.3-55-g6feb