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. --- src/ext/NetFx/be/NetfxBootstrapperExtension.cpp | 102 +++++++++++++++++++++ src/ext/NetFx/be/NetfxBootstrapperExtension.h | 17 ++++ src/ext/NetFx/be/NetfxBundleExtension.cpp | 102 --------------------- src/ext/NetFx/be/NetfxBundleExtension.h | 17 ---- src/ext/NetFx/be/detectnetcore.cpp | 2 +- src/ext/NetFx/be/detectnetcore.h | 2 +- src/ext/NetFx/be/detectnetcoresdk.cpp | 2 +- src/ext/NetFx/be/detectnetcoresdk.h | 2 +- src/ext/NetFx/be/detectnetcoresdkfeatureband.cpp | 2 +- src/ext/NetFx/be/detectnetcoresdkfeatureband.h | 2 +- src/ext/NetFx/be/netfxbe.cpp | 24 ++--- src/ext/NetFx/be/netfxbe.def | 4 +- src/ext/NetFx/be/netfxbe.vcxproj | 8 +- src/ext/NetFx/be/netfxsearch.cpp | 6 +- src/ext/NetFx/be/netfxsearch.h | 4 +- src/ext/NetFx/be/precomp.h | 4 +- src/ext/NetFx/wixext/NetFxCompiler.cs | 18 ++-- .../NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs | 6 +- .../wixlib/NetfxBootstrapperExtension_Platform.wxi | 15 +++ .../wixlib/NetfxBootstrapperExtension_arm64.wxs | 7 ++ .../wixlib/NetfxBootstrapperExtension_x64.wxs | 7 ++ .../wixlib/NetfxBootstrapperExtension_x86.wxs | 7 ++ .../NetFx/wixlib/NetfxBundleExtension_Platform.wxi | 15 --- .../NetFx/wixlib/NetfxBundleExtension_arm64.wxs | 7 -- src/ext/NetFx/wixlib/NetfxBundleExtension_x64.wxs | 7 -- src/ext/NetFx/wixlib/NetfxBundleExtension_x86.wxs | 7 -- src/ext/Util/be/UtilBootstrapperExtension.cpp | 87 ++++++++++++++++++ src/ext/Util/be/UtilBootstrapperExtension.h | 16 ++++ src/ext/Util/be/UtilBundleExtension.cpp | 87 ------------------ src/ext/Util/be/UtilBundleExtension.h | 16 ---- src/ext/Util/be/detectsha2support.cpp | 2 +- src/ext/Util/be/detectsha2support.h | 4 +- src/ext/Util/be/precomp.h | 4 +- src/ext/Util/be/utilbe.cpp | 26 +++--- src/ext/Util/be/utilbe.def | 4 +- src/ext/Util/be/utilbe.vcxproj | 8 +- src/ext/Util/be/utilsearch.cpp | 6 +- src/ext/Util/be/utilsearch.h | 4 +- .../WixToolsetTest.Util/UtilExtensionFixture.cs | 10 +- .../Util/wixext/Symbols/UtilSymbolDefinitions.cs | 4 +- src/ext/Util/wixext/UtilCompiler.cs | 6 +- .../wixlib/UtilBootstrapperExtension_Platform.wxi | 10 ++ .../wixlib/UtilBootstrapperExtension_arm64.wxs | 7 ++ .../Util/wixlib/UtilBootstrapperExtension_x64.wxs | 7 ++ .../Util/wixlib/UtilBootstrapperExtension_x86.wxs | 7 ++ .../Util/wixlib/UtilBundleExtension_Platform.wxi | 10 -- src/ext/Util/wixlib/UtilBundleExtension_arm64.wxs | 7 -- src/ext/Util/wixlib/UtilBundleExtension_x64.wxs | 7 -- src/ext/Util/wixlib/UtilBundleExtension_x86.wxs | 7 -- src/ext/beDecor.h | 8 +- 50 files changed, 375 insertions(+), 375 deletions(-) create mode 100644 src/ext/NetFx/be/NetfxBootstrapperExtension.cpp create mode 100644 src/ext/NetFx/be/NetfxBootstrapperExtension.h delete mode 100644 src/ext/NetFx/be/NetfxBundleExtension.cpp delete mode 100644 src/ext/NetFx/be/NetfxBundleExtension.h create mode 100644 src/ext/NetFx/wixlib/NetfxBootstrapperExtension_Platform.wxi create mode 100644 src/ext/NetFx/wixlib/NetfxBootstrapperExtension_arm64.wxs create mode 100644 src/ext/NetFx/wixlib/NetfxBootstrapperExtension_x64.wxs create mode 100644 src/ext/NetFx/wixlib/NetfxBootstrapperExtension_x86.wxs delete mode 100644 src/ext/NetFx/wixlib/NetfxBundleExtension_Platform.wxi delete mode 100644 src/ext/NetFx/wixlib/NetfxBundleExtension_arm64.wxs delete mode 100644 src/ext/NetFx/wixlib/NetfxBundleExtension_x64.wxs delete mode 100644 src/ext/NetFx/wixlib/NetfxBundleExtension_x86.wxs create mode 100644 src/ext/Util/be/UtilBootstrapperExtension.cpp create mode 100644 src/ext/Util/be/UtilBootstrapperExtension.h delete mode 100644 src/ext/Util/be/UtilBundleExtension.cpp delete mode 100644 src/ext/Util/be/UtilBundleExtension.h create mode 100644 src/ext/Util/wixlib/UtilBootstrapperExtension_Platform.wxi create mode 100644 src/ext/Util/wixlib/UtilBootstrapperExtension_arm64.wxs create mode 100644 src/ext/Util/wixlib/UtilBootstrapperExtension_x64.wxs create mode 100644 src/ext/Util/wixlib/UtilBootstrapperExtension_x86.wxs delete mode 100644 src/ext/Util/wixlib/UtilBundleExtension_Platform.wxi delete mode 100644 src/ext/Util/wixlib/UtilBundleExtension_arm64.wxs delete mode 100644 src/ext/Util/wixlib/UtilBundleExtension_x64.wxs delete mode 100644 src/ext/Util/wixlib/UtilBundleExtension_x86.wxs (limited to 'src/ext') diff --git a/src/ext/NetFx/be/NetfxBootstrapperExtension.cpp b/src/ext/NetFx/be/NetfxBootstrapperExtension.cpp new file mode 100644 index 00000000..ab30e378 --- /dev/null +++ b/src/ext/NetFx/be/NetfxBootstrapperExtension.cpp @@ -0,0 +1,102 @@ +// 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" + +class CWixNetfxBootstrapperExtension : public CBextBaseBootstrapperExtension +{ +public: // IBootstrapperExtension + virtual STDMETHODIMP Search( + __in LPCWSTR wzId, + __in LPCWSTR wzVariable + ) + { + HRESULT hr = S_OK; + + hr = NetfxSearchExecute(&m_searches, wzId, wzVariable, m_pEngine, m_sczBaseDirectory); + + return hr; + } + +public: //CBextBaseBootstrapperExtension + virtual STDMETHODIMP Initialize( + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pCreateArgs + ) + { + HRESULT hr = S_OK; + LPWSTR sczModulePath = NULL; + IXMLDOMDocument* pixdManifest = NULL; + IXMLDOMNode* pixnBootstrapperExtension = NULL; + + hr = __super::Initialize(pCreateArgs); + BextExitOnFailure(hr, "CBextBaseBootstrapperExtension initialization failed."); + + hr = PathForCurrentProcess(&sczModulePath, m_hInstance); + BextExitOnFailure(hr, "Failed to get bundle extension path."); + + hr = PathGetDirectory(sczModulePath, &m_sczBaseDirectory); + BextExitOnFailure(hr, "Failed to get bundle extension base directory."); + + hr = XmlLoadDocumentFromFile(m_sczBootstrapperExtensionDataPath, &pixdManifest); + BextExitOnFailure(hr, "Failed to load bundle extension manifest from path: %ls", m_sczBootstrapperExtensionDataPath); + + hr = BextGetBootstrapperExtensionDataNode(pixdManifest, NETFX_BOOTSTRAPPER_EXTENSION_ID, &pixnBootstrapperExtension); + BextExitOnFailure(hr, "Failed to get BootstrapperExtension '%ls'", NETFX_BOOTSTRAPPER_EXTENSION_ID); + + hr = NetfxSearchParseFromXml(&m_searches, pixnBootstrapperExtension); + BextExitOnFailure(hr, "Failed to parse searches from bundle extension manifest."); + + LExit: + ReleaseObject(pixnBootstrapperExtension); + ReleaseObject(pixdManifest); + ReleaseStr(sczModulePath); + + return hr; + } + +public: + CWixNetfxBootstrapperExtension( + __in HINSTANCE hInstance, + __in IBootstrapperExtensionEngine* pEngine + ) : CBextBaseBootstrapperExtension(pEngine) + { + m_searches = { }; + m_hInstance = hInstance; + m_sczBaseDirectory = NULL; + } + + ~CWixNetfxBootstrapperExtension() + { + NetfxSearchUninitialize(&m_searches); + ReleaseStr(m_sczBaseDirectory); + } + +private: + NETFX_SEARCHES m_searches; + HINSTANCE m_hInstance; + LPWSTR m_sczBaseDirectory; +}; + +HRESULT NetfxBootstrapperExtensionCreate( + __in HINSTANCE hInstance, + __in IBootstrapperExtensionEngine* pEngine, + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pArgs, + __out IBootstrapperExtension** ppBootstrapperExtension + ) +{ + HRESULT hr = S_OK; + CWixNetfxBootstrapperExtension* pExtension = NULL; + + pExtension = new CWixNetfxBootstrapperExtension(hInstance, pEngine); + BextExitOnNull(pExtension, hr, E_OUTOFMEMORY, "Failed to create new CWixNetfxBootstrapperExtension."); + + hr = pExtension->Initialize(pArgs); + BextExitOnFailure(hr, "CWixNetfxBootstrapperExtension initialization failed."); + + *ppBootstrapperExtension = pExtension; + pExtension = NULL; + +LExit: + ReleaseObject(pExtension); + return hr; +} diff --git a/src/ext/NetFx/be/NetfxBootstrapperExtension.h b/src/ext/NetFx/be/NetfxBootstrapperExtension.h new file mode 100644 index 00000000..36563dae --- /dev/null +++ b/src/ext/NetFx/be/NetfxBootstrapperExtension.h @@ -0,0 +1,17 @@ +#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. + + +// constants + +#define NETFX_BOOTSTRAPPER_EXTENSION_ID BOOTSTRAPPER_EXTENSION_DECORATION(L"NetfxBootstrapperExtension") + + +// function declarations + +HRESULT NetfxBootstrapperExtensionCreate( + __in HINSTANCE hInstance, + __in IBootstrapperExtensionEngine* pEngine, + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pArgs, + __out IBootstrapperExtension** ppBootstrapperExtension + ); diff --git a/src/ext/NetFx/be/NetfxBundleExtension.cpp b/src/ext/NetFx/be/NetfxBundleExtension.cpp deleted file mode 100644 index 838a97c1..00000000 --- a/src/ext/NetFx/be/NetfxBundleExtension.cpp +++ /dev/null @@ -1,102 +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" - -class CWixNetfxBundleExtension : public CBextBaseBundleExtension -{ -public: // IBundleExtension - virtual STDMETHODIMP Search( - __in LPCWSTR wzId, - __in LPCWSTR wzVariable - ) - { - HRESULT hr = S_OK; - - hr = NetfxSearchExecute(&m_searches, wzId, wzVariable, m_pEngine, m_sczBaseDirectory); - - return hr; - } - -public: //CBextBaseBundleExtension - virtual STDMETHODIMP Initialize( - __in const BUNDLE_EXTENSION_CREATE_ARGS* pCreateArgs - ) - { - HRESULT hr = S_OK; - LPWSTR sczModulePath = NULL; - IXMLDOMDocument* pixdManifest = NULL; - IXMLDOMNode* pixnBundleExtension = NULL; - - hr = __super::Initialize(pCreateArgs); - BextExitOnFailure(hr, "CBextBaseBundleExtension initialization failed."); - - hr = PathForCurrentProcess(&sczModulePath, m_hInstance); - BextExitOnFailure(hr, "Failed to get bundle extension path."); - - hr = PathGetDirectory(sczModulePath, &m_sczBaseDirectory); - BextExitOnFailure(hr, "Failed to get bundle extension base directory."); - - hr = XmlLoadDocumentFromFile(m_sczBundleExtensionDataPath, &pixdManifest); - BextExitOnFailure(hr, "Failed to load bundle extension manifest from path: %ls", m_sczBundleExtensionDataPath); - - hr = BextGetBundleExtensionDataNode(pixdManifest, NETFX_BUNDLE_EXTENSION_ID, &pixnBundleExtension); - BextExitOnFailure(hr, "Failed to get BundleExtension '%ls'", NETFX_BUNDLE_EXTENSION_ID); - - hr = NetfxSearchParseFromXml(&m_searches, pixnBundleExtension); - BextExitOnFailure(hr, "Failed to parse searches from bundle extension manifest."); - - LExit: - ReleaseObject(pixnBundleExtension); - ReleaseObject(pixdManifest); - ReleaseStr(sczModulePath); - - return hr; - } - -public: - CWixNetfxBundleExtension( - __in HINSTANCE hInstance, - __in IBundleExtensionEngine* pEngine - ) : CBextBaseBundleExtension(pEngine) - { - m_searches = { }; - m_hInstance = hInstance; - m_sczBaseDirectory = NULL; - } - - ~CWixNetfxBundleExtension() - { - NetfxSearchUninitialize(&m_searches); - ReleaseStr(m_sczBaseDirectory); - } - -private: - NETFX_SEARCHES m_searches; - HINSTANCE m_hInstance; - LPWSTR m_sczBaseDirectory; -}; - -HRESULT NetfxBundleExtensionCreate( - __in HINSTANCE hInstance, - __in IBundleExtensionEngine* pEngine, - __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, - __out IBundleExtension** ppBundleExtension - ) -{ - HRESULT hr = S_OK; - CWixNetfxBundleExtension* pExtension = NULL; - - pExtension = new CWixNetfxBundleExtension(hInstance, pEngine); - BextExitOnNull(pExtension, hr, E_OUTOFMEMORY, "Failed to create new CWixNetfxBundleExtension."); - - hr = pExtension->Initialize(pArgs); - BextExitOnFailure(hr, "CWixNetfxBundleExtension initialization failed."); - - *ppBundleExtension = pExtension; - pExtension = NULL; - -LExit: - ReleaseObject(pExtension); - return hr; -} diff --git a/src/ext/NetFx/be/NetfxBundleExtension.h b/src/ext/NetFx/be/NetfxBundleExtension.h deleted file mode 100644 index 0746dbed..00000000 --- a/src/ext/NetFx/be/NetfxBundleExtension.h +++ /dev/null @@ -1,17 +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. - - -// constants - -#define NETFX_BUNDLE_EXTENSION_ID BUNDLE_EXTENSION_DECORATION(L"NetfxBundleExtension") - - -// function declarations - -HRESULT NetfxBundleExtensionCreate( - __in HINSTANCE hInstance, - __in IBundleExtensionEngine* pEngine, - __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, - __out IBundleExtension** ppBundleExtension - ); diff --git a/src/ext/NetFx/be/detectnetcore.cpp b/src/ext/NetFx/be/detectnetcore.cpp index 3ed26549..c20cc831 100644 --- a/src/ext/NetFx/be/detectnetcore.cpp +++ b/src/ext/NetFx/be/detectnetcore.cpp @@ -45,7 +45,7 @@ LExit: HRESULT NetfxPerformDetectNetCore( __in LPCWSTR wzVariable, __in NETFX_SEARCH* pSearch, - __in IBundleExtensionEngine* pEngine, + __in IBootstrapperExtensionEngine* pEngine, __in LPCWSTR wzBaseDirectory ) { diff --git a/src/ext/NetFx/be/detectnetcore.h b/src/ext/NetFx/be/detectnetcore.h index ef93b39b..cd664b57 100644 --- a/src/ext/NetFx/be/detectnetcore.h +++ b/src/ext/NetFx/be/detectnetcore.h @@ -4,6 +4,6 @@ HRESULT NetfxPerformDetectNetCore( __in LPCWSTR wzVariable, __in NETFX_SEARCH* pSearch, - __in IBundleExtensionEngine* pEngine, + __in IBootstrapperExtensionEngine* pEngine, __in LPCWSTR wzBaseDirectory ); diff --git a/src/ext/NetFx/be/detectnetcoresdk.cpp b/src/ext/NetFx/be/detectnetcoresdk.cpp index 332d8712..03162eea 100644 --- a/src/ext/NetFx/be/detectnetcoresdk.cpp +++ b/src/ext/NetFx/be/detectnetcoresdk.cpp @@ -27,7 +27,7 @@ LExit: HRESULT NetfxPerformDetectNetCoreSdk( __in LPCWSTR wzVariable, __in NETFX_SEARCH* pSearch, - __in IBundleExtensionEngine* pEngine, + __in IBootstrapperExtensionEngine* pEngine, __in LPCWSTR wzBaseDirectory ) { diff --git a/src/ext/NetFx/be/detectnetcoresdk.h b/src/ext/NetFx/be/detectnetcoresdk.h index 025deaa2..0eef945a 100644 --- a/src/ext/NetFx/be/detectnetcoresdk.h +++ b/src/ext/NetFx/be/detectnetcoresdk.h @@ -4,6 +4,6 @@ HRESULT NetfxPerformDetectNetCoreSdk( __in LPCWSTR wzVariable, __in NETFX_SEARCH* pSearch, - __in IBundleExtensionEngine* pEngine, + __in IBootstrapperExtensionEngine* pEngine, __in LPCWSTR wzBaseDirectory ); diff --git a/src/ext/NetFx/be/detectnetcoresdkfeatureband.cpp b/src/ext/NetFx/be/detectnetcoresdkfeatureband.cpp index d48c7a85..eca61fad 100644 --- a/src/ext/NetFx/be/detectnetcoresdkfeatureband.cpp +++ b/src/ext/NetFx/be/detectnetcoresdkfeatureband.cpp @@ -29,7 +29,7 @@ LExit: HRESULT NetfxPerformDetectNetCoreSdkFeatureBand( __in LPCWSTR wzVariable, __in NETFX_SEARCH* pSearch, - __in IBundleExtensionEngine* pEngine, + __in IBootstrapperExtensionEngine* pEngine, __in LPCWSTR wzBaseDirectory ) { diff --git a/src/ext/NetFx/be/detectnetcoresdkfeatureband.h b/src/ext/NetFx/be/detectnetcoresdkfeatureband.h index 1f92cd58..d194c6b7 100644 --- a/src/ext/NetFx/be/detectnetcoresdkfeatureband.h +++ b/src/ext/NetFx/be/detectnetcoresdkfeatureband.h @@ -4,6 +4,6 @@ HRESULT NetfxPerformDetectNetCoreSdkFeatureBand( __in LPCWSTR wzVariable, __in NETFX_SEARCH* pSearch, - __in IBundleExtensionEngine* pEngine, + __in IBootstrapperExtensionEngine* pEngine, __in LPCWSTR wzBaseDirectory ); diff --git a/src/ext/NetFx/be/netfxbe.cpp b/src/ext/NetFx/be/netfxbe.cpp index 3a34cea3..72eda51a 100644 --- a/src/ext/NetFx/be/netfxbe.cpp +++ b/src/ext/NetFx/be/netfxbe.cpp @@ -1,10 +1,10 @@ // 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 "BextBaseBundleExtensionProc.h" +#include "BextBaseBootstrapperExtensionProc.h" static HINSTANCE vhInstance = NULL; -static IBundleExtension* vpBundleExtension = NULL; +static IBootstrapperExtension* vpBootstrapperExtension = NULL; // function definitions @@ -28,13 +28,13 @@ extern "C" BOOL WINAPI DllMain( return TRUE; } -extern "C" HRESULT WINAPI BundleExtensionCreate( - __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, - __inout BUNDLE_EXTENSION_CREATE_RESULTS* pResults +extern "C" HRESULT WINAPI BootstrapperExtensionCreate( + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pArgs, + __inout BOOTSTRAPPER_EXTENSION_CREATE_RESULTS* pResults ) { HRESULT hr = S_OK; - IBundleExtensionEngine* pEngine = NULL; + IBootstrapperExtensionEngine* pEngine = NULL; hr = XmlInitialize(); ExitOnFailure(hr, "Failed to initialize XML."); @@ -42,11 +42,11 @@ extern "C" HRESULT WINAPI BundleExtensionCreate( hr = BextInitializeFromCreateArgs(pArgs, &pEngine); ExitOnFailure(hr, "Failed to initialize bext"); - hr = NetfxBundleExtensionCreate(vhInstance, pEngine, pArgs, &vpBundleExtension); - BextExitOnFailure(hr, "Failed to create WixNetfxBundleExtension"); + hr = NetfxBootstrapperExtensionCreate(vhInstance, pEngine, pArgs, &vpBootstrapperExtension); + BextExitOnFailure(hr, "Failed to create WixNetfxBootstrapperExtension"); - pResults->pfnBundleExtensionProc = BextBaseBundleExtensionProc; - pResults->pvBundleExtensionProcContext = vpBundleExtension; + pResults->pfnBootstrapperExtensionProc = BextBaseBootstrapperExtensionProc; + pResults->pvBootstrapperExtensionProcContext = vpBootstrapperExtension; LExit: ReleaseObject(pEngine); @@ -54,9 +54,9 @@ LExit: return hr; } -extern "C" void WINAPI BundleExtensionDestroy() +extern "C" void WINAPI BootstrapperExtensionDestroy() { BextUninitialize(); - ReleaseNullObject(vpBundleExtension); + ReleaseNullObject(vpBootstrapperExtension); XmlUninitialize(); } diff --git a/src/ext/NetFx/be/netfxbe.def b/src/ext/NetFx/be/netfxbe.def index c6605241..2eeaf32c 100644 --- a/src/ext/NetFx/be/netfxbe.def +++ b/src/ext/NetFx/be/netfxbe.def @@ -4,5 +4,5 @@ LIBRARY "netfxbe" EXPORTS - BundleExtensionCreate - BundleExtensionDestroy + BootstrapperExtensionCreate + BootstrapperExtensionDestroy diff --git a/src/ext/NetFx/be/netfxbe.vcxproj b/src/ext/NetFx/be/netfxbe.vcxproj index 94026960..d157b64a 100644 --- a/src/ext/NetFx/be/netfxbe.vcxproj +++ b/src/ext/NetFx/be/netfxbe.vcxproj @@ -35,7 +35,7 @@ netfxbe Unicode netfxbe.def - WiX Toolset Netfx BundleExtension + WiX Toolset Netfx BootstrapperExtension @@ -50,7 +50,7 @@ - + Create @@ -62,7 +62,7 @@ - + @@ -73,7 +73,7 @@ - + diff --git a/src/ext/NetFx/be/netfxsearch.cpp b/src/ext/NetFx/be/netfxsearch.cpp index ffbf6ee0..38c34e3c 100644 --- a/src/ext/NetFx/be/netfxsearch.cpp +++ b/src/ext/NetFx/be/netfxsearch.cpp @@ -5,7 +5,7 @@ STDMETHODIMP NetfxSearchParseFromXml( __in NETFX_SEARCHES* pSearches, - __in IXMLDOMNode* pixnBundleExtension + __in IXMLDOMNode* pixnBootstrapperExtension ) { HRESULT hr = S_OK; @@ -15,7 +15,7 @@ STDMETHODIMP NetfxSearchParseFromXml( BSTR bstrNodeName = NULL; // Select Netfx search nodes. - hr = XmlSelectNodes(pixnBundleExtension, L"NetFxNetCoreSearch|NetFxNetCoreSdkSearch|NetFxNetCoreSdkFeatureBandSearch", &pixnNodes); + hr = XmlSelectNodes(pixnBootstrapperExtension, L"NetFxNetCoreSearch|NetFxNetCoreSdkSearch|NetFxNetCoreSdkFeatureBandSearch", &pixnNodes); BextExitOnFailure(hr, "Failed to select Netfx search nodes."); // Get Netfx search node count. @@ -135,7 +135,7 @@ STDMETHODIMP NetfxSearchExecute( __in NETFX_SEARCHES* pSearches, __in LPCWSTR wzSearchId, __in LPCWSTR wzVariable, - __in IBundleExtensionEngine* pEngine, + __in IBootstrapperExtensionEngine* pEngine, __in LPCWSTR wzBaseDirectory ) { diff --git a/src/ext/NetFx/be/netfxsearch.h b/src/ext/NetFx/be/netfxsearch.h index 5793dd55..f532a5a5 100644 --- a/src/ext/NetFx/be/netfxsearch.h +++ b/src/ext/NetFx/be/netfxsearch.h @@ -68,7 +68,7 @@ typedef struct _NETFX_SEARCHES STDMETHODIMP NetfxSearchParseFromXml( __in NETFX_SEARCHES* pSearches, - __in IXMLDOMNode* pixnBundleExtension + __in IXMLDOMNode* pixnBootstrapperExtension ); void NetfxSearchUninitialize( @@ -79,7 +79,7 @@ STDMETHODIMP NetfxSearchExecute( __in NETFX_SEARCHES* pSearches, __in LPCWSTR wzSearchId, __in LPCWSTR wzVariable, - __in IBundleExtensionEngine* pEngine, + __in IBootstrapperExtensionEngine* pEngine, __in LPCWSTR wzBaseDirectory ); diff --git a/src/ext/NetFx/be/precomp.h b/src/ext/NetFx/be/precomp.h index a0ae1038..a97b3c5e 100644 --- a/src/ext/NetFx/be/precomp.h +++ b/src/ext/NetFx/be/precomp.h @@ -20,12 +20,12 @@ #include #include -#include +#include #include "..\..\beDecor.h" #include "netfxsearch.h" #include "detectnetcore.h" #include "detectnetcoresdk.h" #include "detectnetcoresdkfeatureband.h" -#include "NetfxBundleExtension.h" +#include "NetfxBootstrapperExtension.h" #include "runnetcoresearch.h" diff --git a/src/ext/NetFx/wixext/NetFxCompiler.cs b/src/ext/NetFx/wixext/NetFxCompiler.cs index bfadbe07..70e83cc9 100644 --- a/src/ext/NetFx/wixext/NetFxCompiler.cs +++ b/src/ext/NetFx/wixext/NetFxCompiler.cs @@ -225,15 +225,15 @@ namespace WixToolset.Netfx this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - var bundleExtensionId = this.ParseHelper.CreateIdentifierValueFromPlatform("Wix4NetfxBundleExtension", this.Context.Platform, BurnPlatforms.X86 | BurnPlatforms.X64 | BurnPlatforms.ARM64); - if (bundleExtensionId == null) + var bootstrapperExtensionId = this.ParseHelper.CreateIdentifierValueFromPlatform("Wix4NetfxBootstrapperExtension", this.Context.Platform, BurnPlatforms.X86 | BurnPlatforms.X64 | BurnPlatforms.ARM64); + if (bootstrapperExtensionId == null) { this.Messaging.Write(ErrorMessages.UnsupportedPlatformForElement(sourceLineNumbers, this.Context.Platform.ToString(), element.Name.LocalName)); } if (!this.Messaging.EncounteredError) { - this.ParseHelper.CreateWixSearchSymbol(section, sourceLineNumbers, element.Name.LocalName, id, variable, condition, after, bundleExtensionId); + this.ParseHelper.CreateWixSearchSymbol(section, sourceLineNumbers, element.Name.LocalName, id, variable, condition, after, bootstrapperExtensionId); section.AddSymbol(new NetFxNetCoreSearchSymbol(sourceLineNumbers, id) { @@ -354,15 +354,15 @@ namespace WixToolset.Netfx this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - var bundleExtensionId = this.ParseHelper.CreateIdentifierValueFromPlatform("Wix4NetfxBundleExtension", this.Context.Platform, BurnPlatforms.X86 | BurnPlatforms.X64 | BurnPlatforms.ARM64); - if (bundleExtensionId == null) + var bootstrapperExtensionId = this.ParseHelper.CreateIdentifierValueFromPlatform("Wix4NetfxBootstrapperExtension", this.Context.Platform, BurnPlatforms.X86 | BurnPlatforms.X64 | BurnPlatforms.ARM64); + if (bootstrapperExtensionId == null) { this.Messaging.Write(ErrorMessages.UnsupportedPlatformForElement(sourceLineNumbers, this.Context.Platform.ToString(), element.Name.LocalName)); } if (!this.Messaging.EncounteredError) { - this.ParseHelper.CreateWixSearchSymbol(section, sourceLineNumbers, element.Name.LocalName, id, variable, condition, after, bundleExtensionId); + this.ParseHelper.CreateWixSearchSymbol(section, sourceLineNumbers, element.Name.LocalName, id, variable, condition, after, bootstrapperExtensionId); section.AddSymbol(new NetFxNetCoreSdkSearchSymbol(sourceLineNumbers, id) { @@ -503,15 +503,15 @@ namespace WixToolset.Netfx this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - var bundleExtensionId = this.ParseHelper.CreateIdentifierValueFromPlatform("Wix4NetfxBundleExtension", this.Context.Platform, BurnPlatforms.X86 | BurnPlatforms.X64 | BurnPlatforms.ARM64); - if (bundleExtensionId == null) + var bootstrapperExtensionId = this.ParseHelper.CreateIdentifierValueFromPlatform("Wix4NetfxBootstrapperExtension", this.Context.Platform, BurnPlatforms.X86 | BurnPlatforms.X64 | BurnPlatforms.ARM64); + if (bootstrapperExtensionId == null) { this.Messaging.Write(ErrorMessages.UnsupportedPlatformForElement(sourceLineNumbers, this.Context.Platform.ToString(), element.Name.LocalName)); } if (!this.Messaging.EncounteredError) { - this.ParseHelper.CreateWixSearchSymbol(section, sourceLineNumbers, element.Name.LocalName, id, variable, condition, after, bundleExtensionId); + this.ParseHelper.CreateWixSearchSymbol(section, sourceLineNumbers, element.Name.LocalName, id, variable, condition, after, bootstrapperExtensionId); section.AddSymbol(new NetFxNetCoreSdkFeatureBandSearchSymbol(sourceLineNumbers, id) { diff --git a/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs b/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs index 6371a951..cc25a3eb 100644 --- a/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs +++ b/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs @@ -53,9 +53,9 @@ namespace WixToolset.Netfx static NetfxSymbolDefinitions() { - NetFxNetCoreSearch.AddTag(BurnConstants.BundleExtensionSearchSymbolDefinitionTag); - NetFxNetCoreSdkSearch.AddTag(BurnConstants.BundleExtensionSearchSymbolDefinitionTag); - NetFxNetCoreSdkFeatureBandSearch.AddTag(BurnConstants.BundleExtensionSearchSymbolDefinitionTag); + NetFxNetCoreSearch.AddTag(BurnConstants.BootstrapperExtensionSearchSymbolDefinitionTag); + NetFxNetCoreSdkSearch.AddTag(BurnConstants.BootstrapperExtensionSearchSymbolDefinitionTag); + NetFxNetCoreSdkFeatureBandSearch.AddTag(BurnConstants.BootstrapperExtensionSearchSymbolDefinitionTag); } } } diff --git a/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_Platform.wxi b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_Platform.wxi new file mode 100644 index 00000000..98fbd523 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_Platform.wxi @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_arm64.wxs b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_arm64.wxs new file mode 100644 index 00000000..00b607a1 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_arm64.wxs @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_x64.wxs b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_x64.wxs new file mode 100644 index 00000000..a7412e60 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_x64.wxs @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_x86.wxs b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_x86.wxs new file mode 100644 index 00000000..406f6139 --- /dev/null +++ b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_x86.wxs @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/ext/NetFx/wixlib/NetfxBundleExtension_Platform.wxi b/src/ext/NetFx/wixlib/NetfxBundleExtension_Platform.wxi deleted file mode 100644 index bc332efc..00000000 --- a/src/ext/NetFx/wixlib/NetfxBundleExtension_Platform.wxi +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/ext/NetFx/wixlib/NetfxBundleExtension_arm64.wxs b/src/ext/NetFx/wixlib/NetfxBundleExtension_arm64.wxs deleted file mode 100644 index 13757dd8..00000000 --- a/src/ext/NetFx/wixlib/NetfxBundleExtension_arm64.wxs +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/ext/NetFx/wixlib/NetfxBundleExtension_x64.wxs b/src/ext/NetFx/wixlib/NetfxBundleExtension_x64.wxs deleted file mode 100644 index f6c27a8e..00000000 --- a/src/ext/NetFx/wixlib/NetfxBundleExtension_x64.wxs +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/ext/NetFx/wixlib/NetfxBundleExtension_x86.wxs b/src/ext/NetFx/wixlib/NetfxBundleExtension_x86.wxs deleted file mode 100644 index 76a8358f..00000000 --- a/src/ext/NetFx/wixlib/NetfxBundleExtension_x86.wxs +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/ext/Util/be/UtilBootstrapperExtension.cpp b/src/ext/Util/be/UtilBootstrapperExtension.cpp new file mode 100644 index 00000000..4d4d89c7 --- /dev/null +++ b/src/ext/Util/be/UtilBootstrapperExtension.cpp @@ -0,0 +1,87 @@ +// 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" + +class CWixUtilBootstrapperExtension : public CBextBaseBootstrapperExtension +{ +public: // IBootstrapperExtension + virtual STDMETHODIMP Search( + __in LPCWSTR wzId, + __in LPCWSTR wzVariable + ) + { + HRESULT hr = S_OK; + + hr = UtilSearchExecute(&m_searches, wzId, wzVariable, m_pEngine); + + return hr; + } + +public: //CBextBaseBootstrapperExtension + virtual STDMETHODIMP Initialize( + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pCreateArgs + ) + { + HRESULT hr = S_OK; + IXMLDOMDocument* pixdManifest = NULL; + IXMLDOMNode* pixnBootstrapperExtension = NULL; + + hr = __super::Initialize(pCreateArgs); + BextExitOnFailure(hr, "CBextBaseBootstrapperExtension initialization failed."); + + hr = XmlLoadDocumentFromFile(m_sczBootstrapperExtensionDataPath, &pixdManifest); + BextExitOnFailure(hr, "Failed to load bundle extension manifest from path: %ls", m_sczBootstrapperExtensionDataPath); + + hr = BextGetBootstrapperExtensionDataNode(pixdManifest, UTIL_BOOTSTRAPPER_EXTENSION_ID, &pixnBootstrapperExtension); + BextExitOnFailure(hr, "Failed to get BootstrapperExtension '%ls'", UTIL_BOOTSTRAPPER_EXTENSION_ID); + + hr = UtilSearchParseFromXml(&m_searches, pixnBootstrapperExtension); + BextExitOnFailure(hr, "Failed to parse searches from bundle extension manifest."); + + LExit: + ReleaseObject(pixnBootstrapperExtension); + ReleaseObject(pixdManifest); + + return hr; + } + +public: + CWixUtilBootstrapperExtension( + __in IBootstrapperExtensionEngine* pEngine + ) : CBextBaseBootstrapperExtension(pEngine) + { + m_searches = { }; + } + + ~CWixUtilBootstrapperExtension() + { + UtilSearchUninitialize(&m_searches); + } + +private: + UTIL_SEARCHES m_searches; +}; + +HRESULT UtilBootstrapperExtensionCreate( + __in IBootstrapperExtensionEngine* pEngine, + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pArgs, + __out IBootstrapperExtension** ppBootstrapperExtension + ) +{ + HRESULT hr = S_OK; + CWixUtilBootstrapperExtension* pExtension = NULL; + + pExtension = new CWixUtilBootstrapperExtension(pEngine); + BextExitOnNull(pExtension, hr, E_OUTOFMEMORY, "Failed to create new CWixUtilBootstrapperExtension."); + + hr = pExtension->Initialize(pArgs); + BextExitOnFailure(hr, "CWixUtilBootstrapperExtension initialization failed."); + + *ppBootstrapperExtension = pExtension; + pExtension = NULL; + +LExit: + ReleaseObject(pExtension); + return hr; +} diff --git a/src/ext/Util/be/UtilBootstrapperExtension.h b/src/ext/Util/be/UtilBootstrapperExtension.h new file mode 100644 index 00000000..32cabb89 --- /dev/null +++ b/src/ext/Util/be/UtilBootstrapperExtension.h @@ -0,0 +1,16 @@ +#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. + + +// constants + +#define UTIL_BOOTSTRAPPER_EXTENSION_ID BOOTSTRAPPER_EXTENSION_DECORATION(L"UtilBootstrapperExtension") + + +// function declarations + +HRESULT UtilBootstrapperExtensionCreate( + __in IBootstrapperExtensionEngine* pEngine, + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pArgs, + __out IBootstrapperExtension** ppBootstrapperExtension + ); 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 @@ -// 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" - -class CWixUtilBundleExtension : public CBextBaseBundleExtension -{ -public: // IBundleExtension - virtual STDMETHODIMP Search( - __in LPCWSTR wzId, - __in LPCWSTR wzVariable - ) - { - HRESULT hr = S_OK; - - hr = UtilSearchExecute(&m_searches, wzId, wzVariable, m_pEngine); - - return hr; - } - -public: //CBextBaseBundleExtension - virtual STDMETHODIMP Initialize( - __in const BUNDLE_EXTENSION_CREATE_ARGS* pCreateArgs - ) - { - HRESULT hr = S_OK; - IXMLDOMDocument* pixdManifest = NULL; - IXMLDOMNode* pixnBundleExtension = NULL; - - hr = __super::Initialize(pCreateArgs); - BextExitOnFailure(hr, "CBextBaseBundleExtension initialization failed."); - - hr = XmlLoadDocumentFromFile(m_sczBundleExtensionDataPath, &pixdManifest); - BextExitOnFailure(hr, "Failed to load bundle extension manifest from path: %ls", m_sczBundleExtensionDataPath); - - hr = BextGetBundleExtensionDataNode(pixdManifest, UTIL_BUNDLE_EXTENSION_ID, &pixnBundleExtension); - BextExitOnFailure(hr, "Failed to get BundleExtension '%ls'", UTIL_BUNDLE_EXTENSION_ID); - - hr = UtilSearchParseFromXml(&m_searches, pixnBundleExtension); - BextExitOnFailure(hr, "Failed to parse searches from bundle extension manifest."); - - LExit: - ReleaseObject(pixnBundleExtension); - ReleaseObject(pixdManifest); - - return hr; - } - -public: - CWixUtilBundleExtension( - __in IBundleExtensionEngine* pEngine - ) : CBextBaseBundleExtension(pEngine) - { - m_searches = { }; - } - - ~CWixUtilBundleExtension() - { - UtilSearchUninitialize(&m_searches); - } - -private: - UTIL_SEARCHES m_searches; -}; - -HRESULT UtilBundleExtensionCreate( - __in IBundleExtensionEngine* pEngine, - __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, - __out IBundleExtension** ppBundleExtension - ) -{ - HRESULT hr = S_OK; - CWixUtilBundleExtension* pExtension = NULL; - - pExtension = new CWixUtilBundleExtension(pEngine); - BextExitOnNull(pExtension, hr, E_OUTOFMEMORY, "Failed to create new CWixUtilBundleExtension."); - - hr = pExtension->Initialize(pArgs); - BextExitOnFailure(hr, "CWixUtilBundleExtension initialization failed."); - - *ppBundleExtension = pExtension; - pExtension = NULL; - -LExit: - ReleaseObject(pExtension); - return hr; -} diff --git a/src/ext/Util/be/UtilBundleExtension.h b/src/ext/Util/be/UtilBundleExtension.h deleted file mode 100644 index c55d6b85..00000000 --- a/src/ext/Util/be/UtilBundleExtension.h +++ /dev/null @@ -1,16 +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. - - -// constants - -#define UTIL_BUNDLE_EXTENSION_ID BUNDLE_EXTENSION_DECORATION(L"UtilBundleExtension") - - -// function declarations - -HRESULT UtilBundleExtensionCreate( - __in IBundleExtensionEngine* pEngine, - __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, - __out IBundleExtension** ppBundleExtension - ); diff --git a/src/ext/Util/be/detectsha2support.cpp b/src/ext/Util/be/detectsha2support.cpp index 4abfc63c..c7175a47 100644 --- a/src/ext/Util/be/detectsha2support.cpp +++ b/src/ext/Util/be/detectsha2support.cpp @@ -41,7 +41,7 @@ LExit: HRESULT UtilPerformDetectSHA2CodeSigning( __in LPCWSTR wzVariable, __in UTIL_SEARCH* /*pSearch*/, - __in IBundleExtensionEngine* pEngine + __in IBootstrapperExtensionEngine* pEngine ) { HRESULT hr = S_OK; diff --git a/src/ext/Util/be/detectsha2support.h b/src/ext/Util/be/detectsha2support.h index c38a3d59..b387a3ea 100644 --- a/src/ext/Util/be/detectsha2support.h +++ b/src/ext/Util/be/detectsha2support.h @@ -4,5 +4,5 @@ HRESULT UtilPerformDetectSHA2CodeSigning( __in LPCWSTR wzVariable, __in UTIL_SEARCH* pSearch, - __in IBundleExtensionEngine* pEngine - ); \ No newline at end of file + __in IBootstrapperExtensionEngine* pEngine + ); diff --git a/src/ext/Util/be/precomp.h b/src/ext/Util/be/precomp.h index d04bf305..0cf0c761 100644 --- a/src/ext/Util/be/precomp.h +++ b/src/ext/Util/be/precomp.h @@ -24,9 +24,9 @@ #include #include -#include +#include #include "..\..\beDecor.h" #include "utilsearch.h" #include "detectsha2support.h" -#include "UtilBundleExtension.h" +#include "UtilBootstrapperExtension.h" diff --git a/src/ext/Util/be/utilbe.cpp b/src/ext/Util/be/utilbe.cpp index d9816dc7..b4e6fda3 100644 --- a/src/ext/Util/be/utilbe.cpp +++ b/src/ext/Util/be/utilbe.cpp @@ -1,19 +1,19 @@ // 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 "BextBaseBundleExtensionProc.h" +#include "BextBaseBootstrapperExtensionProc.h" -static IBundleExtension* vpBundleExtension = NULL; +static IBootstrapperExtension* vpBootstrapperExtension = NULL; // function definitions -extern "C" HRESULT WINAPI BundleExtensionCreate( - __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, - __inout BUNDLE_EXTENSION_CREATE_RESULTS* pResults +extern "C" HRESULT WINAPI BootstrapperExtensionCreate( + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pArgs, + __inout BOOTSTRAPPER_EXTENSION_CREATE_RESULTS* pResults ) { HRESULT hr = S_OK; - IBundleExtensionEngine* pEngine = NULL; + IBootstrapperExtensionEngine* pEngine = NULL; hr = XmlInitialize(); ExitOnFailure(hr, "Failed to initialize XML."); @@ -21,11 +21,11 @@ extern "C" HRESULT WINAPI BundleExtensionCreate( hr = BextInitializeFromCreateArgs(pArgs, &pEngine); ExitOnFailure(hr, "Failed to initialize bext"); - hr = UtilBundleExtensionCreate(pEngine, pArgs, &vpBundleExtension); - BextExitOnFailure(hr, "Failed to create WixUtilBundleExtension"); + hr = UtilBootstrapperExtensionCreate(pEngine, pArgs, &vpBootstrapperExtension); + BextExitOnFailure(hr, "Failed to create WixUtilBootstrapperExtension"); - pResults->pfnBundleExtensionProc = BextBaseBundleExtensionProc; - pResults->pvBundleExtensionProcContext = vpBundleExtension; + pResults->pfnBootstrapperExtensionProc = BextBaseBootstrapperExtensionProc; + pResults->pvBootstrapperExtensionProcContext = vpBootstrapperExtension; LExit: ReleaseObject(pEngine); @@ -33,9 +33,9 @@ LExit: return hr; } -extern "C" void WINAPI BundleExtensionDestroy() +extern "C" void WINAPI BootstrapperExtensionDestroy() { BextUninitialize(); - ReleaseNullObject(vpBundleExtension); + ReleaseNullObject(vpBootstrapperExtension); XmlUninitialize(); -} \ No newline at end of file +} diff --git a/src/ext/Util/be/utilbe.def b/src/ext/Util/be/utilbe.def index 711b1a5c..b4e7e893 100644 --- a/src/ext/Util/be/utilbe.def +++ b/src/ext/Util/be/utilbe.def @@ -4,5 +4,5 @@ LIBRARY "utilbe" EXPORTS - BundleExtensionCreate - BundleExtensionDestroy + BootstrapperExtensionCreate + BootstrapperExtensionDestroy diff --git a/src/ext/Util/be/utilbe.vcxproj b/src/ext/Util/be/utilbe.vcxproj index d2697bbd..df06cb46 100644 --- a/src/ext/Util/be/utilbe.vcxproj +++ b/src/ext/Util/be/utilbe.vcxproj @@ -35,7 +35,7 @@ utilbe Unicode utilbe.def - WiX Toolset Util BundleExtension + WiX Toolset Util BootstrapperExtension @@ -51,14 +51,14 @@ Create - + - + @@ -67,7 +67,7 @@ - + diff --git a/src/ext/Util/be/utilsearch.cpp b/src/ext/Util/be/utilsearch.cpp index 20a514d8..59c497e3 100644 --- a/src/ext/Util/be/utilsearch.cpp +++ b/src/ext/Util/be/utilsearch.cpp @@ -5,7 +5,7 @@ STDMETHODIMP UtilSearchParseFromXml( __in UTIL_SEARCHES* pSearches, - __in IXMLDOMNode* pixnBundleExtension + __in IXMLDOMNode* pixnBootstrapperExtension ) { HRESULT hr = S_OK; @@ -16,7 +16,7 @@ STDMETHODIMP UtilSearchParseFromXml( LPWSTR scz = NULL; // Select Util search nodes. - hr = XmlSelectNodes(pixnBundleExtension, L"WixWindowsFeatureSearch", &pixnNodes); + hr = XmlSelectNodes(pixnBootstrapperExtension, L"WixWindowsFeatureSearch", &pixnNodes); BextExitOnFailure(hr, "Failed to select Util search nodes."); // Get Util search node count. @@ -103,7 +103,7 @@ STDMETHODIMP UtilSearchExecute( __in UTIL_SEARCHES* pSearches, __in LPCWSTR wzSearchId, __in LPCWSTR wzVariable, - __in IBundleExtensionEngine* pEngine + __in IBootstrapperExtensionEngine* pEngine ) { HRESULT hr = S_OK; diff --git a/src/ext/Util/be/utilsearch.h b/src/ext/Util/be/utilsearch.h index deeab1f7..d19e240f 100644 --- a/src/ext/Util/be/utilsearch.h +++ b/src/ext/Util/be/utilsearch.h @@ -44,7 +44,7 @@ typedef struct _UTIL_SEARCHES STDMETHODIMP UtilSearchParseFromXml( __in UTIL_SEARCHES* pSearches, - __in IXMLDOMNode* pixnBundleExtension + __in IXMLDOMNode* pixnBootstrapperExtension ); void UtilSearchUninitialize( @@ -55,7 +55,7 @@ STDMETHODIMP UtilSearchExecute( __in UTIL_SEARCHES* pSearches, __in LPCWSTR wzSearchId, __in LPCWSTR wzVariable, - __in IBundleExtensionEngine* pEngine + __in IBootstrapperExtensionEngine* pEngine ); STDMETHODIMP UtilSearchFindById( diff --git a/src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs b/src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs index 06e70dcf..0a93f3a4 100644 --- a/src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs +++ b/src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs @@ -372,11 +372,11 @@ namespace WixToolsetTest.Util var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath); extractResult.AssertSuccess(); - var bundleExtensionDatas = extractResult.SelectBundleExtensionDataNodes("/be:BundleExtensionData/be:BundleExtension[@Id='Wix4UtilBundleExtension_X86']"); - Assert.Equal(1, bundleExtensionDatas.Count); - Assert.Equal("" + + var bootstrapperExtensionDatas = extractResult.SelectBootstrapperExtensionDataNodes("/be:BootstrapperExtensionData/be:BootstrapperExtension[@Id='Wix4UtilBootstrapperExtension_X86']"); + Assert.Equal(1, bootstrapperExtensionDatas.Count); + Assert.Equal("" + "" + - "", bundleExtensionDatas[0].GetTestXml()); + "", bootstrapperExtensionDatas[0].GetTestXml()); var utilSearches = extractResult.SelectManifestNodes("/burn:BurnManifest/*[self::burn:ExtensionSearch or self::burn:DirectorySearch or self::burn:FileSearch or self::burn:MsiProductSearch or self::burn:RegistrySearch]") .Cast() @@ -384,7 +384,7 @@ namespace WixToolsetTest.Util .ToArray(); WixAssert.CompareLineByLine(new[] { - @"", + @"", @"", @"", @"", diff --git a/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs b/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs index 3b357a96..8152868f 100644 --- a/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs +++ b/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs @@ -94,7 +94,7 @@ namespace WixToolset.Util case UtilSymbolDefinitionType.WixRemoveRegistryKeyEx: return UtilSymbolDefinitions.WixRemoveRegistryKeyEx; - + case UtilSymbolDefinitionType.WixRestartResource: return UtilSymbolDefinitions.WixRestartResource; @@ -117,7 +117,7 @@ namespace WixToolset.Util static UtilSymbolDefinitions() { - WixWindowsFeatureSearch.AddTag(BurnConstants.BundleExtensionSearchSymbolDefinitionTag); + WixWindowsFeatureSearch.AddTag(BurnConstants.BootstrapperExtensionSearchSymbolDefinitionTag); } } } diff --git a/src/ext/Util/wixext/UtilCompiler.cs b/src/ext/Util/wixext/UtilCompiler.cs index 6221c052..3bcd2c0b 100644 --- a/src/ext/Util/wixext/UtilCompiler.cs +++ b/src/ext/Util/wixext/UtilCompiler.cs @@ -611,15 +611,15 @@ namespace WixToolset.Util this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); - var bundleExtensionId = this.ParseHelper.CreateIdentifierValueFromPlatform("Wix4UtilBundleExtension", this.Context.Platform, BurnPlatforms.X86 | BurnPlatforms.X64 | BurnPlatforms.ARM64); - if (bundleExtensionId == null) + var bootstrapperExtensionId = this.ParseHelper.CreateIdentifierValueFromPlatform("Wix4UtilBootstrapperExtension", this.Context.Platform, BurnPlatforms.X86 | BurnPlatforms.X64 | BurnPlatforms.ARM64); + if (bootstrapperExtensionId == null) { this.Messaging.Write(ErrorMessages.UnsupportedPlatformForElement(sourceLineNumbers, this.Context.Platform.ToString(), element.Name.LocalName)); } if (!this.Messaging.EncounteredError) { - this.ParseHelper.CreateWixSearchSymbol(section, sourceLineNumbers, element.Name.LocalName, id, variable, condition, after, bundleExtensionId); + this.ParseHelper.CreateWixSearchSymbol(section, sourceLineNumbers, element.Name.LocalName, id, variable, condition, after, bootstrapperExtensionId); section.AddSymbol(new WixWindowsFeatureSearchSymbol(sourceLineNumbers, id) { diff --git a/src/ext/Util/wixlib/UtilBootstrapperExtension_Platform.wxi b/src/ext/Util/wixlib/UtilBootstrapperExtension_Platform.wxi new file mode 100644 index 00000000..cbaf3f56 --- /dev/null +++ b/src/ext/Util/wixlib/UtilBootstrapperExtension_Platform.wxi @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/ext/Util/wixlib/UtilBootstrapperExtension_arm64.wxs b/src/ext/Util/wixlib/UtilBootstrapperExtension_arm64.wxs new file mode 100644 index 00000000..093de00d --- /dev/null +++ b/src/ext/Util/wixlib/UtilBootstrapperExtension_arm64.wxs @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/ext/Util/wixlib/UtilBootstrapperExtension_x64.wxs b/src/ext/Util/wixlib/UtilBootstrapperExtension_x64.wxs new file mode 100644 index 00000000..e778fc42 --- /dev/null +++ b/src/ext/Util/wixlib/UtilBootstrapperExtension_x64.wxs @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/ext/Util/wixlib/UtilBootstrapperExtension_x86.wxs b/src/ext/Util/wixlib/UtilBootstrapperExtension_x86.wxs new file mode 100644 index 00000000..101cf089 --- /dev/null +++ b/src/ext/Util/wixlib/UtilBootstrapperExtension_x86.wxs @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/ext/Util/wixlib/UtilBundleExtension_Platform.wxi b/src/ext/Util/wixlib/UtilBundleExtension_Platform.wxi deleted file mode 100644 index 5c964d7d..00000000 --- a/src/ext/Util/wixlib/UtilBundleExtension_Platform.wxi +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/src/ext/Util/wixlib/UtilBundleExtension_arm64.wxs b/src/ext/Util/wixlib/UtilBundleExtension_arm64.wxs deleted file mode 100644 index b17be031..00000000 --- a/src/ext/Util/wixlib/UtilBundleExtension_arm64.wxs +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/ext/Util/wixlib/UtilBundleExtension_x64.wxs b/src/ext/Util/wixlib/UtilBundleExtension_x64.wxs deleted file mode 100644 index 96c85a5b..00000000 --- a/src/ext/Util/wixlib/UtilBundleExtension_x64.wxs +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/ext/Util/wixlib/UtilBundleExtension_x86.wxs b/src/ext/Util/wixlib/UtilBundleExtension_x86.wxs deleted file mode 100644 index 3b458687..00000000 --- a/src/ext/Util/wixlib/UtilBundleExtension_x86.wxs +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/ext/beDecor.h b/src/ext/beDecor.h index 2c6a8818..ecd90599 100644 --- a/src/ext/beDecor.h +++ b/src/ext/beDecor.h @@ -3,11 +3,11 @@ #if defined(_M_ARM64) -#define BUNDLE_EXTENSION_DECORATION(f) L"Wix4" f L"_A64" +#define BOOTSTRAPPER_EXTENSION_DECORATION(f) L"Wix4" f L"_A64" #elif defined(_M_AMD64) -#define BUNDLE_EXTENSION_DECORATION(f) L"Wix4" f L"_X64" +#define BOOTSTRAPPER_EXTENSION_DECORATION(f) L"Wix4" f L"_X64" #elif defined(_M_ARM) -#define BUNDLE_EXTENSION_DECORATION(f) L"Wix4" f L"_ARM" +#define BOOTSTRAPPER_EXTENSION_DECORATION(f) L"Wix4" f L"_ARM" #else -#define BUNDLE_EXTENSION_DECORATION(f) L"Wix4" f L"_X86" +#define BOOTSTRAPPER_EXTENSION_DECORATION(f) L"Wix4" f L"_X86" #endif -- cgit v1.2.3-55-g6feb