diff options
| author | Rob Mensching <rob@firegiant.com> | 2024-03-07 09:41:29 -0800 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2024-03-07 10:55:57 -0800 |
| commit | 5baa1dfe8ba2a3bd4728bca118fe1de225f848d4 (patch) | |
| tree | 4f1c216075173e0e4d0863ada195f21d7ec976e0 /src/ext/Util/be/UtilBundleExtension.cpp | |
| parent | dea25ba9bcfd65200b60339c2e4bc060cdf20723 (diff) | |
| download | wix-5baa1dfe8ba2a3bd4728bca118fe1de225f848d4.tar.gz wix-5baa1dfe8ba2a3bd4728bca118fe1de225f848d4.tar.bz2 wix-5baa1dfe8ba2a3bd4728bca118fe1de225f848d4.zip | |
Rename "bundle extension" to "bootstrapper extension" for more consistency
Also renames WixToolet.BextUtil nupkg to WixToolset.BootstrapperExtensionApi.
Diffstat (limited to 'src/ext/Util/be/UtilBundleExtension.cpp')
| -rw-r--r-- | src/ext/Util/be/UtilBundleExtension.cpp | 87 |
1 files changed, 0 insertions, 87 deletions
diff --git a/src/ext/Util/be/UtilBundleExtension.cpp b/src/ext/Util/be/UtilBundleExtension.cpp deleted file mode 100644 index 23f5d94f..00000000 --- a/src/ext/Util/be/UtilBundleExtension.cpp +++ /dev/null | |||
| @@ -1,87 +0,0 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | #include "precomp.h" | ||
| 4 | #include "BextBaseBundleExtension.h" | ||
| 5 | |||
| 6 | class CWixUtilBundleExtension : public CBextBaseBundleExtension | ||
| 7 | { | ||
| 8 | public: // IBundleExtension | ||
| 9 | virtual STDMETHODIMP Search( | ||
| 10 | __in LPCWSTR wzId, | ||
| 11 | __in LPCWSTR wzVariable | ||
| 12 | ) | ||
| 13 | { | ||
| 14 | HRESULT hr = S_OK; | ||
| 15 | |||
| 16 | hr = UtilSearchExecute(&m_searches, wzId, wzVariable, m_pEngine); | ||
| 17 | |||
| 18 | return hr; | ||
| 19 | } | ||
| 20 | |||
| 21 | public: //CBextBaseBundleExtension | ||
| 22 | virtual STDMETHODIMP Initialize( | ||
| 23 | __in const BUNDLE_EXTENSION_CREATE_ARGS* pCreateArgs | ||
| 24 | ) | ||
| 25 | { | ||
| 26 | HRESULT hr = S_OK; | ||
| 27 | IXMLDOMDocument* pixdManifest = NULL; | ||
| 28 | IXMLDOMNode* pixnBundleExtension = NULL; | ||
| 29 | |||
| 30 | hr = __super::Initialize(pCreateArgs); | ||
| 31 | BextExitOnFailure(hr, "CBextBaseBundleExtension initialization failed."); | ||
| 32 | |||
| 33 | hr = XmlLoadDocumentFromFile(m_sczBundleExtensionDataPath, &pixdManifest); | ||
| 34 | BextExitOnFailure(hr, "Failed to load bundle extension manifest from path: %ls", m_sczBundleExtensionDataPath); | ||
| 35 | |||
| 36 | hr = BextGetBundleExtensionDataNode(pixdManifest, UTIL_BUNDLE_EXTENSION_ID, &pixnBundleExtension); | ||
| 37 | BextExitOnFailure(hr, "Failed to get BundleExtension '%ls'", UTIL_BUNDLE_EXTENSION_ID); | ||
| 38 | |||
| 39 | hr = UtilSearchParseFromXml(&m_searches, pixnBundleExtension); | ||
| 40 | BextExitOnFailure(hr, "Failed to parse searches from bundle extension manifest."); | ||
| 41 | |||
| 42 | LExit: | ||
| 43 | ReleaseObject(pixnBundleExtension); | ||
| 44 | ReleaseObject(pixdManifest); | ||
| 45 | |||
| 46 | return hr; | ||
| 47 | } | ||
| 48 | |||
| 49 | public: | ||
| 50 | CWixUtilBundleExtension( | ||
| 51 | __in IBundleExtensionEngine* pEngine | ||
| 52 | ) : CBextBaseBundleExtension(pEngine) | ||
| 53 | { | ||
| 54 | m_searches = { }; | ||
| 55 | } | ||
| 56 | |||
| 57 | ~CWixUtilBundleExtension() | ||
| 58 | { | ||
| 59 | UtilSearchUninitialize(&m_searches); | ||
| 60 | } | ||
| 61 | |||
| 62 | private: | ||
| 63 | UTIL_SEARCHES m_searches; | ||
| 64 | }; | ||
| 65 | |||
| 66 | HRESULT UtilBundleExtensionCreate( | ||
| 67 | __in IBundleExtensionEngine* pEngine, | ||
| 68 | __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, | ||
| 69 | __out IBundleExtension** ppBundleExtension | ||
| 70 | ) | ||
| 71 | { | ||
| 72 | HRESULT hr = S_OK; | ||
| 73 | CWixUtilBundleExtension* pExtension = NULL; | ||
| 74 | |||
| 75 | pExtension = new CWixUtilBundleExtension(pEngine); | ||
| 76 | BextExitOnNull(pExtension, hr, E_OUTOFMEMORY, "Failed to create new CWixUtilBundleExtension."); | ||
| 77 | |||
| 78 | hr = pExtension->Initialize(pArgs); | ||
| 79 | BextExitOnFailure(hr, "CWixUtilBundleExtension initialization failed."); | ||
| 80 | |||
| 81 | *ppBundleExtension = pExtension; | ||
| 82 | pExtension = NULL; | ||
| 83 | |||
| 84 | LExit: | ||
| 85 | ReleaseObject(pExtension); | ||
| 86 | return hr; | ||
| 87 | } | ||
