From 5baa1dfe8ba2a3bd4728bca118fe1de225f848d4 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Thu, 7 Mar 2024 09:41:29 -0800 Subject: [PATCH] Rename "bundle extension" to "bootstrapper extension" for more consistency Also renames WixToolet.BextUtil nupkg to WixToolset.BootstrapperExtensionApi. --- src/api/api.cmd | 2 + ...pp => BextBootstrapperExtensionEngine.cpp} | 116 +++++----- src/api/burn/bextutil/bextutil.cpp | 46 ++-- src/api/burn/bextutil/bextutil.nuspec | 4 +- src/api/burn/bextutil/bextutil.vcxproj | 16 +- ...WixToolset.BootstrapperExtensionApi.props} | 0 ...sion.h => BextBaseBootstrapperExtension.h} | 34 +-- .../inc/BextBaseBootstrapperExtensionProc.h | 46 ++++ .../inc/BextBaseBundleExtensionProc.h | 46 ---- ...ne.h => BextBootstrapperExtensionEngine.h} | 10 +- .../bextutil/inc/IBootstrapperExtension.h | 21 ++ ...ngine.h => IBootstrapperExtensionEngine.h} | 6 +- src/api/burn/bextutil/inc/IBundleExtension.h | 21 -- src/api/burn/bextutil/inc/bextutil.h | 24 +-- src/api/burn/bextutil/precomp.h | 2 +- src/api/burn/inc/BootstrapperExtension.h | 61 ++++++ .../burn/inc/BootstrapperExtensionEngine.h | 200 ++++++++++++++++++ src/api/burn/inc/BundleExtension.h | 61 ------ src/api/burn/inc/BundleExtensionEngine.h | 200 ------------------ .../BextUtilUnitTest/BextUtilUnitTest.vcxproj | 6 +- .../BextUtilUnitTest.vcxproj.filters | 8 +- ...sts.cpp => BootstrapperExtensionTests.cpp} | 18 +- .../TestBootstrapperExtension.cpp | 42 ++++ .../TestBootstrapperExtension.h | 9 + .../BextUtilUnitTest/TestBundleExtension.cpp | 42 ---- .../BextUtilUnitTest/TestBundleExtension.h | 9 - src/api/burn/test/BextUtilUnitTest/precomp.h | 2 +- .../wix/WixToolset.Data/Burn/BurnConstants.cs | 6 +- .../Symbols/SymbolDefinitions.cs | 6 +- .../Symbols/WixBootstrapperExtensionSymbol.cs | 44 ++++ .../Symbols/WixBundleCustomDataSymbol.cs | 12 +- .../Symbols/WixBundleExtensionSymbol.cs | 44 ---- .../Symbols/WixSearchSymbol.cs | 12 +- .../Services/IBurnBackendHelper.cs | 8 +- .../Services/IParseHelper.cs | 4 +- src/burn/engine/EngineForExtension.cpp | 82 +++---- src/burn/engine/EngineForExtension.h | 2 +- src/burn/engine/burnextension.cpp | 88 ++++---- src/burn/engine/burnextension.h | 2 +- src/burn/engine/engine.cpp | 2 +- src/burn/engine/engine.vcxproj | 4 +- src/burn/engine/precomp.h | 2 +- .../BasicFunctionality_BundleA_manifest.xml | 4 +- .../BundlePackage_Multiple_manifest.xml | 4 +- .../ExePackage_PerUserArpEntry_manifest.xml | 4 +- .../PlanTest/Failure_BundleD_manifest.xml | 4 +- .../MsiTransaction_BundleAv1_manifest.xml | 4 +- .../PlanTest/MsuPackageFixture_manifest.xml | 4 +- .../PlanTest/Slipstream_BundleA_manifest.xml | 4 +- .../Slipstream_BundleA_modified_manifest.xml | 4 +- src/burn/test/BurnUnitTest/precomp.h | 2 +- src/clean.cmd | 1 + ...ion.cpp => NetfxBootstrapperExtension.cpp} | 52 ++--- src/ext/NetFx/be/NetfxBootstrapperExtension.h | 17 ++ 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 +- .../NetFx/be/detectnetcoresdkfeatureband.cpp | 2 +- .../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 +- .../wixext/Symbols/NetfxSymbolDefinitions.cs | 6 +- ...> NetfxBootstrapperExtension_Platform.wxi} | 8 +- ...s => NetfxBootstrapperExtension_arm64.wxs} | 2 +- .../NetfxBootstrapperExtension_x64.wxs} | 2 +- ...wxs => NetfxBootstrapperExtension_x86.wxs} | 2 +- 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 +- .../UtilExtensionFixture.cs | 10 +- .../wixext/Symbols/UtilSymbolDefinitions.cs | 4 +- src/ext/Util/wixext/UtilCompiler.cs | 6 +- ...=> UtilBootstrapperExtension_Platform.wxi} | 2 +- ...xs => UtilBootstrapperExtension_arm64.wxs} | 2 +- .../wixlib/UtilBootstrapperExtension_x64.wxs} | 2 +- ....wxs => UtilBootstrapperExtension_x86.wxs} | 2 +- src/ext/beDecor.h | 8 +- .../Directory.Packages.props.pp | 13 +- .../BundleExtractor.cs | 16 +- .../ExtractBAContainerResult.cs | 34 +-- .../Bind/BaseSearchFacade.cs | 4 +- .../Bind/BindBundleCommand.cs | 6 +- .../Bind/GenerateManifestDataFromIRCommand.cs | 14 +- .../Bundles/BurnCommon.cs | 6 +- ...teBootstrapperExtensionManifestCommand.cs} | 22 +- .../Bundles/CreateBurnManifestCommand.cs | 12 +- .../Bundles/OrderSearchesCommand.cs | 6 +- .../BurnBackendHelper.cs | 24 +-- .../IInternalBurnBackendHelper.cs | 2 +- src/wix/WixToolset.Core/Compiler.cs | 8 +- src/wix/WixToolset.Core/Compiler_Bundle.cs | 35 +-- .../ExtensibilityServices/ParseHelper.cs | 8 +- .../test/Example.Extension/Data/example.wxs | 2 +- .../ExampleCompilerExtension.cs | 4 +- .../ExampleSymbolDefinitions.cs | 2 +- .../BundleFixture.cs | 6 +- .../BundleManifestFixture.cs | 46 ++-- .../BadInput/DuplicatePayloadNames.wxs | 2 +- .../BootstrapperExtension.wxs} | 2 +- .../BootstrapperExtensionSearches.wxs} | 0 .../BundleWithSearches.wxs | 0 .../SimpleBootstrapperExtension.wxs} | 2 +- .../BundleCustomTable/BundleCustomTable.wxs | 2 +- 119 files changed, 1082 insertions(+), 1087 deletions(-) rename src/api/burn/bextutil/{BextBundleExtensionEngine.cpp => BextBootstrapperExtensionEngine.cpp} (55%) rename src/api/burn/bextutil/build/{WixToolset.BextUtil.props => WixToolset.BootstrapperExtensionApi.props} (100%) rename src/api/burn/bextutil/inc/{BextBaseBundleExtension.h => BextBaseBootstrapperExtension.h} (64%) create mode 100644 src/api/burn/bextutil/inc/BextBaseBootstrapperExtensionProc.h delete mode 100644 src/api/burn/bextutil/inc/BextBaseBundleExtensionProc.h rename src/api/burn/bextutil/inc/{BextBundleExtensionEngine.h => BextBootstrapperExtensionEngine.h} (50%) create mode 100644 src/api/burn/bextutil/inc/IBootstrapperExtension.h rename src/api/burn/bextutil/inc/{IBundleExtensionEngine.h => IBootstrapperExtensionEngine.h} (90%) delete mode 100644 src/api/burn/bextutil/inc/IBundleExtension.h create mode 100644 src/api/burn/inc/BootstrapperExtension.h create mode 100644 src/api/burn/inc/BootstrapperExtensionEngine.h delete mode 100644 src/api/burn/inc/BundleExtension.h delete mode 100644 src/api/burn/inc/BundleExtensionEngine.h rename src/api/burn/test/BextUtilUnitTest/{BundleExtensionTests.cpp => BootstrapperExtensionTests.cpp} (62%) 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 create mode 100644 src/api/wix/WixToolset.Data/Symbols/WixBootstrapperExtensionSymbol.cs delete mode 100644 src/api/wix/WixToolset.Data/Symbols/WixBundleExtensionSymbol.cs rename src/ext/NetFx/be/{NetfxBundleExtension.cpp => NetfxBootstrapperExtension.cpp} (53%) create mode 100644 src/ext/NetFx/be/NetfxBootstrapperExtension.h delete mode 100644 src/ext/NetFx/be/NetfxBundleExtension.h rename src/ext/NetFx/wixlib/{NetfxBundleExtension_Platform.wxi => NetfxBootstrapperExtension_Platform.wxi} (52%) rename src/ext/NetFx/wixlib/{NetfxBundleExtension_arm64.wxs => NetfxBootstrapperExtension_arm64.wxs} (83%) rename src/ext/{Util/wixlib/UtilBundleExtension_x64.wxs => NetFx/wixlib/NetfxBootstrapperExtension_x64.wxs} (83%) rename src/ext/NetFx/wixlib/{NetfxBundleExtension_x86.wxs => NetfxBootstrapperExtension_x86.wxs} (83%) 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 rename src/ext/Util/wixlib/{UtilBundleExtension_Platform.wxi => UtilBootstrapperExtension_Platform.wxi} (60%) rename src/ext/Util/wixlib/{UtilBundleExtension_arm64.wxs => UtilBootstrapperExtension_arm64.wxs} (83%) rename src/ext/{NetFx/wixlib/NetfxBundleExtension_x64.wxs => Util/wixlib/UtilBootstrapperExtension_x64.wxs} (83%) rename src/ext/Util/wixlib/{UtilBundleExtension_x86.wxs => UtilBootstrapperExtension_x86.wxs} (83%) rename src/wix/WixToolset.Core.Burn/Bundles/{CreateBundleExtensionManifestCommand.cs => CreateBootstrapperExtensionManifestCommand.cs} (72%) rename src/wix/test/WixToolsetTest.CoreIntegration/TestData/{BundleExtension/BundleExtension.wxs => BootstrapperExtension/BootstrapperExtension.wxs} (57%) rename src/wix/test/WixToolsetTest.CoreIntegration/TestData/{BundleExtension/BundleExtensionSearches.wxs => BootstrapperExtension/BootstrapperExtensionSearches.wxs} (100%) rename src/wix/test/WixToolsetTest.CoreIntegration/TestData/{BundleExtension => BootstrapperExtension}/BundleWithSearches.wxs (100%) rename src/wix/test/WixToolsetTest.CoreIntegration/TestData/{BundleExtension/SimpleBundleExtension.wxs => BootstrapperExtension/SimpleBootstrapperExtension.wxs} (82%) diff --git a/src/api/api.cmd b/src/api/api.cmd index 42453449a..cae0cf5a3 100644 --- a/src/api/api.cmd +++ b/src/api/api.cmd @@ -41,11 +41,13 @@ dotnet test ^ @del "..\..\build\artifacts\WixToolset.Data.*.nupkg" 2> nul @del "..\..\build\artifacts\WixToolset.Extensibility.*.nupkg" 2> nul @del "..\..\build\artifacts\WixToolset.BootstrapperApplicationApi.*.nupkg" 2> nul +@del "..\..\build\artifacts\WixToolset.BootstrapperExtensionApi.*.nupkg" 2> nul @del "%_L%\TestResults\api.trx" 2> nul @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bextutil" 2> nul @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.data" 2> nul @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.extensibility" 2> nul @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bootstrapperapplicationapi" 2> nul +@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bootstrapperextensionapi" 2> nul @exit /b :end diff --git a/src/api/burn/bextutil/BextBundleExtensionEngine.cpp b/src/api/burn/bextutil/BextBootstrapperExtensionEngine.cpp similarity index 55% rename from src/api/burn/bextutil/BextBundleExtensionEngine.cpp rename to src/api/burn/bextutil/BextBootstrapperExtensionEngine.cpp index 2c8548178..a5e40c8e8 100644 --- a/src/api/burn/bextutil/BextBundleExtensionEngine.cpp +++ b/src/api/burn/bextutil/BextBootstrapperExtensionEngine.cpp @@ -3,7 +3,7 @@ #include "precomp.h" -class CBextBundleExtensionEngine : public IBundleExtensionEngine +class CBextBootstrapperExtensionEngine : public IBootstrapperExtensionEngine { public: // IUnknown virtual STDMETHODIMP QueryInterface( @@ -18,9 +18,9 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine *ppvObject = NULL; - if (::IsEqualIID(__uuidof(IBundleExtensionEngine), riid)) + if (::IsEqualIID(__uuidof(IBootstrapperExtensionEngine), riid)) { - *ppvObject = static_cast(this); + *ppvObject = static_cast(this); } else if (::IsEqualIID(IID_IUnknown, riid)) { @@ -52,7 +52,7 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine return 0; } -public: // IBundleExtensionEngine +public: // IBootstrapperExtensionEngine virtual STDMETHODIMP EscapeString( __in_z LPCWSTR wzIn, __out_ecount_opt(*pcchOut) LPWSTR wzOut, @@ -60,8 +60,8 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine ) { HRESULT hr = S_OK; - BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_ARGS args = { }; - BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_RESULTS results = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_ESCAPESTRING_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_ESCAPESTRING_RESULTS results = { }; ExitOnNull(pcchOut, hr, E_INVALIDARG, "pcchOut is required"); @@ -72,7 +72,7 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine results.wzOut = wzOut; results.cchOut = *pcchOut; - hr = m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_ESCAPESTRING, &args, &results, m_pvBundleExtensionEngineProcContext); + hr = m_pfnBootstrapperExtensionEngineProc(BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_ESCAPESTRING, &args, &results, m_pvBootstrapperExtensionEngineProcContext); *pcchOut = results.cchOut; @@ -86,8 +86,8 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine ) { HRESULT hr = S_OK; - BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_ARGS args = { }; - BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_RESULTS results = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_EVALUATECONDITION_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_EVALUATECONDITION_RESULTS results = { }; ExitOnNull(pf, hr, E_INVALIDARG, "pf is required"); @@ -96,7 +96,7 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine results.cbSize = sizeof(results); - hr = m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_EVALUATECONDITION, &args, &results, m_pvBundleExtensionEngineProcContext); + hr = m_pfnBootstrapperExtensionEngineProc(BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_EVALUATECONDITION, &args, &results, m_pvBootstrapperExtensionEngineProcContext); *pf = results.f; @@ -111,8 +111,8 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine ) { HRESULT hr = S_OK; - BUNDLE_EXTENSION_ENGINE_FORMATSTRING_ARGS args = { }; - BUNDLE_EXTENSION_ENGINE_FORMATSTRING_RESULTS results = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_FORMATSTRING_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_FORMATSTRING_RESULTS results = { }; ExitOnNull(pcchOut, hr, E_INVALIDARG, "pcchOut is required"); @@ -123,7 +123,7 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine results.wzOut = wzOut; results.cchOut = *pcchOut; - hr = m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_FORMATSTRING, &args, &results, m_pvBundleExtensionEngineProcContext); + hr = m_pfnBootstrapperExtensionEngineProc(BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_FORMATSTRING, &args, &results, m_pvBootstrapperExtensionEngineProcContext); *pcchOut = results.cchOut; @@ -137,8 +137,8 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine ) { HRESULT hr = S_OK; - BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS args = { }; - BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_RESULTS results = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLENUMERIC_RESULTS results = { }; ExitOnNull(pllValue, hr, E_INVALIDARG, "pllValue is required"); @@ -147,7 +147,7 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine results.cbSize = sizeof(results); - hr = m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLENUMERIC, &args, &results, m_pvBundleExtensionEngineProcContext); + hr = m_pfnBootstrapperExtensionEngineProc(BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_GETVARIABLENUMERIC, &args, &results, m_pvBootstrapperExtensionEngineProcContext); *pllValue = results.llValue; @@ -163,8 +163,8 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine ) { HRESULT hr = S_OK; - BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_ARGS args = { }; - BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS results = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLESTRING_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS results = { }; ExitOnNull(pcchValue, hr, E_INVALIDARG, "pcchValue is required"); @@ -175,7 +175,7 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine results.wzValue = wzValue; results.cchValue = *pcchValue; - hr = m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLESTRING, &args, &results, m_pvBundleExtensionEngineProcContext); + hr = m_pfnBootstrapperExtensionEngineProc(BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_GETVARIABLESTRING, &args, &results, m_pvBootstrapperExtensionEngineProcContext); *pcchValue = results.cchValue; @@ -190,8 +190,8 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine ) { HRESULT hr = S_OK; - BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS args = { }; - BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS results = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS results = { }; ExitOnNull(pcchValue, hr, E_INVALIDARG, "pcchValue is required"); @@ -202,7 +202,7 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine results.wzValue = wzValue; results.cchValue = *pcchValue; - hr = m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLEVERSION, &args, &results, m_pvBundleExtensionEngineProcContext); + hr = m_pfnBootstrapperExtensionEngineProc(BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_GETVARIABLEVERSION, &args, &results, m_pvBootstrapperExtensionEngineProcContext); *pcchValue = results.cchValue; @@ -211,12 +211,12 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine } virtual STDMETHODIMP Log( - __in BUNDLE_EXTENSION_LOG_LEVEL level, + __in BOOTSTRAPPER_EXTENSION_LOG_LEVEL level, __in_z LPCWSTR wzMessage ) { - BUNDLE_EXTENSION_ENGINE_LOG_ARGS args = { }; - BUNDLE_EXTENSION_ENGINE_LOG_RESULTS results = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_LOG_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_LOG_RESULTS results = { }; args.cbSize = sizeof(args); args.level = level; @@ -224,7 +224,7 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine results.cbSize = sizeof(results); - return m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_LOG, &args, &results, m_pvBundleExtensionEngineProcContext); + return m_pfnBootstrapperExtensionEngineProc(BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_LOG, &args, &results, m_pvBootstrapperExtensionEngineProcContext); } virtual STDMETHODIMP SetVariableNumeric( @@ -232,8 +232,8 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine __in LONGLONG llValue ) { - BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS args = { }; - BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS results = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS results = { }; args.cbSize = sizeof(args); args.wzVariable = wzVariable; @@ -241,7 +241,7 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine results.cbSize = sizeof(results); - return m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLENUMERIC, &args, &results, m_pvBundleExtensionEngineProcContext); + return m_pfnBootstrapperExtensionEngineProc(BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_SETVARIABLENUMERIC, &args, &results, m_pvBootstrapperExtensionEngineProcContext); } virtual STDMETHODIMP SetVariableString( @@ -250,8 +250,8 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine __in BOOL fFormatted ) { - BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_ARGS args = { }; - BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_RESULTS results = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLESTRING_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLESTRING_RESULTS results = { }; args.cbSize = sizeof(args); args.wzVariable = wzVariable; @@ -260,7 +260,7 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine results.cbSize = sizeof(results); - return m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLESTRING, &args, &results, m_pvBundleExtensionEngineProcContext); + return m_pfnBootstrapperExtensionEngineProc(BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_SETVARIABLESTRING, &args, &results, m_pvBootstrapperExtensionEngineProcContext); } virtual STDMETHODIMP SetVariableVersion( @@ -268,8 +268,8 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine __in_z_opt LPCWSTR wzValue ) { - BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS args = { }; - BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_RESULTS results = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLEVERSION_RESULTS results = { }; args.cbSize = sizeof(args); args.wzVariable = wzVariable; @@ -277,7 +277,7 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine results.cbSize = sizeof(results); - return m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLEVERSION, &args, &results, m_pvBundleExtensionEngineProcContext); + return m_pfnBootstrapperExtensionEngineProc(BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_SETVARIABLEVERSION, &args, &results, m_pvBootstrapperExtensionEngineProcContext); } virtual STDMETHODIMP CompareVersions( @@ -287,8 +287,8 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine ) { HRESULT hr = S_OK; - BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_ARGS args = { }; - BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_RESULTS results = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_COMPAREVERSIONS_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_COMPAREVERSIONS_RESULTS results = { }; ExitOnNull(pnResult, hr, E_INVALIDARG, "pnResult is required"); @@ -298,7 +298,7 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine results.cbSize = sizeof(results); - hr = m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_COMPAREVERSIONS, &args, &results, m_pvBundleExtensionEngineProcContext); + hr = m_pfnBootstrapperExtensionEngineProc(BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_COMPAREVERSIONS, &args, &results, m_pvBootstrapperExtensionEngineProcContext); *pnResult = results.nResult; @@ -314,8 +314,8 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine ) { HRESULT hr = S_OK; - BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS args = { }; - BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS results = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS results = { }; ExitOnNull(pcchValue, hr, E_INVALIDARG, "pcchValue is required"); @@ -327,7 +327,7 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine results.wzValue = wzValue; results.cchValue = *pcchValue; - hr = m_pfnBundleExtensionEngineProc(BUNDLE_EXTENSION_ENGINE_MESSAGE_GETRELATEDBUNDLEVARIABLE, &args, &results, m_pvBundleExtensionEngineProcContext); + hr = m_pfnBootstrapperExtensionEngineProc(BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_GETRELATEDBUNDLEVARIABLE, &args, &results, m_pvBootstrapperExtensionEngineProcContext); *pcchValue = results.cchValue; @@ -336,38 +336,38 @@ class CBextBundleExtensionEngine : public IBundleExtensionEngine } public: - CBextBundleExtensionEngine( - __in PFN_BUNDLE_EXTENSION_ENGINE_PROC pfnBundleExtensionEngineProc, - __in_opt LPVOID pvBundleExtensionEngineProcContext + CBextBootstrapperExtensionEngine( + __in PFN_BOOTSTRAPPER_EXTENSION_ENGINE_PROC pfnBootstrapperExtensionEngineProc, + __in_opt LPVOID pvBootstrapperExtensionEngineProcContext ) { m_cReferences = 1; - m_pfnBundleExtensionEngineProc = pfnBundleExtensionEngineProc; - m_pvBundleExtensionEngineProcContext = pvBundleExtensionEngineProcContext; + m_pfnBootstrapperExtensionEngineProc = pfnBootstrapperExtensionEngineProc; + m_pvBootstrapperExtensionEngineProcContext = pvBootstrapperExtensionEngineProcContext; } private: long m_cReferences; - PFN_BUNDLE_EXTENSION_ENGINE_PROC m_pfnBundleExtensionEngineProc; - LPVOID m_pvBundleExtensionEngineProcContext; + PFN_BOOTSTRAPPER_EXTENSION_ENGINE_PROC m_pfnBootstrapperExtensionEngineProc; + LPVOID m_pvBootstrapperExtensionEngineProcContext; }; -HRESULT BextBundleExtensionEngineCreate( - __in PFN_BUNDLE_EXTENSION_ENGINE_PROC pfnBundleExtensionEngineProc, - __in_opt LPVOID pvBundleExtensionEngineProcContext, - __out IBundleExtensionEngine** ppEngineForExtension +HRESULT BextBootstrapperExtensionEngineCreate( + __in PFN_BOOTSTRAPPER_EXTENSION_ENGINE_PROC pfnBootstrapperExtensionEngineProc, + __in_opt LPVOID pvBootstrapperExtensionEngineProcContext, + __out IBootstrapperExtensionEngine** ppEngineForExtension ) { HRESULT hr = S_OK; - CBextBundleExtensionEngine* pBundleExtensionEngine = NULL; + CBextBootstrapperExtensionEngine* pBootstrapperExtensionEngine = NULL; - pBundleExtensionEngine = new CBextBundleExtensionEngine(pfnBundleExtensionEngineProc, pvBundleExtensionEngineProcContext); - ExitOnNull(pBundleExtensionEngine, hr, E_OUTOFMEMORY, "Failed to allocate new BextBundleExtensionEngine object."); + pBootstrapperExtensionEngine = new CBextBootstrapperExtensionEngine(pfnBootstrapperExtensionEngineProc, pvBootstrapperExtensionEngineProcContext); + ExitOnNull(pBootstrapperExtensionEngine, hr, E_OUTOFMEMORY, "Failed to allocate new BextBootstrapperExtensionEngine object."); - hr = pBundleExtensionEngine->QueryInterface(IID_PPV_ARGS(ppEngineForExtension)); - ExitOnFailure(hr, "Failed to QI for IBundleExtensionEngine from BextBundleExtensionEngine object."); + hr = pBootstrapperExtensionEngine->QueryInterface(IID_PPV_ARGS(ppEngineForExtension)); + ExitOnFailure(hr, "Failed to QI for IBootstrapperExtensionEngine from BextBootstrapperExtensionEngine object."); LExit: - ReleaseObject(pBundleExtensionEngine); + ReleaseObject(pBootstrapperExtensionEngine); return hr; } diff --git a/src/api/burn/bextutil/bextutil.cpp b/src/api/burn/bextutil/bextutil.cpp index b2e689c34..6f960ef56 100644 --- a/src/api/burn/bextutil/bextutil.cpp +++ b/src/api/burn/bextutil/bextutil.cpp @@ -2,12 +2,12 @@ #include "precomp.h" -static IBundleExtensionEngine* vpEngine = NULL; +static IBootstrapperExtensionEngine* vpEngine = NULL; // prototypes DAPI_(void) BextInitialize( - __in IBundleExtensionEngine* pEngine + __in IBootstrapperExtensionEngine* pEngine ) { pEngine->AddRef(); @@ -17,15 +17,15 @@ DAPI_(void) BextInitialize( } DAPI_(HRESULT) BextInitializeFromCreateArgs( - __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, - __out_opt IBundleExtensionEngine** ppEngine + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pArgs, + __out_opt IBootstrapperExtensionEngine** ppEngine ) { HRESULT hr = S_OK; - IBundleExtensionEngine* pEngine = NULL; + IBootstrapperExtensionEngine* pEngine = NULL; - hr = BextBundleExtensionEngineCreate(pArgs->pfnBundleExtensionEngineProc, pArgs->pvBundleExtensionEngineProcContext, &pEngine); - ExitOnFailure(hr, "Failed to create BextBundleExtensionEngine."); + hr = BextBootstrapperExtensionEngineCreate(pArgs->pfnBootstrapperExtensionEngineProc, pArgs->pvBootstrapperExtensionEngineProcContext, &pEngine); + ExitOnFailure(hr, "Failed to create BextBootstrapperExtensionEngine."); BextInitialize(pEngine); @@ -47,30 +47,30 @@ DAPI_(void) BextUninitialize() ReleaseNullObject(vpEngine); } -DAPI_(HRESULT) BextGetBundleExtensionDataNode( +DAPI_(HRESULT) BextGetBootstrapperExtensionDataNode( __in IXMLDOMDocument* pixdManifest, __in LPCWSTR wzExtensionId, - __out IXMLDOMNode** ppixnBundleExtension + __out IXMLDOMNode** ppixnBootstrapperExtension ) { HRESULT hr = S_OK; - IXMLDOMElement* pixeBundleExtensionData = NULL; + IXMLDOMElement* pixeBootstrapperExtensionData = NULL; IXMLDOMNodeList* pixnNodes = NULL; IXMLDOMNode* pixnNode = NULL; DWORD cNodes = 0; LPWSTR sczId = NULL; - // Get BundleExtensionData element. - hr = pixdManifest->get_documentElement(&pixeBundleExtensionData); - ExitOnFailure(hr, "Failed to get BundleExtensionData element."); + // Get BootstrapperExtensionData element. + hr = pixdManifest->get_documentElement(&pixeBootstrapperExtensionData); + ExitOnFailure(hr, "Failed to get BootstrapperExtensionData element."); - // Select BundleExtension nodes. - hr = XmlSelectNodes(pixeBundleExtensionData, L"BundleExtension", &pixnNodes); - ExitOnFailure(hr, "Failed to select BundleExtension nodes."); + // Select BootstrapperExtension nodes. + hr = XmlSelectNodes(pixeBootstrapperExtensionData, L"BootstrapperExtension", &pixnNodes); + ExitOnFailure(hr, "Failed to select BootstrapperExtension nodes."); - // Get BundleExtension node count. + // Get BootstrapperExtension node count. hr = pixnNodes->get_length((long*)&cNodes); - ExitOnFailure(hr, "Failed to get BundleExtension node count."); + ExitOnFailure(hr, "Failed to get BootstrapperExtension node count."); if (!cNodes) { @@ -89,7 +89,7 @@ DAPI_(HRESULT) BextGetBundleExtensionDataNode( if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, 0, sczId, -1, wzExtensionId, -1)) { - *ppixnBundleExtension = pixnNode; + *ppixnBootstrapperExtension = pixnNode; pixnNode = NULL; ExitFunction1(hr = S_OK); @@ -105,14 +105,14 @@ DAPI_(HRESULT) BextGetBundleExtensionDataNode( ReleaseStr(sczId); ReleaseObject(pixnNode); ReleaseObject(pixnNodes); - ReleaseObject(pixeBundleExtensionData); + ReleaseObject(pixeBootstrapperExtensionData); return hr; } DAPIV_(HRESULT) BextLog( - __in BUNDLE_EXTENSION_LOG_LEVEL level, + __in BOOTSTRAPPER_EXTENSION_LOG_LEVEL level, __in_z __format_string LPCSTR szFormat, ... ) @@ -136,7 +136,7 @@ DAPIV_(HRESULT) BextLog( DAPI_(HRESULT) BextLogArgs( - __in BUNDLE_EXTENSION_LOG_LEVEL level, + __in BOOTSTRAPPER_EXTENSION_LOG_LEVEL level, __in_z __format_string LPCSTR szFormat, __in va_list args ) @@ -212,7 +212,7 @@ DAPI_(HRESULT) BextLogErrorArgs( hr = StrAllocFormatted(&sczMessage, L"Error 0x%08x: %S", hrError, sczFormattedAnsi); ExitOnFailure(hr, "Failed to prepend error number to error log string."); - hr = vpEngine->Log(BUNDLE_EXTENSION_LOG_LEVEL_ERROR, sczMessage); + hr = vpEngine->Log(BOOTSTRAPPER_EXTENSION_LOG_LEVEL_ERROR, sczMessage); LExit: ReleaseStr(sczMessage); diff --git a/src/api/burn/bextutil/bextutil.nuspec b/src/api/burn/bextutil/bextutil.nuspec index b28813547..c710f4241 100644 --- a/src/api/burn/bextutil/bextutil.nuspec +++ b/src/api/burn/bextutil/bextutil.nuspec @@ -21,8 +21,8 @@ - - + + diff --git a/src/api/burn/bextutil/bextutil.vcxproj b/src/api/burn/bextutil/bextutil.vcxproj index 467f2d566..0299c3814 100644 --- a/src/api/burn/bextutil/bextutil.vcxproj +++ b/src/api/burn/bextutil/bextutil.vcxproj @@ -34,8 +34,8 @@ StaticLibrary bextutil MultiByte - WiX Toolset Bundle Extension native utility library - WixToolset.BextUtil + WiX Toolset Bundle Extension API + WixToolset.BootstrapperExtensionApi @@ -53,19 +53,19 @@ - + Create - - - + + + - - + + diff --git a/src/api/burn/bextutil/build/WixToolset.BextUtil.props b/src/api/burn/bextutil/build/WixToolset.BootstrapperExtensionApi.props similarity index 100% rename from src/api/burn/bextutil/build/WixToolset.BextUtil.props rename to src/api/burn/bextutil/build/WixToolset.BootstrapperExtensionApi.props diff --git a/src/api/burn/bextutil/inc/BextBaseBundleExtension.h b/src/api/burn/bextutil/inc/BextBaseBootstrapperExtension.h similarity index 64% rename from src/api/burn/bextutil/inc/BextBaseBundleExtension.h rename to src/api/burn/bextutil/inc/BextBaseBootstrapperExtension.h index 5bda04e19..83ba23a6a 100644 --- a/src/api/burn/bextutil/inc/BextBaseBundleExtension.h +++ b/src/api/burn/bextutil/inc/BextBaseBootstrapperExtension.h @@ -4,7 +4,7 @@ #include "bextutil.h" -class CBextBaseBundleExtension : public IBundleExtension +class CBextBaseBootstrapperExtension : public IBootstrapperExtension { public: // IUnknown virtual STDMETHODIMP QueryInterface( @@ -19,9 +19,9 @@ class CBextBaseBundleExtension : public IBundleExtension *ppvObject = NULL; - if (::IsEqualIID(__uuidof(IBundleExtension), riid)) + if (::IsEqualIID(__uuidof(IBootstrapperExtension), riid)) { - *ppvObject = static_cast(this); + *ppvObject = static_cast(this); } else if (::IsEqualIID(IID_IUnknown, riid)) { @@ -53,7 +53,7 @@ class CBextBaseBundleExtension : public IBundleExtension return 0; } -public: // IBundleExtension +public: // IBootstrapperExtension virtual STDMETHODIMP Search( __in LPCWSTR /*wzId*/, __in LPCWSTR /*wzVariable*/ @@ -62,8 +62,8 @@ class CBextBaseBundleExtension : public IBundleExtension return E_NOTIMPL; } - virtual STDMETHODIMP BundleExtensionProc( - __in BUNDLE_EXTENSION_MESSAGE /*message*/, + virtual STDMETHODIMP BootstrapperExtensionProc( + __in BOOTSTRAPPER_EXTENSION_MESSAGE /*message*/, __in const LPVOID /*pvArgs*/, __inout LPVOID /*pvResults*/, __in_opt LPVOID /*pvContext*/ @@ -72,15 +72,15 @@ class CBextBaseBundleExtension : public IBundleExtension return E_NOTIMPL; } -public: //CBextBaseBundleExtension +public: //CBextBaseBootstrapperExtension virtual STDMETHODIMP Initialize( - __in const BUNDLE_EXTENSION_CREATE_ARGS* pCreateArgs + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pCreateArgs ) { HRESULT hr = S_OK; - hr = StrAllocString(&m_sczBundleExtensionDataPath, pCreateArgs->wzBundleExtensionDataPath, 0); - ExitOnFailure(hr, "Failed to copy BundleExtensionDataPath."); + hr = StrAllocString(&m_sczBootstrapperExtensionDataPath, pCreateArgs->wzBootstrapperExtensionDataPath, 0); + ExitOnFailure(hr, "Failed to copy BootstrapperExtensionDataPath."); LExit: return hr; @@ -88,8 +88,8 @@ class CBextBaseBundleExtension : public IBundleExtension protected: - CBextBaseBundleExtension( - __in IBundleExtensionEngine* pEngine + CBextBaseBootstrapperExtension( + __in IBootstrapperExtensionEngine* pEngine ) { m_cReferences = 1; @@ -97,18 +97,18 @@ class CBextBaseBundleExtension : public IBundleExtension pEngine->AddRef(); m_pEngine = pEngine; - m_sczBundleExtensionDataPath = NULL; + m_sczBootstrapperExtensionDataPath = NULL; } - virtual ~CBextBaseBundleExtension() + virtual ~CBextBaseBootstrapperExtension() { ReleaseNullObject(m_pEngine); - ReleaseStr(m_sczBundleExtensionDataPath); + ReleaseStr(m_sczBootstrapperExtensionDataPath); } protected: - IBundleExtensionEngine* m_pEngine; - LPWSTR m_sczBundleExtensionDataPath; + IBootstrapperExtensionEngine* m_pEngine; + LPWSTR m_sczBootstrapperExtensionDataPath; private: long m_cReferences; diff --git a/src/api/burn/bextutil/inc/BextBaseBootstrapperExtensionProc.h b/src/api/burn/bextutil/inc/BextBaseBootstrapperExtensionProc.h new file mode 100644 index 000000000..4f96399c5 --- /dev/null +++ b/src/api/burn/bextutil/inc/BextBaseBootstrapperExtensionProc.h @@ -0,0 +1,46 @@ +#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. + + +#include + +#include +#include + +static HRESULT BextBaseBEProcSearch( + __in IBootstrapperExtension* pBE, + __in BOOTSTRAPPER_EXTENSION_SEARCH_ARGS* pArgs, + __inout BOOTSTRAPPER_EXTENSION_SEARCH_RESULTS* /*pResults*/ + ) +{ + return pBE->Search(pArgs->wzId, pArgs->wzVariable); +} + +/******************************************************************* +BextBaseBootstrapperExtensionProc - requires pvContext to be of type IBootstrapperExtension. + Provides a default mapping between the message based + BootstrapperExtension interface and the COM-based BootstrapperExtension interface. + +*******************************************************************/ +static HRESULT WINAPI BextBaseBootstrapperExtensionProc( + __in BOOTSTRAPPER_EXTENSION_MESSAGE message, + __in const LPVOID pvArgs, + __inout LPVOID pvResults, + __in_opt LPVOID pvContext + ) +{ + IBootstrapperExtension* pBE = reinterpret_cast(pvContext); + HRESULT hr = pBE->BootstrapperExtensionProc(message, pvArgs, pvResults, pvContext); + + if (E_NOTIMPL == hr) + { + switch (message) + { + case BOOTSTRAPPER_EXTENSION_MESSAGE_SEARCH: + hr = BextBaseBEProcSearch(pBE, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); + break; + } + } + + return hr; +} diff --git a/src/api/burn/bextutil/inc/BextBaseBundleExtensionProc.h b/src/api/burn/bextutil/inc/BextBaseBundleExtensionProc.h deleted file mode 100644 index cd7e3cb3b..000000000 --- a/src/api/burn/bextutil/inc/BextBaseBundleExtensionProc.h +++ /dev/null @@ -1,46 +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. - - -#include - -#include -#include - -static HRESULT BextBaseBEProcSearch( - __in IBundleExtension* pBE, - __in BUNDLE_EXTENSION_SEARCH_ARGS* pArgs, - __inout BUNDLE_EXTENSION_SEARCH_RESULTS* /*pResults*/ - ) -{ - return pBE->Search(pArgs->wzId, pArgs->wzVariable); -} - -/******************************************************************* -BextBaseBundleExtensionProc - requires pvContext to be of type IBundleExtension. - Provides a default mapping between the message based - BundleExtension interface and the COM-based BundleExtension interface. - -*******************************************************************/ -static HRESULT WINAPI BextBaseBundleExtensionProc( - __in BUNDLE_EXTENSION_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext - ) -{ - IBundleExtension* pBE = reinterpret_cast(pvContext); - HRESULT hr = pBE->BundleExtensionProc(message, pvArgs, pvResults, pvContext); - - if (E_NOTIMPL == hr) - { - switch (message) - { - case BUNDLE_EXTENSION_MESSAGE_SEARCH: - hr = BextBaseBEProcSearch(pBE, reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - } - } - - return hr; -} diff --git a/src/api/burn/bextutil/inc/BextBundleExtensionEngine.h b/src/api/burn/bextutil/inc/BextBootstrapperExtensionEngine.h similarity index 50% rename from src/api/burn/bextutil/inc/BextBundleExtensionEngine.h rename to src/api/burn/bextutil/inc/BextBootstrapperExtensionEngine.h index 97b02f36e..a27ff1864 100644 --- a/src/api/burn/bextutil/inc/BextBundleExtensionEngine.h +++ b/src/api/burn/bextutil/inc/BextBootstrapperExtensionEngine.h @@ -1,7 +1,7 @@ #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. -#include +#include #ifdef __cplusplus extern "C" { @@ -9,10 +9,10 @@ extern "C" { // function declarations -HRESULT BextBundleExtensionEngineCreate( - __in PFN_BUNDLE_EXTENSION_ENGINE_PROC pfnBundleExtensionEngineProc, - __in_opt LPVOID pvBundleExtensionEngineProcContext, - __out IBundleExtensionEngine** ppEngineForExtension +HRESULT BextBootstrapperExtensionEngineCreate( + __in PFN_BOOTSTRAPPER_EXTENSION_ENGINE_PROC pfnBootstrapperExtensionEngineProc, + __in_opt LPVOID pvBootstrapperExtensionEngineProcContext, + __out IBootstrapperExtensionEngine** ppEngineForExtension ); #ifdef __cplusplus diff --git a/src/api/burn/bextutil/inc/IBootstrapperExtension.h b/src/api/burn/bextutil/inc/IBootstrapperExtension.h new file mode 100644 index 000000000..4005a9fdb --- /dev/null +++ b/src/api/burn/bextutil/inc/IBootstrapperExtension.h @@ -0,0 +1,21 @@ +#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. + +#include + +DECLARE_INTERFACE_IID_(IBootstrapperExtension, IUnknown, "93123C9D-796B-4FCD-A507-6EDEF9A925FD") +{ + STDMETHOD(Search)( + __in LPCWSTR wzId, + __in LPCWSTR wzVariable + ) = 0; + + // BootstrapperExtensionProc - The PFN_BOOTSTRAPPER_EXTENSION_PROC can call this method to give the BootstrapperExtension raw access to the callback from the engine. + // This might be used to help the BootstrapperExtension support more than one version of the engine. + STDMETHOD(BootstrapperExtensionProc)( + __in BOOTSTRAPPER_EXTENSION_MESSAGE message, + __in const LPVOID pvArgs, + __inout LPVOID pvResults, + __in_opt LPVOID pvContext + ) = 0; +}; diff --git a/src/api/burn/bextutil/inc/IBundleExtensionEngine.h b/src/api/burn/bextutil/inc/IBootstrapperExtensionEngine.h similarity index 90% rename from src/api/burn/bextutil/inc/IBundleExtensionEngine.h rename to src/api/burn/bextutil/inc/IBootstrapperExtensionEngine.h index a4a27fb1f..b23a57b77 100644 --- a/src/api/burn/bextutil/inc/IBundleExtensionEngine.h +++ b/src/api/burn/bextutil/inc/IBootstrapperExtensionEngine.h @@ -1,9 +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. -#include +#include -DECLARE_INTERFACE_IID_(IBundleExtensionEngine, IUnknown, "9D027A39-F6B6-42CC-9737-C185089EB263") +DECLARE_INTERFACE_IID_(IBootstrapperExtensionEngine, IUnknown, "9D027A39-F6B6-42CC-9737-C185089EB263") { STDMETHOD(EscapeString)( __in_z LPCWSTR wzIn, @@ -40,7 +40,7 @@ DECLARE_INTERFACE_IID_(IBundleExtensionEngine, IUnknown, "9D027A39-F6B6-42CC-973 ) = 0; STDMETHOD(Log)( - __in BUNDLE_EXTENSION_LOG_LEVEL level, + __in BOOTSTRAPPER_EXTENSION_LOG_LEVEL level, __in_z LPCWSTR wzMessage ) = 0; diff --git a/src/api/burn/bextutil/inc/IBundleExtension.h b/src/api/burn/bextutil/inc/IBundleExtension.h deleted file mode 100644 index 00301672a..000000000 --- a/src/api/burn/bextutil/inc/IBundleExtension.h +++ /dev/null @@ -1,21 +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. - -#include - -DECLARE_INTERFACE_IID_(IBundleExtension, IUnknown, "93123C9D-796B-4FCD-A507-6EDEF9A925FD") -{ - STDMETHOD(Search)( - __in LPCWSTR wzId, - __in LPCWSTR wzVariable - ) = 0; - - // BundleExtensionProc - The PFN_BUNDLE_EXTENSION_PROC can call this method to give the BundleExtension raw access to the callback from the engine. - // This might be used to help the BundleExtension support more than one version of the engine. - STDMETHOD(BundleExtensionProc)( - __in BUNDLE_EXTENSION_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext - ) = 0; -}; diff --git a/src/api/burn/bextutil/inc/bextutil.h b/src/api/burn/bextutil/inc/bextutil.h index b8536444a..64633cf16 100644 --- a/src/api/burn/bextutil/inc/bextutil.h +++ b/src/api/burn/bextutil/inc/bextutil.h @@ -4,8 +4,8 @@ #include "dutil.h" -#include "IBundleExtensionEngine.h" -#include "IBundleExtension.h" +#include "IBootstrapperExtensionEngine.h" +#include "IBootstrapperExtension.h" #ifdef __cplusplus extern "C" { @@ -33,7 +33,7 @@ extern "C" { #define BextExitOnOptionalXmlQueryFailure(x, b, f, ...) BextExitOnOptionalXmlQueryFailureSource(DUTIL_SOURCE_DEFAULT, x, b, f, __VA_ARGS__) #define BextExitOnRequiredXmlQueryFailure(x, f, ...) BextExitOnRequiredXmlQueryFailureSource(DUTIL_SOURCE_DEFAULT, x, f, __VA_ARGS__) -const LPCWSTR BUNDLE_EXTENSION_MANIFEST_FILENAME = L"BundleExtensionData.xml"; +const LPCWSTR BOOTSTRAPPER_EXTENSION_MANIFEST_FILENAME = L"BootstrapperExtensionData.xml"; /******************************************************************* @@ -42,17 +42,17 @@ const LPCWSTR BUNDLE_EXTENSION_MANIFEST_FILENAME = L"BundleExtensionData.xml"; ********************************************************************/ DAPI_(void) BextInitialize( - __in IBundleExtensionEngine* pEngine + __in IBootstrapperExtensionEngine* pEngine ); /******************************************************************* - BextInitializeFromCreateArgs - convenience function to call BextBundleExtensionEngineCreate + BextInitializeFromCreateArgs - convenience function to call BextBootstrapperExtensionEngineCreate then pass it along to BextInitialize. ********************************************************************/ DAPI_(HRESULT) BextInitializeFromCreateArgs( - __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, - __out IBundleExtensionEngine** ppEngine + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pArgs, + __out IBootstrapperExtensionEngine** ppEngine ); /******************************************************************* @@ -62,13 +62,13 @@ DAPI_(HRESULT) BextInitializeFromCreateArgs( DAPI_(void) BextUninitialize(); /******************************************************************* - BextGetBundleExtensionDataNode - gets the requested BundleExtension node. + BextGetBootstrapperExtensionDataNode - gets the requested BootstrapperExtension node. ********************************************************************/ -DAPI_(HRESULT) BextGetBundleExtensionDataNode( +DAPI_(HRESULT) BextGetBootstrapperExtensionDataNode( __in IXMLDOMDocument* pixdManifest, __in LPCWSTR wzExtensionId, - __out IXMLDOMNode** ppixnBundleExtension + __out IXMLDOMNode** ppixnBootstrapperExtension ); /******************************************************************* @@ -76,7 +76,7 @@ DAPI_(HRESULT) BextGetBundleExtensionDataNode( ********************************************************************/ DAPIV_(HRESULT) BextLog( - __in BUNDLE_EXTENSION_LOG_LEVEL level, + __in BOOTSTRAPPER_EXTENSION_LOG_LEVEL level, __in_z __format_string LPCSTR szFormat, ... ); @@ -86,7 +86,7 @@ DAPIV_(HRESULT) BextLog( ********************************************************************/ DAPI_(HRESULT) BextLogArgs( - __in BUNDLE_EXTENSION_LOG_LEVEL level, + __in BOOTSTRAPPER_EXTENSION_LOG_LEVEL level, __in_z __format_string LPCSTR szFormat, __in va_list args ); diff --git a/src/api/burn/bextutil/precomp.h b/src/api/burn/bextutil/precomp.h index d5714cc2d..52962c06d 100644 --- a/src/api/burn/bextutil/precomp.h +++ b/src/api/burn/bextutil/precomp.h @@ -13,4 +13,4 @@ #include #include "bextutil.h" -#include "BextBundleExtensionEngine.h" +#include "BextBootstrapperExtensionEngine.h" diff --git a/src/api/burn/inc/BootstrapperExtension.h b/src/api/burn/inc/BootstrapperExtension.h new file mode 100644 index 000000000..b1fa64080 --- /dev/null +++ b/src/api/burn/inc/BootstrapperExtension.h @@ -0,0 +1,61 @@ +#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. + +#include + +#if defined(__cplusplus) +extern "C" { +#endif + +enum BOOTSTRAPPER_EXTENSION_MESSAGE +{ + BOOTSTRAPPER_EXTENSION_MESSAGE_SEARCH, +}; + +typedef struct _BOOTSTRAPPER_EXTENSION_SEARCH_ARGS +{ + DWORD cbSize; + LPCWSTR wzId; + LPCWSTR wzVariable; +} BOOTSTRAPPER_EXTENSION_SEARCH_ARGS; + +typedef struct _BOOTSTRAPPER_EXTENSION_SEARCH_RESULTS +{ + DWORD cbSize; +} BOOTSTRAPPER_EXTENSION_SEARCH_RESULTS; + +extern "C" typedef HRESULT(WINAPI *PFN_BOOTSTRAPPER_EXTENSION_PROC)( + __in BOOTSTRAPPER_EXTENSION_MESSAGE message, + __in const LPVOID pvArgs, + __inout LPVOID pvResults, + __in_opt LPVOID pvContext + ); + +typedef struct _BOOTSTRAPPER_EXTENSION_CREATE_ARGS +{ + DWORD cbSize; + DWORD64 qwEngineAPIVersion; + PFN_BOOTSTRAPPER_EXTENSION_ENGINE_PROC pfnBootstrapperExtensionEngineProc; + LPVOID pvBootstrapperExtensionEngineProcContext; + LPCWSTR wzBootstrapperWorkingFolder; + LPCWSTR wzBootstrapperExtensionDataPath; + LPCWSTR wzExtensionId; +} BOOTSTRAPPER_EXTENSION_CREATE_ARGS; + +typedef struct _BOOTSTRAPPER_EXTENSION_CREATE_RESULTS +{ + DWORD cbSize; + PFN_BOOTSTRAPPER_EXTENSION_PROC pfnBootstrapperExtensionProc; + LPVOID pvBootstrapperExtensionProcContext; +} BOOTSTRAPPER_EXTENSION_CREATE_RESULTS; + +extern "C" typedef HRESULT(WINAPI *PFN_BOOTSTRAPPER_EXTENSION_CREATE)( + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pArgs, + __inout BOOTSTRAPPER_EXTENSION_CREATE_RESULTS* pResults + ); + +extern "C" typedef void (WINAPI *PFN_BOOTSTRAPPER_EXTENSION_DESTROY)(); + +#if defined(__cplusplus) +} +#endif diff --git a/src/api/burn/inc/BootstrapperExtensionEngine.h b/src/api/burn/inc/BootstrapperExtensionEngine.h new file mode 100644 index 000000000..24c304c67 --- /dev/null +++ b/src/api/burn/inc/BootstrapperExtensionEngine.h @@ -0,0 +1,200 @@ +#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. + + +#if defined(__cplusplus) +extern "C" { +#endif + +enum BOOTSTRAPPER_EXTENSION_LOG_LEVEL +{ + BOOTSTRAPPER_EXTENSION_LOG_LEVEL_NONE, // turns off report (only valid for XXXSetLevel()) + BOOTSTRAPPER_EXTENSION_LOG_LEVEL_STANDARD, // written if reporting is on + BOOTSTRAPPER_EXTENSION_LOG_LEVEL_VERBOSE, // written only if verbose reporting is on + BOOTSTRAPPER_EXTENSION_LOG_LEVEL_DEBUG, // reporting useful when debugging code + BOOTSTRAPPER_EXTENSION_LOG_LEVEL_ERROR, // always gets reported, but can never be specified +}; + +enum BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE +{ + BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_ESCAPESTRING, + BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_EVALUATECONDITION, + BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_FORMATSTRING, + BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_GETVARIABLENUMERIC, + BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_GETVARIABLESTRING, + BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_GETVARIABLEVERSION, + BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_LOG, + BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_SETVARIABLENUMERIC, + BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_SETVARIABLESTRING, + BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_SETVARIABLEVERSION, + BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_COMPAREVERSIONS, + BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_GETRELATEDBUNDLEVARIABLE, +}; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_COMPAREVERSIONS_ARGS +{ + DWORD cbSize; + LPCWSTR wzVersion1; + LPCWSTR wzVersion2; +} BOOTSTRAPPER_EXTENSION_ENGINE_COMPAREVERSIONS_ARGS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_COMPAREVERSIONS_RESULTS +{ + DWORD cbSize; + int nResult; +} BOOTSTRAPPER_EXTENSION_ENGINE_COMPAREVERSIONS_RESULTS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_ESCAPESTRING_ARGS +{ + DWORD cbSize; + LPCWSTR wzIn; +} BOOTSTRAPPER_EXTENSION_ENGINE_ESCAPESTRING_ARGS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_ESCAPESTRING_RESULTS +{ + DWORD cbSize; + LPWSTR wzOut; + // Should be initialized to the size of wzOut. + SIZE_T cchOut; +} BOOTSTRAPPER_EXTENSION_ENGINE_ESCAPESTRING_RESULTS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_EVALUATECONDITION_ARGS +{ + DWORD cbSize; + LPCWSTR wzCondition; +} BOOTSTRAPPER_EXTENSION_ENGINE_EVALUATECONDITION_ARGS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_EVALUATECONDITION_RESULTS +{ + DWORD cbSize; + BOOL f; +} BOOTSTRAPPER_EXTENSION_ENGINE_EVALUATECONDITION_RESULTS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_FORMATSTRING_ARGS +{ + DWORD cbSize; + LPCWSTR wzIn; +} BOOTSTRAPPER_EXTENSION_ENGINE_FORMATSTRING_ARGS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_FORMATSTRING_RESULTS +{ + DWORD cbSize; + LPWSTR wzOut; + // Should be initialized to the size of wzOut. + SIZE_T cchOut; +} BOOTSTRAPPER_EXTENSION_ENGINE_FORMATSTRING_RESULTS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS +{ + DWORD cbSize; + LPCWSTR wzVariable; +} BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLENUMERIC_RESULTS +{ + DWORD cbSize; + LONGLONG llValue; +} BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLENUMERIC_RESULTS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLESTRING_ARGS +{ + DWORD cbSize; + LPCWSTR wzVariable; +} BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLESTRING_ARGS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS +{ + DWORD cbSize; + LPWSTR wzValue; + // Should be initialized to the size of wzValue. + SIZE_T cchValue; +} BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS +{ + DWORD cbSize; + LPCWSTR wzVariable; +} BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS +{ + DWORD cbSize; + LPWSTR wzValue; + // Should be initialized to the size of wzValue. + SIZE_T cchValue; +} BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_LOG_ARGS +{ + DWORD cbSize; + BOOTSTRAPPER_EXTENSION_LOG_LEVEL level; + LPCWSTR wzMessage; +} BOOTSTRAPPER_EXTENSION_ENGINE_LOG_ARGS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_LOG_RESULTS +{ + DWORD cbSize; +} BOOTSTRAPPER_EXTENSION_ENGINE_LOG_RESULTS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS +{ + DWORD cbSize; + LPCWSTR wzVariable; + LONGLONG llValue; +} BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS +{ + DWORD cbSize; +} BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLESTRING_ARGS +{ + DWORD cbSize; + LPCWSTR wzVariable; + LPCWSTR wzValue; + BOOL fFormatted; +} BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLESTRING_ARGS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLESTRING_RESULTS +{ + DWORD cbSize; +} BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLESTRING_RESULTS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS +{ + DWORD cbSize; + LPCWSTR wzVariable; + LPCWSTR wzValue; +} BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLEVERSION_RESULTS +{ + DWORD cbSize; +} BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLEVERSION_RESULTS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS +{ + DWORD cbSize; + LPCWSTR wzBundleId; + LPCWSTR wzVariable; +} BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS; + +typedef struct _BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS +{ + DWORD cbSize; + LPWSTR wzValue; + // Should be initialized to the size of wzValue. + SIZE_T cchValue; +} BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS; + +extern "C" typedef HRESULT(WINAPI *PFN_BOOTSTRAPPER_EXTENSION_ENGINE_PROC)( + __in BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE message, + __in const LPVOID pvArgs, + __inout LPVOID pvResults, + __in_opt LPVOID pvContext + ); + +#if defined(__cplusplus) +} +#endif diff --git a/src/api/burn/inc/BundleExtension.h b/src/api/burn/inc/BundleExtension.h deleted file mode 100644 index 17acff6ef..000000000 --- a/src/api/burn/inc/BundleExtension.h +++ /dev/null @@ -1,61 +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. - -#include - -#if defined(__cplusplus) -extern "C" { -#endif - -enum BUNDLE_EXTENSION_MESSAGE -{ - BUNDLE_EXTENSION_MESSAGE_SEARCH, -}; - -typedef struct _BUNDLE_EXTENSION_SEARCH_ARGS -{ - DWORD cbSize; - LPCWSTR wzId; - LPCWSTR wzVariable; -} BUNDLE_EXTENSION_SEARCH_ARGS; - -typedef struct _BUNDLE_EXTENSION_SEARCH_RESULTS -{ - DWORD cbSize; -} BUNDLE_EXTENSION_SEARCH_RESULTS; - -extern "C" typedef HRESULT(WINAPI *PFN_BUNDLE_EXTENSION_PROC)( - __in BUNDLE_EXTENSION_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext - ); - -typedef struct _BUNDLE_EXTENSION_CREATE_ARGS -{ - DWORD cbSize; - DWORD64 qwEngineAPIVersion; - PFN_BUNDLE_EXTENSION_ENGINE_PROC pfnBundleExtensionEngineProc; - LPVOID pvBundleExtensionEngineProcContext; - LPCWSTR wzBootstrapperWorkingFolder; - LPCWSTR wzBundleExtensionDataPath; - LPCWSTR wzExtensionId; -} BUNDLE_EXTENSION_CREATE_ARGS; - -typedef struct _BUNDLE_EXTENSION_CREATE_RESULTS -{ - DWORD cbSize; - PFN_BUNDLE_EXTENSION_PROC pfnBundleExtensionProc; - LPVOID pvBundleExtensionProcContext; -} BUNDLE_EXTENSION_CREATE_RESULTS; - -extern "C" typedef HRESULT(WINAPI *PFN_BUNDLE_EXTENSION_CREATE)( - __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, - __inout BUNDLE_EXTENSION_CREATE_RESULTS* pResults - ); - -extern "C" typedef void (WINAPI *PFN_BUNDLE_EXTENSION_DESTROY)(); - -#if defined(__cplusplus) -} -#endif diff --git a/src/api/burn/inc/BundleExtensionEngine.h b/src/api/burn/inc/BundleExtensionEngine.h deleted file mode 100644 index b585d1a28..000000000 --- a/src/api/burn/inc/BundleExtensionEngine.h +++ /dev/null @@ -1,200 +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. - - -#if defined(__cplusplus) -extern "C" { -#endif - -enum BUNDLE_EXTENSION_LOG_LEVEL -{ - BUNDLE_EXTENSION_LOG_LEVEL_NONE, // turns off report (only valid for XXXSetLevel()) - BUNDLE_EXTENSION_LOG_LEVEL_STANDARD, // written if reporting is on - BUNDLE_EXTENSION_LOG_LEVEL_VERBOSE, // written only if verbose reporting is on - BUNDLE_EXTENSION_LOG_LEVEL_DEBUG, // reporting useful when debugging code - BUNDLE_EXTENSION_LOG_LEVEL_ERROR, // always gets reported, but can never be specified -}; - -enum BUNDLE_EXTENSION_ENGINE_MESSAGE -{ - BUNDLE_EXTENSION_ENGINE_MESSAGE_ESCAPESTRING, - BUNDLE_EXTENSION_ENGINE_MESSAGE_EVALUATECONDITION, - BUNDLE_EXTENSION_ENGINE_MESSAGE_FORMATSTRING, - BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLENUMERIC, - BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLESTRING, - BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLEVERSION, - BUNDLE_EXTENSION_ENGINE_MESSAGE_LOG, - BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLENUMERIC, - BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLESTRING, - BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLEVERSION, - BUNDLE_EXTENSION_ENGINE_MESSAGE_COMPAREVERSIONS, - BUNDLE_EXTENSION_ENGINE_MESSAGE_GETRELATEDBUNDLEVARIABLE, -}; - -typedef struct _BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_ARGS -{ - DWORD cbSize; - LPCWSTR wzVersion1; - LPCWSTR wzVersion2; -} BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_RESULTS -{ - DWORD cbSize; - int nResult; -} BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_ARGS -{ - DWORD cbSize; - LPCWSTR wzIn; -} BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_RESULTS -{ - DWORD cbSize; - LPWSTR wzOut; - // Should be initialized to the size of wzOut. - SIZE_T cchOut; -} BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_ARGS -{ - DWORD cbSize; - LPCWSTR wzCondition; -} BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_RESULTS -{ - DWORD cbSize; - BOOL f; -} BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_FORMATSTRING_ARGS -{ - DWORD cbSize; - LPCWSTR wzIn; -} BUNDLE_EXTENSION_ENGINE_FORMATSTRING_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_FORMATSTRING_RESULTS -{ - DWORD cbSize; - LPWSTR wzOut; - // Should be initialized to the size of wzOut. - SIZE_T cchOut; -} BUNDLE_EXTENSION_ENGINE_FORMATSTRING_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS -{ - DWORD cbSize; - LPCWSTR wzVariable; -} BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_RESULTS -{ - DWORD cbSize; - LONGLONG llValue; -} BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_ARGS -{ - DWORD cbSize; - LPCWSTR wzVariable; -} BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS -{ - DWORD cbSize; - LPWSTR wzValue; - // Should be initialized to the size of wzValue. - SIZE_T cchValue; -} BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS -{ - DWORD cbSize; - LPCWSTR wzVariable; -} BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS -{ - DWORD cbSize; - LPWSTR wzValue; - // Should be initialized to the size of wzValue. - SIZE_T cchValue; -} BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_LOG_ARGS -{ - DWORD cbSize; - BUNDLE_EXTENSION_LOG_LEVEL level; - LPCWSTR wzMessage; -} BUNDLE_EXTENSION_ENGINE_LOG_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_LOG_RESULTS -{ - DWORD cbSize; -} BUNDLE_EXTENSION_ENGINE_LOG_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS -{ - DWORD cbSize; - LPCWSTR wzVariable; - LONGLONG llValue; -} BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS -{ - DWORD cbSize; -} BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_ARGS -{ - DWORD cbSize; - LPCWSTR wzVariable; - LPCWSTR wzValue; - BOOL fFormatted; -} BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_RESULTS -{ - DWORD cbSize; -} BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS -{ - DWORD cbSize; - LPCWSTR wzVariable; - LPCWSTR wzValue; -} BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_RESULTS -{ - DWORD cbSize; -} BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS -{ - DWORD cbSize; - LPCWSTR wzBundleId; - LPCWSTR wzVariable; -} BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS -{ - DWORD cbSize; - LPWSTR wzValue; - // Should be initialized to the size of wzValue. - SIZE_T cchValue; -} BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS; - -extern "C" typedef HRESULT(WINAPI *PFN_BUNDLE_EXTENSION_ENGINE_PROC)( - __in BUNDLE_EXTENSION_ENGINE_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext - ); - -#if defined(__cplusplus) -} -#endif diff --git a/src/api/burn/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj b/src/api/burn/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj index 6e8dfee1d..39135dcf6 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 73f2194d1..678f04f58 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/BundleExtensionTests.cpp b/src/api/burn/test/BextUtilUnitTest/BootstrapperExtensionTests.cpp similarity index 62% rename from src/api/burn/test/BextUtilUnitTest/BundleExtensionTests.cpp rename to src/api/burn/test/BextUtilUnitTest/BootstrapperExtensionTests.cpp index 5c5c5812e..c2882587c 100644 --- a/src/api/burn/test/BextUtilUnitTest/BundleExtensionTests.cpp +++ b/src/api/burn/test/BextUtilUnitTest/BootstrapperExtensionTests.cpp @@ -9,20 +9,20 @@ using namespace WixInternal::TestSupport::XunitExtensions; namespace BextUtilTests { - public ref class BundleExtension + public ref class BootstrapperExtension { public: [Fact] - void CanCreateTestBundleExtension() + void CanCreateTestBootstrapperExtension() { HRESULT hr = S_OK; - BUNDLE_EXTENSION_CREATE_ARGS args = { }; - BUNDLE_EXTENSION_CREATE_RESULTS results = { }; - IBundleExtensionEngine* pEngine = NULL; - IBundleExtension* pBundleExtension = NULL; + BOOTSTRAPPER_EXTENSION_CREATE_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_CREATE_RESULTS results = { }; + IBootstrapperExtensionEngine* pEngine = NULL; + IBootstrapperExtension* pBootstrapperExtension = NULL; args.cbSize = sizeof(args); - args.wzBundleExtensionDataPath = L"test.xml"; + args.wzBootstrapperExtensionDataPath = L"test.xml"; results.cbSize = sizeof(results); @@ -31,13 +31,13 @@ namespace BextUtilTests hr = BextInitializeFromCreateArgs(&args, &pEngine); NativeAssert::Succeeded(hr, "Failed to create engine."); - hr = TestBundleExtensionCreate(pEngine, &args, &results, &pBundleExtension); + hr = TestBootstrapperExtensionCreate(pEngine, &args, &results, &pBootstrapperExtension); NativeAssert::Succeeded(hr, "Failed to create BootstrapperApplication."); } finally { ReleaseObject(pEngine); - ReleaseObject(pBundleExtension); + ReleaseObject(pBootstrapperExtension); } } }; diff --git a/src/api/burn/test/BextUtilUnitTest/TestBootstrapperExtension.cpp b/src/api/burn/test/BextUtilUnitTest/TestBootstrapperExtension.cpp new file mode 100644 index 000000000..225123daa --- /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 000000000..00e4243ca --- /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 921303bbb..000000000 --- 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 5cfe8b39d..000000000 --- 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 00bf872fb..893a2ac47 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 diff --git a/src/api/wix/WixToolset.Data/Burn/BurnConstants.cs b/src/api/wix/WixToolset.Data/Burn/BurnConstants.cs index 9e74827c7..1b0829524 100644 --- a/src/api/wix/WixToolset.Data/Burn/BurnConstants.cs +++ b/src/api/wix/WixToolset.Data/Burn/BurnConstants.cs @@ -11,13 +11,13 @@ public static class BurnConstants public const string BundleLayoutOnlyPayloadsName = "BundleLayoutOnlyPayloads"; public const string BurnManifestWixOutputStreamName = "wix-burndata.xml"; - public const string BundleExtensionDataWixOutputStreamName = "wix-bextdata"; + public const string BootstrapperExtensionDataWixOutputStreamName = "wix-bextdata"; public const string BootstrapperApplicationDataWixOutputStreamName = "wix-badata.xml"; public const string BootstrapperApplicationDataNamespace = "http://wixtoolset.org/schemas/v4/BootstrapperApplicationData"; - public const string BundleExtensionDataNamespace = "http://wixtoolset.org/schemas/v4/BundleExtensionData"; + public const string BootstrapperExtensionDataNamespace = "http://wixtoolset.org/schemas/v4/BootstrapperExtensionData"; public const string BootstrapperApplicationDataSymbolDefinitionTag = "WixBootstrapperApplicationData"; - public const string BundleExtensionSearchSymbolDefinitionTag = "WixBundleExtensionSearch"; + public const string BootstrapperExtensionSearchSymbolDefinitionTag = "WixBootstrapperExtensionSearch"; } } diff --git a/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs b/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs index 688c34edc..facca956a 100644 --- a/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs +++ b/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs @@ -130,7 +130,7 @@ public enum SymbolDefinitionType WixBundleBundlePackagePayload, WixBundleExePackage, WixBundleExePackagePayload, - WixBundleExtension, + WixBootstrapperExtension, WixBundleHarvestedBundlePackage, WixBundleHarvestedDependencyProvider, WixBundleHarvestedMsiPackage, @@ -579,8 +579,8 @@ public static IntermediateSymbolDefinition ByType(SymbolDefinitionType type) case SymbolDefinitionType.WixBundleCustomDataCell: return SymbolDefinitions.WixBundleCustomDataCell; - case SymbolDefinitionType.WixBundleExtension: - return SymbolDefinitions.WixBundleExtension; + case SymbolDefinitionType.WixBootstrapperExtension: + return SymbolDefinitions.WixBootstrapperExtension; case SymbolDefinitionType.WixBundleExePackage: return SymbolDefinitions.WixBundleExePackage; diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBootstrapperExtensionSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBootstrapperExtensionSymbol.cs new file mode 100644 index 000000000..b53848fc9 --- /dev/null +++ b/src/api/wix/WixToolset.Data/Symbols/WixBootstrapperExtensionSymbol.cs @@ -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. + +namespace WixToolset.Data +{ + using WixToolset.Data.Symbols; + + public static partial class SymbolDefinitions + { + public static readonly IntermediateSymbolDefinition WixBootstrapperExtension = new IntermediateSymbolDefinition( + SymbolDefinitionType.WixBootstrapperExtension, + new[] + { + new IntermediateFieldDefinition(nameof(WixBootstrapperExtensionSymbolFields.PayloadRef), IntermediateFieldType.String), + }, + typeof(WixBootstrapperExtensionSymbol)); + } +} + +namespace WixToolset.Data.Symbols +{ + public enum WixBootstrapperExtensionSymbolFields + { + PayloadRef, + } + + public class WixBootstrapperExtensionSymbol : IntermediateSymbol + { + public WixBootstrapperExtensionSymbol() : base(SymbolDefinitions.WixBootstrapperExtension, null, null) + { + } + + public WixBootstrapperExtensionSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixBootstrapperExtension, sourceLineNumber, id) + { + } + + public IntermediateField this[WixBootstrapperExtensionSymbolFields index] => this.Fields[(int)index]; + + public string PayloadRef + { + get => (string)this.Fields[(int)WixBootstrapperExtensionSymbolFields.PayloadRef]; + set => this.Set((int)WixBootstrapperExtensionSymbolFields.PayloadRef, value); + } + } +} diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleCustomDataSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleCustomDataSymbol.cs index 0490f9f79..032ebda87 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleCustomDataSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixBundleCustomDataSymbol.cs @@ -12,7 +12,7 @@ public static partial class SymbolDefinitions { new IntermediateFieldDefinition(nameof(WixBundleCustomDataSymbolFields.AttributeNames), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixBundleCustomDataSymbolFields.Type), IntermediateFieldType.Number), - new IntermediateFieldDefinition(nameof(WixBundleCustomDataSymbolFields.BundleExtensionRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixBundleCustomDataSymbolFields.BootstrapperExtensionRef), IntermediateFieldType.String), }, typeof(WixBundleCustomDataSymbol)); } @@ -24,14 +24,14 @@ public enum WixBundleCustomDataSymbolFields { AttributeNames, Type, - BundleExtensionRef, + BootstrapperExtensionRef, } public enum WixBundleCustomDataType { Unknown, BootstrapperApplication, - BundleExtension, + BootstrapperExtension, } public class WixBundleCustomDataSymbol : IntermediateSymbol @@ -60,10 +60,10 @@ public WixBundleCustomDataType Type set => this.Set((int)WixBundleCustomDataSymbolFields.Type, (int)value); } - public string BundleExtensionRef + public string BootstrapperExtensionRef { - get => (string)this.Fields[(int)WixBundleCustomDataSymbolFields.BundleExtensionRef]; - set => this.Set((int)WixBundleCustomDataSymbolFields.BundleExtensionRef, value); + get => (string)this.Fields[(int)WixBundleCustomDataSymbolFields.BootstrapperExtensionRef]; + set => this.Set((int)WixBundleCustomDataSymbolFields.BootstrapperExtensionRef, value); } public string[] AttributeNamesSeparated => this.AttributeNames.Split(AttributeNamesSeparator); diff --git a/src/api/wix/WixToolset.Data/Symbols/WixBundleExtensionSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixBundleExtensionSymbol.cs deleted file mode 100644 index 8e6bea58b..000000000 --- a/src/api/wix/WixToolset.Data/Symbols/WixBundleExtensionSymbol.cs +++ /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. - -namespace WixToolset.Data -{ - using WixToolset.Data.Symbols; - - public static partial class SymbolDefinitions - { - public static readonly IntermediateSymbolDefinition WixBundleExtension = new IntermediateSymbolDefinition( - SymbolDefinitionType.WixBundleExtension, - new[] - { - new IntermediateFieldDefinition(nameof(WixBundleExtensionSymbolFields.PayloadRef), IntermediateFieldType.String), - }, - typeof(WixBundleExtensionSymbol)); - } -} - -namespace WixToolset.Data.Symbols -{ - public enum WixBundleExtensionSymbolFields - { - PayloadRef, - } - - public class WixBundleExtensionSymbol : IntermediateSymbol - { - public WixBundleExtensionSymbol() : base(SymbolDefinitions.WixBundleExtension, null, null) - { - } - - public WixBundleExtensionSymbol(SourceLineNumber sourceLineNumber, Identifier id = null) : base(SymbolDefinitions.WixBundleExtension, sourceLineNumber, id) - { - } - - public IntermediateField this[WixBundleExtensionSymbolFields index] => this.Fields[(int)index]; - - public string PayloadRef - { - get => (string)this.Fields[(int)WixBundleExtensionSymbolFields.PayloadRef]; - set => this.Set((int)WixBundleExtensionSymbolFields.PayloadRef, value); - } - } -} diff --git a/src/api/wix/WixToolset.Data/Symbols/WixSearchSymbol.cs b/src/api/wix/WixToolset.Data/Symbols/WixSearchSymbol.cs index 2d6a927c4..5327d0359 100644 --- a/src/api/wix/WixToolset.Data/Symbols/WixSearchSymbol.cs +++ b/src/api/wix/WixToolset.Data/Symbols/WixSearchSymbol.cs @@ -12,7 +12,7 @@ public static partial class SymbolDefinitions { new IntermediateFieldDefinition(nameof(WixSearchSymbolFields.Variable), IntermediateFieldType.String), new IntermediateFieldDefinition(nameof(WixSearchSymbolFields.Condition), IntermediateFieldType.String), - new IntermediateFieldDefinition(nameof(WixSearchSymbolFields.BundleExtensionRef), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(WixSearchSymbolFields.BootstrapperExtensionRef), IntermediateFieldType.String), }, typeof(WixSearchSymbol)); } @@ -24,7 +24,7 @@ public enum WixSearchSymbolFields { Variable, Condition, - BundleExtensionRef, + BootstrapperExtensionRef, } public class WixSearchSymbol : IntermediateSymbol @@ -51,10 +51,10 @@ public string Condition set => this.Set((int)WixSearchSymbolFields.Condition, value); } - public string BundleExtensionRef + public string BootstrapperExtensionRef { - get => (string)this.Fields[(int)WixSearchSymbolFields.BundleExtensionRef]; - set => this.Set((int)WixSearchSymbolFields.BundleExtensionRef, value); + get => (string)this.Fields[(int)WixSearchSymbolFields.BootstrapperExtensionRef]; + set => this.Set((int)WixSearchSymbolFields.BootstrapperExtensionRef, value); } } -} \ No newline at end of file +} diff --git a/src/api/wix/WixToolset.Extensibility/Services/IBurnBackendHelper.cs b/src/api/wix/WixToolset.Extensibility/Services/IBurnBackendHelper.cs index 1b6a2828d..a404a7787 100644 --- a/src/api/wix/WixToolset.Extensibility/Services/IBurnBackendHelper.cs +++ b/src/api/wix/WixToolset.Extensibility/Services/IBurnBackendHelper.cs @@ -28,14 +28,14 @@ public interface IBurnBackendHelper : IBackendHelper, IBundleValidator void AddBootstrapperApplicationData(IntermediateSymbol symbol, bool symbolIdIsIdAttribute = false); /// - /// Adds the given XML to the BundleExtensionData manifest for the given bundle extension. + /// Adds the given XML to the BootstrapperExtensionData manifest for the given bundle extension. /// /// The bundle extension's id. /// A valid XML fragment. - void AddBundleExtensionData(string extensionId, string xml); + void AddBootstrapperExtensionData(string extensionId, string xml); /// - /// Adds an XML element for the given symbol to the BundleExtensionData manifest for the given bundle extension. + /// Adds an XML element for the given symbol to the BootstrapperExtensionData manifest for the given bundle extension. /// The symbol's name is used for the element's name. /// All of the symbol's fields are used for the element's attributes. /// @@ -45,6 +45,6 @@ public interface IBurnBackendHelper : IBackendHelper, IBundleValidator /// If true and the symbol has an Id, /// then an Id attribute is created with a value of the symbol's Id. /// - void AddBundleExtensionData(string extensionId, IntermediateSymbol symbol, bool symbolIdIsIdAttribute = false); + void AddBootstrapperExtensionData(string extensionId, IntermediateSymbol symbol, bool symbolIdIsIdAttribute = false); } } diff --git a/src/api/wix/WixToolset.Extensibility/Services/IParseHelper.cs b/src/api/wix/WixToolset.Extensibility/Services/IParseHelper.cs index e7856c7c5..b3b1b4c11 100644 --- a/src/api/wix/WixToolset.Extensibility/Services/IParseHelper.cs +++ b/src/api/wix/WixToolset.Extensibility/Services/IParseHelper.cs @@ -201,8 +201,8 @@ public interface IParseHelper /// The Burn variable to store the result into. /// A condition to test before evaluating the search. /// The search that this one will execute after. - /// The id of the bundle extension that handles this search. - void CreateWixSearchSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after, string bundleExtensionId); + /// The id of the bootstrapper extension that handles this search. + void CreateWixSearchSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after, string bootstrapperExtensionId); /// /// diff --git a/src/burn/engine/EngineForExtension.cpp b/src/burn/engine/EngineForExtension.cpp index bb134a61a..e19cb802d 100644 --- a/src/burn/engine/EngineForExtension.cpp +++ b/src/burn/engine/EngineForExtension.cpp @@ -10,8 +10,8 @@ static HRESULT BEEngineEscapeString( ) { HRESULT hr = S_OK; - ValidateMessageArgs(hr, pvArgs, BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_ARGS, pArgs); - ValidateMessageResults(hr, pvResults, BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_RESULTS, pResults); + ValidateMessageArgs(hr, pvArgs, BOOTSTRAPPER_EXTENSION_ENGINE_ESCAPESTRING_ARGS, pArgs); + ValidateMessageResults(hr, pvResults, BOOTSTRAPPER_EXTENSION_ENGINE_ESCAPESTRING_RESULTS, pResults); hr = ExternalEngineEscapeString(pArgs->wzIn, pResults->wzOut, &pResults->cchOut); @@ -26,8 +26,8 @@ static HRESULT BEEngineEvaluateCondition( ) { HRESULT hr = S_OK; - ValidateMessageArgs(hr, pvArgs, BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_ARGS, pArgs); - ValidateMessageResults(hr, pvResults, BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_RESULTS, pResults); + ValidateMessageArgs(hr, pvArgs, BOOTSTRAPPER_EXTENSION_ENGINE_EVALUATECONDITION_ARGS, pArgs); + ValidateMessageResults(hr, pvResults, BOOTSTRAPPER_EXTENSION_ENGINE_EVALUATECONDITION_RESULTS, pResults); hr = ExternalEngineEvaluateCondition(pContext->pEngineState, pArgs->wzCondition, &pResults->f); @@ -42,8 +42,8 @@ static HRESULT BEEngineFormatString( ) { HRESULT hr = S_OK; - ValidateMessageArgs(hr, pvArgs, BUNDLE_EXTENSION_ENGINE_FORMATSTRING_ARGS, pArgs); - ValidateMessageResults(hr, pvResults, BUNDLE_EXTENSION_ENGINE_FORMATSTRING_RESULTS, pResults); + ValidateMessageArgs(hr, pvArgs, BOOTSTRAPPER_EXTENSION_ENGINE_FORMATSTRING_ARGS, pArgs); + ValidateMessageResults(hr, pvResults, BOOTSTRAPPER_EXTENSION_ENGINE_FORMATSTRING_RESULTS, pResults); hr = ExternalEngineFormatString(pContext->pEngineState, pArgs->wzIn, pResults->wzOut, &pResults->cchOut); @@ -58,8 +58,8 @@ static HRESULT BEEngineGetVariableNumeric( ) { HRESULT hr = S_OK; - ValidateMessageArgs(hr, pvArgs, BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS, pArgs); - ValidateMessageResults(hr, pvResults, BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_RESULTS, pResults); + ValidateMessageArgs(hr, pvArgs, BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS, pArgs); + ValidateMessageResults(hr, pvResults, BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLENUMERIC_RESULTS, pResults); hr = ExternalEngineGetVariableNumeric(pContext->pEngineState, pArgs->wzVariable, &pResults->llValue); @@ -74,8 +74,8 @@ static HRESULT BEEngineGetVariableString( ) { HRESULT hr = S_OK; - ValidateMessageArgs(hr, pvArgs, BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_ARGS, pArgs); - ValidateMessageResults(hr, pvResults, BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS, pResults); + ValidateMessageArgs(hr, pvArgs, BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLESTRING_ARGS, pArgs); + ValidateMessageResults(hr, pvResults, BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS, pResults); hr = ExternalEngineGetVariableString(pContext->pEngineState, pArgs->wzVariable, pResults->wzValue, &pResults->cchValue); @@ -90,8 +90,8 @@ static HRESULT BEEngineGetVariableVersion( ) { HRESULT hr = S_OK; - ValidateMessageArgs(hr, pvArgs, BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS, pArgs); - ValidateMessageResults(hr, pvResults, BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS, pResults); + ValidateMessageArgs(hr, pvArgs, BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS, pArgs); + ValidateMessageResults(hr, pvResults, BOOTSTRAPPER_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS, pResults); hr = ExternalEngineGetVariableVersion(pContext->pEngineState, pArgs->wzVariable, pResults->wzValue, &pResults->cchValue); @@ -107,24 +107,24 @@ static HRESULT BEEngineLog( { HRESULT hr = S_OK; REPORT_LEVEL rl = REPORT_NONE; - ValidateMessageArgs(hr, pvArgs, BUNDLE_EXTENSION_ENGINE_LOG_ARGS, pArgs); - ValidateMessageResults(hr, pvResults, BUNDLE_EXTENSION_ENGINE_LOG_RESULTS, pResults); + ValidateMessageArgs(hr, pvArgs, BOOTSTRAPPER_EXTENSION_ENGINE_LOG_ARGS, pArgs); + ValidateMessageResults(hr, pvResults, BOOTSTRAPPER_EXTENSION_ENGINE_LOG_RESULTS, pResults); switch (pArgs->level) { - case BUNDLE_EXTENSION_LOG_LEVEL_STANDARD: + case BOOTSTRAPPER_EXTENSION_LOG_LEVEL_STANDARD: rl = REPORT_STANDARD; break; - case BUNDLE_EXTENSION_LOG_LEVEL_VERBOSE: + case BOOTSTRAPPER_EXTENSION_LOG_LEVEL_VERBOSE: rl = REPORT_VERBOSE; break; - case BUNDLE_EXTENSION_LOG_LEVEL_DEBUG: + case BOOTSTRAPPER_EXTENSION_LOG_LEVEL_DEBUG: rl = REPORT_DEBUG; break; - case BUNDLE_EXTENSION_LOG_LEVEL_ERROR: + case BOOTSTRAPPER_EXTENSION_LOG_LEVEL_ERROR: rl = REPORT_ERROR; break; @@ -146,8 +146,8 @@ static HRESULT BEEngineSetVariableNumeric( ) { HRESULT hr = S_OK; - ValidateMessageArgs(hr, pvArgs, BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS, pArgs); - ValidateMessageResults(hr, pvResults, BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS, pResults); + ValidateMessageArgs(hr, pvArgs, BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS, pArgs); + ValidateMessageResults(hr, pvResults, BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS, pResults); hr = ExternalEngineSetVariableNumeric(pContext->pEngineState, pArgs->wzVariable, pArgs->llValue); @@ -162,8 +162,8 @@ static HRESULT BEEngineSetVariableString( ) { HRESULT hr = S_OK; - ValidateMessageArgs(hr, pvArgs, BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_ARGS, pArgs); - ValidateMessageResults(hr, pvResults, BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_RESULTS, pResults); + ValidateMessageArgs(hr, pvArgs, BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLESTRING_ARGS, pArgs); + ValidateMessageResults(hr, pvResults, BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLESTRING_RESULTS, pResults); hr = ExternalEngineSetVariableString(pContext->pEngineState, pArgs->wzVariable, pArgs->wzValue, pArgs->fFormatted); @@ -178,8 +178,8 @@ static HRESULT BEEngineSetVariableVersion( ) { HRESULT hr = S_OK; - ValidateMessageArgs(hr, pvArgs, BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS, pArgs); - ValidateMessageResults(hr, pvResults, BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_RESULTS, pResults); + ValidateMessageArgs(hr, pvArgs, BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS, pArgs); + ValidateMessageResults(hr, pvResults, BOOTSTRAPPER_EXTENSION_ENGINE_SETVARIABLEVERSION_RESULTS, pResults); hr = ExternalEngineSetVariableVersion(pContext->pEngineState, pArgs->wzVariable, pArgs->wzValue); @@ -194,8 +194,8 @@ static HRESULT BEEngineCompareVersions( ) { HRESULT hr = S_OK; - ValidateMessageArgs(hr, pvArgs, BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_ARGS, pArgs); - ValidateMessageResults(hr, pvResults, BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_RESULTS, pResults); + ValidateMessageArgs(hr, pvArgs, BOOTSTRAPPER_EXTENSION_ENGINE_COMPAREVERSIONS_ARGS, pArgs); + ValidateMessageResults(hr, pvResults, BOOTSTRAPPER_EXTENSION_ENGINE_COMPAREVERSIONS_RESULTS, pResults); hr = ExternalEngineCompareVersions(pArgs->wzVersion1, pArgs->wzVersion2, &pResults->nResult); @@ -210,8 +210,8 @@ static HRESULT BEEngineGetRelatedBundleVariable( ) { HRESULT hr = S_OK; - ValidateMessageArgs(hr, pvArgs, BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS, pArgs); - ValidateMessageResults(hr, pvResults, BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS, pResults); + ValidateMessageArgs(hr, pvArgs, BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS, pArgs); + ValidateMessageResults(hr, pvResults, BOOTSTRAPPER_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS, pResults); hr = ExternalEngineGetRelatedBundleVariable(pContext->pEngineState, pArgs->wzBundleId, pArgs->wzVariable, pResults->wzValue, &pResults->cchValue); @@ -220,7 +220,7 @@ static HRESULT BEEngineGetRelatedBundleVariable( } HRESULT WINAPI EngineForExtensionProc( - __in BUNDLE_EXTENSION_ENGINE_MESSAGE message, + __in BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE message, __in const LPVOID pvArgs, __inout LPVOID pvResults, __in_opt LPVOID pvContext @@ -236,40 +236,40 @@ HRESULT WINAPI EngineForExtensionProc( switch (message) { - case BUNDLE_EXTENSION_ENGINE_MESSAGE_ESCAPESTRING: + case BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_ESCAPESTRING: hr = BEEngineEscapeString(pContext, pvArgs, pvResults); break; - case BUNDLE_EXTENSION_ENGINE_MESSAGE_EVALUATECONDITION: + case BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_EVALUATECONDITION: hr = BEEngineEvaluateCondition(pContext, pvArgs, pvResults); break; - case BUNDLE_EXTENSION_ENGINE_MESSAGE_FORMATSTRING: + case BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_FORMATSTRING: hr = BEEngineFormatString(pContext, pvArgs, pvResults); break; - case BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLENUMERIC: + case BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_GETVARIABLENUMERIC: hr = BEEngineGetVariableNumeric(pContext, pvArgs, pvResults); break; - case BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLESTRING: + case BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_GETVARIABLESTRING: hr = BEEngineGetVariableString(pContext, pvArgs, pvResults); break; - case BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLEVERSION: + case BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_GETVARIABLEVERSION: hr = BEEngineGetVariableVersion(pContext, pvArgs, pvResults); break; - case BUNDLE_EXTENSION_ENGINE_MESSAGE_LOG: + case BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_LOG: hr = BEEngineLog(pContext, pvArgs, pvResults); break; - case BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLENUMERIC: + case BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_SETVARIABLENUMERIC: hr = BEEngineSetVariableNumeric(pContext, pvArgs, pvResults); break; - case BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLESTRING: + case BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_SETVARIABLESTRING: hr = BEEngineSetVariableString(pContext, pvArgs, pvResults); break; - case BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLEVERSION: + case BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_SETVARIABLEVERSION: hr = BEEngineSetVariableVersion(pContext, pvArgs, pvResults); break; - case BUNDLE_EXTENSION_ENGINE_MESSAGE_COMPAREVERSIONS: + case BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_COMPAREVERSIONS: hr = BEEngineCompareVersions(pContext, pvArgs, pvResults); break; - case BUNDLE_EXTENSION_ENGINE_MESSAGE_GETRELATEDBUNDLEVARIABLE: + case BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE_GETRELATEDBUNDLEVARIABLE: hr = BEEngineGetRelatedBundleVariable(pContext, pvArgs, pvResults); break; default: diff --git a/src/burn/engine/EngineForExtension.h b/src/burn/engine/EngineForExtension.h index bad5f08ad..b52d4f0ab 100644 --- a/src/burn/engine/EngineForExtension.h +++ b/src/burn/engine/EngineForExtension.h @@ -16,7 +16,7 @@ typedef struct _BURN_EXTENSION_ENGINE_CONTEXT // function declarations HRESULT WINAPI EngineForExtensionProc( - __in BUNDLE_EXTENSION_ENGINE_MESSAGE message, + __in BOOTSTRAPPER_EXTENSION_ENGINE_MESSAGE message, __in const LPVOID pvArgs, __inout LPVOID pvResults, __in_opt LPVOID pvContext diff --git a/src/burn/engine/burnextension.cpp b/src/burn/engine/burnextension.cpp index ee4b15422..536dbcc9b 100644 --- a/src/burn/engine/burnextension.cpp +++ b/src/burn/engine/burnextension.cpp @@ -5,7 +5,7 @@ static HRESULT SendRequiredBextMessage( __in BURN_EXTENSION* pExtension, - __in BUNDLE_EXTENSION_MESSAGE message, + __in BOOTSTRAPPER_EXTENSION_MESSAGE message, __in const LPVOID pvArgs, __inout LPVOID pvResults ); @@ -13,7 +13,7 @@ static HRESULT SendRequiredBextMessage( // function definitions /******************************************************************* - BurnExtensionParseFromXml - + BurnExtensionParseFromXml - *******************************************************************/ EXTERN_C HRESULT BurnExtensionParseFromXml( @@ -28,22 +28,22 @@ EXTERN_C HRESULT BurnExtensionParseFromXml( DWORD cNodes = 0; LPWSTR scz = NULL; - // Select BundleExtension nodes. - hr = XmlSelectNodes(pixnBundle, L"BundleExtension", &pixnNodes); - ExitOnFailure(hr, "Failed to select BundleExtension nodes."); + // Select BootstrapperExtension nodes. + hr = XmlSelectNodes(pixnBundle, L"BootstrapperExtension", &pixnNodes); + ExitOnFailure(hr, "Failed to select BootstrapperExtension nodes."); - // Get BundleExtension node count. + // Get BootstrapperExtension node count. hr = pixnNodes->get_length((long*)&cNodes); - ExitOnFailure(hr, "Failed to get BundleExtension node count."); + ExitOnFailure(hr, "Failed to get BootstrapperExtension node count."); if (!cNodes) { ExitFunction(); } - // Allocate memory for BundleExtensions. + // Allocate memory for BootstrapperExtensions. pBurnExtensions->rgExtensions = (BURN_EXTENSION*)MemAlloc(sizeof(BURN_EXTENSION) * cNodes, TRUE); - ExitOnNull(pBurnExtensions->rgExtensions, hr, E_OUTOFMEMORY, "Failed to allocate memory for BundleExtension structs."); + ExitOnNull(pBurnExtensions->rgExtensions, hr, E_OUTOFMEMORY, "Failed to allocate memory for BootstrapperExtension structs."); pBurnExtensions->cExtensions = cNodes; @@ -64,7 +64,7 @@ EXTERN_C HRESULT BurnExtensionParseFromXml( ExitOnFailure(hr, "Failed to get @EntryPayloadSourcePath."); hr = PayloadFindEmbeddedBySourcePath(pBaPayloads->sdhPayloads, scz, &pExtension->pEntryPayload); - ExitOnFailure(hr, "Failed to find BundleExtension EntryPayload '%ls'.", pExtension->sczId); + ExitOnFailure(hr, "Failed to find BootstrapperExtension EntryPayload '%ls'.", pExtension->sczId); // prepare next iteration ReleaseNullObject(pixnNode); @@ -81,7 +81,7 @@ EXTERN_C HRESULT BurnExtensionParseFromXml( } /******************************************************************* - BurnExtensionUninitialize - + BurnExtensionUninitialize - *******************************************************************/ EXTERN_C void BurnExtensionUninitialize( @@ -104,7 +104,7 @@ EXTERN_C void BurnExtensionUninitialize( } /******************************************************************* - BurnExtensionLoad - + BurnExtensionLoad - *******************************************************************/ EXTERN_C HRESULT BurnExtensionLoad( @@ -113,59 +113,59 @@ EXTERN_C HRESULT BurnExtensionLoad( ) { HRESULT hr = S_OK; - LPWSTR sczBundleExtensionDataPath = NULL; - BUNDLE_EXTENSION_CREATE_ARGS args = { }; - BUNDLE_EXTENSION_CREATE_RESULTS results = { }; + LPWSTR sczBootstrapperExtensionDataPath = NULL; + BOOTSTRAPPER_EXTENSION_CREATE_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_CREATE_RESULTS results = { }; if (!pBurnExtensions->rgExtensions || !pBurnExtensions->cExtensions) { ExitFunction(); } - hr = PathConcat(pEngineContext->pEngineState->userExperience.sczTempDirectory, L"BundleExtensionData.xml", &sczBundleExtensionDataPath); - ExitOnFailure(hr, "Failed to get BundleExtensionDataPath."); + hr = PathConcat(pEngineContext->pEngineState->userExperience.sczTempDirectory, L"BootstrapperExtensionData.xml", &sczBootstrapperExtensionDataPath); + ExitOnFailure(hr, "Failed to get BootstrapperExtensionDataPath."); for (DWORD i = 0; i < pBurnExtensions->cExtensions; ++i) { BURN_EXTENSION* pExtension = &pBurnExtensions->rgExtensions[i]; - memset(&args, 0, sizeof(BUNDLE_EXTENSION_CREATE_ARGS)); - memset(&results, 0, sizeof(BUNDLE_EXTENSION_CREATE_RESULTS)); + memset(&args, 0, sizeof(BOOTSTRAPPER_EXTENSION_CREATE_ARGS)); + memset(&results, 0, sizeof(BOOTSTRAPPER_EXTENSION_CREATE_RESULTS)); - args.cbSize = sizeof(BUNDLE_EXTENSION_CREATE_ARGS); - args.pfnBundleExtensionEngineProc = EngineForExtensionProc; - args.pvBundleExtensionEngineProcContext = pEngineContext; + args.cbSize = sizeof(BOOTSTRAPPER_EXTENSION_CREATE_ARGS); + args.pfnBootstrapperExtensionEngineProc = EngineForExtensionProc; + args.pvBootstrapperExtensionEngineProcContext = pEngineContext; args.qwEngineAPIVersion = MAKEQWORDVERSION(2021, 4, 27, 0); args.wzBootstrapperWorkingFolder = pEngineContext->pEngineState->userExperience.sczTempDirectory; - args.wzBundleExtensionDataPath = sczBundleExtensionDataPath; + args.wzBootstrapperExtensionDataPath = sczBootstrapperExtensionDataPath; args.wzExtensionId = pExtension->sczId; - results.cbSize = sizeof(BUNDLE_EXTENSION_CREATE_RESULTS); + results.cbSize = sizeof(BOOTSTRAPPER_EXTENSION_CREATE_RESULTS); - // Load BundleExtension DLL. + // Load BootstrapperExtension DLL. pExtension->hBextModule = ::LoadLibraryExW(pExtension->pEntryPayload->sczLocalFilePath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); - ExitOnNullWithLastError(pExtension->hBextModule, hr, "Failed to load BundleExtension DLL '%ls': '%ls'.", pExtension->sczId, pExtension->pEntryPayload->sczLocalFilePath); + ExitOnNullWithLastError(pExtension->hBextModule, hr, "Failed to load BootstrapperExtension DLL '%ls': '%ls'.", pExtension->sczId, pExtension->pEntryPayload->sczLocalFilePath); - // Get BundleExtensionCreate entry-point. - PFN_BUNDLE_EXTENSION_CREATE pfnCreate = (PFN_BUNDLE_EXTENSION_CREATE)::GetProcAddress(pExtension->hBextModule, "BundleExtensionCreate"); - ExitOnNullWithLastError(pfnCreate, hr, "Failed to get BundleExtensionCreate entry-point '%ls'.", pExtension->sczId); + // Get BootstrapperExtensionCreate entry-point. + PFN_BOOTSTRAPPER_EXTENSION_CREATE pfnCreate = (PFN_BOOTSTRAPPER_EXTENSION_CREATE)::GetProcAddress(pExtension->hBextModule, "BootstrapperExtensionCreate"); + ExitOnNullWithLastError(pfnCreate, hr, "Failed to get BootstrapperExtensionCreate entry-point '%ls'.", pExtension->sczId); - // Create BundleExtension. + // Create BootstrapperExtension. hr = pfnCreate(&args, &results); - ExitOnFailure(hr, "Failed to create BundleExtension '%ls'.", pExtension->sczId); + ExitOnFailure(hr, "Failed to create BootstrapperExtension '%ls'.", pExtension->sczId); - pExtension->pfnBurnExtensionProc = results.pfnBundleExtensionProc; - pExtension->pvBurnExtensionProcContext = results.pvBundleExtensionProcContext; + pExtension->pfnBurnExtensionProc = results.pfnBootstrapperExtensionProc; + pExtension->pvBurnExtensionProcContext = results.pvBootstrapperExtensionProcContext; } LExit: - ReleaseStr(sczBundleExtensionDataPath); + ReleaseStr(sczBootstrapperExtensionDataPath); return hr; } /******************************************************************* - BurnExtensionUnload - + BurnExtensionUnload - *******************************************************************/ EXTERN_C void BurnExtensionUnload( @@ -182,18 +182,18 @@ EXTERN_C void BurnExtensionUnload( if (pExtension->hBextModule) { - // Get BundleExtensionDestroy entry-point and call it if it exists. - PFN_BUNDLE_EXTENSION_DESTROY pfnDestroy = (PFN_BUNDLE_EXTENSION_DESTROY)::GetProcAddress(pExtension->hBextModule, "BundleExtensionDestroy"); + // Get BootstrapperExtensionDestroy entry-point and call it if it exists. + PFN_BOOTSTRAPPER_EXTENSION_DESTROY pfnDestroy = (PFN_BOOTSTRAPPER_EXTENSION_DESTROY)::GetProcAddress(pExtension->hBextModule, "BootstrapperExtensionDestroy"); if (pfnDestroy) { pfnDestroy(); } - // Free BundleExtension DLL. + // Free BootstrapperExtension DLL. if (!::FreeLibrary(pExtension->hBextModule)) { hr = HRESULT_FROM_WIN32(::GetLastError()); - TraceError(hr, "Failed to unload BundleExtension DLL."); + TraceError(hr, "Failed to unload BootstrapperExtension DLL."); } pExtension->hBextModule = NULL; } @@ -234,8 +234,8 @@ EXTERN_C BEEAPI BurnExtensionPerformSearch( ) { HRESULT hr = S_OK; - BUNDLE_EXTENSION_SEARCH_ARGS args = { }; - BUNDLE_EXTENSION_SEARCH_RESULTS results = { }; + BOOTSTRAPPER_EXTENSION_SEARCH_ARGS args = { }; + BOOTSTRAPPER_EXTENSION_SEARCH_RESULTS results = { }; args.cbSize = sizeof(args); args.wzId = wzSearchId; @@ -243,8 +243,8 @@ EXTERN_C BEEAPI BurnExtensionPerformSearch( results.cbSize = sizeof(results); - hr = SendRequiredBextMessage(pExtension, BUNDLE_EXTENSION_MESSAGE_SEARCH, &args, &results); - ExitOnFailure(hr, "BundleExtension '%ls' Search '%ls' failed.", pExtension->sczId, wzSearchId); + hr = SendRequiredBextMessage(pExtension, BOOTSTRAPPER_EXTENSION_MESSAGE_SEARCH, &args, &results); + ExitOnFailure(hr, "BootstrapperExtension '%ls' Search '%ls' failed.", pExtension->sczId, wzSearchId); LExit: return hr; @@ -252,7 +252,7 @@ EXTERN_C BEEAPI BurnExtensionPerformSearch( static HRESULT SendRequiredBextMessage( __in BURN_EXTENSION* pExtension, - __in BUNDLE_EXTENSION_MESSAGE message, + __in BOOTSTRAPPER_EXTENSION_MESSAGE message, __in const LPVOID pvArgs, __inout LPVOID pvResults ) diff --git a/src/burn/engine/burnextension.h b/src/burn/engine/burnextension.h index 3529ef38a..d69266475 100644 --- a/src/burn/engine/burnextension.h +++ b/src/burn/engine/burnextension.h @@ -18,7 +18,7 @@ typedef struct _BURN_EXTENSION BURN_PAYLOAD* pEntryPayload; HMODULE hBextModule; - PFN_BUNDLE_EXTENSION_PROC pfnBurnExtensionProc; + PFN_BOOTSTRAPPER_EXTENSION_PROC pfnBurnExtensionProc; LPVOID pvBurnExtensionProcContext; } BURN_EXTENSION; diff --git a/src/burn/engine/engine.cpp b/src/burn/engine/engine.cpp index 9daa18a15..619ff0d1f 100644 --- a/src/burn/engine/engine.cpp +++ b/src/burn/engine/engine.cpp @@ -535,7 +535,7 @@ static HRESULT RunNormal( // Load the extensions. hr = BurnExtensionLoad(&pEngineState->extensions, &extensionEngineContext); - ExitOnFailure(hr, "Failed to load BundleExtensions."); + ExitOnFailure(hr, "Failed to load BootstrapperExtensions."); // The secondary bootstrapper application only gets one chance to execute. That means // first time through we run the primary bootstrapper application and on reload we run diff --git a/src/burn/engine/engine.vcxproj b/src/burn/engine/engine.vcxproj index 73985d514..62e039413 100644 --- a/src/burn/engine/engine.vcxproj +++ b/src/burn/engine/engine.vcxproj @@ -104,8 +104,8 @@ - - + + diff --git a/src/burn/engine/precomp.h b/src/burn/engine/precomp.h index 3b9693ff2..348c78ce4 100644 --- a/src/burn/engine/precomp.h +++ b/src/burn/engine/precomp.h @@ -62,7 +62,7 @@ #include #include "BootstrapperApplication.h" -#include "BundleExtension.h" +#include "BootstrapperExtension.h" #include "platform.h" #include "variant.h" diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/BasicFunctionality_BundleA_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/BasicFunctionality_BundleA_manifest.xml index f4cc28201..975a38052 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/BasicFunctionality_BundleA_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/BasicFunctionality_BundleA_manifest.xml @@ -8,8 +8,8 @@ - - + + diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/BundlePackage_Multiple_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/BundlePackage_Multiple_manifest.xml index b75899cc9..a86965373 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/BundlePackage_Multiple_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/BundlePackage_Multiple_manifest.xml @@ -38,8 +38,8 @@ - - + + diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/ExePackage_PerUserArpEntry_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/ExePackage_PerUserArpEntry_manifest.xml index 680f6c5f0..167bfbbb5 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/ExePackage_PerUserArpEntry_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/ExePackage_PerUserArpEntry_manifest.xml @@ -38,8 +38,8 @@ - - + + diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/Failure_BundleD_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/Failure_BundleD_manifest.xml index bfe1dfee6..4e15fddb7 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/Failure_BundleD_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/Failure_BundleD_manifest.xml @@ -39,8 +39,8 @@ - - + + diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/MsiTransaction_BundleAv1_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/MsiTransaction_BundleAv1_manifest.xml index 73c6078d2..c92947074 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/MsiTransaction_BundleAv1_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/MsiTransaction_BundleAv1_manifest.xml @@ -8,8 +8,8 @@ - - + + diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/MsuPackageFixture_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/MsuPackageFixture_manifest.xml index 675183b19..824cf4898 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/MsuPackageFixture_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/MsuPackageFixture_manifest.xml @@ -4,8 +4,8 @@ - - + + diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_manifest.xml index c5ca03b62..d1fd96bba 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_manifest.xml @@ -38,8 +38,8 @@ - - + + diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_modified_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_modified_manifest.xml index 52091ebde..2f8295869 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_modified_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_modified_manifest.xml @@ -38,8 +38,8 @@ - - + + diff --git a/src/burn/test/BurnUnitTest/precomp.h b/src/burn/test/BurnUnitTest/precomp.h index 0f98480a8..7a84dd41b 100644 --- a/src/burn/test/BurnUnitTest/precomp.h +++ b/src/burn/test/BurnUnitTest/precomp.h @@ -38,7 +38,7 @@ #include #include "BootstrapperApplication.h" -#include "BundleExtension.h" +#include "BootstrapperExtension.h" #include "platform.h" #include "variant.h" diff --git a/src/clean.cmd b/src/clean.cmd index f2f10cd37..6164a8f98 100644 --- a/src/clean.cmd +++ b/src/clean.cmd @@ -22,6 +22,7 @@ if exist "%_NUGET_CACHE%\wixinternal.testsupport" rd /s/q "%_NUGET_CACHE%\wixint if exist "%_NUGET_CACHE%\wixinternal.core.testpackage" rd /s/q "%_NUGET_CACHE%\wixinternal.core.testpackage" if exist "%_NUGET_CACHE%\wixtoolset.bal.wixext" rd /s/q "%_NUGET_CACHE%\wixtoolset.bal.wixext" if exist "%_NUGET_CACHE%\wixtoolset.bootstrapperapplications.wixext" rd /s/q "%_NUGET_CACHE%\wixtoolset.bootstrapperapplications.wixext" +if exist "%_NUGET_CACHE%\wixtoolset.bootstrapperextensionapi" rd /s/q "%_NUGET_CACHE%\wixtoolset.bootstrapperextensionapi" if exist "%_NUGET_CACHE%\wixtoolset.bextutil" rd /s/q "%_NUGET_CACHE%\wixtoolset.bextutil" if exist "%_NUGET_CACHE%\wixtoolset.burn" rd /s/q "%_NUGET_CACHE%\wixtoolset.burn" if exist "%_NUGET_CACHE%\wixtoolset.complus.wixext" rd /s/q "%_NUGET_CACHE%\wixtoolset.complus.wixext" diff --git a/src/ext/NetFx/be/NetfxBundleExtension.cpp b/src/ext/NetFx/be/NetfxBootstrapperExtension.cpp similarity index 53% rename from src/ext/NetFx/be/NetfxBundleExtension.cpp rename to src/ext/NetFx/be/NetfxBootstrapperExtension.cpp index 838a97c1d..ab30e3782 100644 --- a/src/ext/NetFx/be/NetfxBundleExtension.cpp +++ b/src/ext/NetFx/be/NetfxBootstrapperExtension.cpp @@ -1,11 +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 "BextBaseBundleExtension.h" +#include "BextBaseBootstrapperExtension.h" -class CWixNetfxBundleExtension : public CBextBaseBundleExtension +class CWixNetfxBootstrapperExtension : public CBextBaseBootstrapperExtension { -public: // IBundleExtension +public: // IBootstrapperExtension virtual STDMETHODIMP Search( __in LPCWSTR wzId, __in LPCWSTR wzVariable @@ -18,18 +18,18 @@ class CWixNetfxBundleExtension : public CBextBaseBundleExtension return hr; } -public: //CBextBaseBundleExtension +public: //CBextBaseBootstrapperExtension virtual STDMETHODIMP Initialize( - __in const BUNDLE_EXTENSION_CREATE_ARGS* pCreateArgs + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pCreateArgs ) { HRESULT hr = S_OK; LPWSTR sczModulePath = NULL; IXMLDOMDocument* pixdManifest = NULL; - IXMLDOMNode* pixnBundleExtension = NULL; + IXMLDOMNode* pixnBootstrapperExtension = NULL; hr = __super::Initialize(pCreateArgs); - BextExitOnFailure(hr, "CBextBaseBundleExtension initialization failed."); + BextExitOnFailure(hr, "CBextBaseBootstrapperExtension initialization failed."); hr = PathForCurrentProcess(&sczModulePath, m_hInstance); BextExitOnFailure(hr, "Failed to get bundle extension path."); @@ -37,17 +37,17 @@ class CWixNetfxBundleExtension : public CBextBaseBundleExtension 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 = XmlLoadDocumentFromFile(m_sczBootstrapperExtensionDataPath, &pixdManifest); + BextExitOnFailure(hr, "Failed to load bundle extension manifest from path: %ls", m_sczBootstrapperExtensionDataPath); - hr = BextGetBundleExtensionDataNode(pixdManifest, NETFX_BUNDLE_EXTENSION_ID, &pixnBundleExtension); - BextExitOnFailure(hr, "Failed to get BundleExtension '%ls'", NETFX_BUNDLE_EXTENSION_ID); + hr = BextGetBootstrapperExtensionDataNode(pixdManifest, NETFX_BOOTSTRAPPER_EXTENSION_ID, &pixnBootstrapperExtension); + BextExitOnFailure(hr, "Failed to get BootstrapperExtension '%ls'", NETFX_BOOTSTRAPPER_EXTENSION_ID); - hr = NetfxSearchParseFromXml(&m_searches, pixnBundleExtension); + hr = NetfxSearchParseFromXml(&m_searches, pixnBootstrapperExtension); BextExitOnFailure(hr, "Failed to parse searches from bundle extension manifest."); LExit: - ReleaseObject(pixnBundleExtension); + ReleaseObject(pixnBootstrapperExtension); ReleaseObject(pixdManifest); ReleaseStr(sczModulePath); @@ -55,17 +55,17 @@ class CWixNetfxBundleExtension : public CBextBaseBundleExtension } public: - CWixNetfxBundleExtension( + CWixNetfxBootstrapperExtension( __in HINSTANCE hInstance, - __in IBundleExtensionEngine* pEngine - ) : CBextBaseBundleExtension(pEngine) + __in IBootstrapperExtensionEngine* pEngine + ) : CBextBaseBootstrapperExtension(pEngine) { m_searches = { }; m_hInstance = hInstance; m_sczBaseDirectory = NULL; } - ~CWixNetfxBundleExtension() + ~CWixNetfxBootstrapperExtension() { NetfxSearchUninitialize(&m_searches); ReleaseStr(m_sczBaseDirectory); @@ -77,23 +77,23 @@ class CWixNetfxBundleExtension : public CBextBaseBundleExtension LPWSTR m_sczBaseDirectory; }; -HRESULT NetfxBundleExtensionCreate( +HRESULT NetfxBootstrapperExtensionCreate( __in HINSTANCE hInstance, - __in IBundleExtensionEngine* pEngine, - __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, - __out IBundleExtension** ppBundleExtension + __in IBootstrapperExtensionEngine* pEngine, + __in const BOOTSTRAPPER_EXTENSION_CREATE_ARGS* pArgs, + __out IBootstrapperExtension** ppBootstrapperExtension ) { HRESULT hr = S_OK; - CWixNetfxBundleExtension* pExtension = NULL; + CWixNetfxBootstrapperExtension* pExtension = NULL; - pExtension = new CWixNetfxBundleExtension(hInstance, pEngine); - BextExitOnNull(pExtension, hr, E_OUTOFMEMORY, "Failed to create new CWixNetfxBundleExtension."); + pExtension = new CWixNetfxBootstrapperExtension(hInstance, pEngine); + BextExitOnNull(pExtension, hr, E_OUTOFMEMORY, "Failed to create new CWixNetfxBootstrapperExtension."); hr = pExtension->Initialize(pArgs); - BextExitOnFailure(hr, "CWixNetfxBundleExtension initialization failed."); + BextExitOnFailure(hr, "CWixNetfxBootstrapperExtension initialization failed."); - *ppBundleExtension = pExtension; + *ppBootstrapperExtension = pExtension; pExtension = NULL; LExit: diff --git a/src/ext/NetFx/be/NetfxBootstrapperExtension.h b/src/ext/NetFx/be/NetfxBootstrapperExtension.h new file mode 100644 index 000000000..36563dae4 --- /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.h b/src/ext/NetFx/be/NetfxBundleExtension.h deleted file mode 100644 index 0746dbed0..000000000 --- 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 3ed26549a..c20cc8314 100644 --- a/src/ext/NetFx/be/detectnetcore.cpp +++ b/src/ext/NetFx/be/detectnetcore.cpp @@ -45,7 +45,7 @@ HRESULT DetectNetCore( 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 ef93b39b3..cd664b572 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 332d87122..03162eeaf 100644 --- a/src/ext/NetFx/be/detectnetcoresdk.cpp +++ b/src/ext/NetFx/be/detectnetcoresdk.cpp @@ -27,7 +27,7 @@ HRESULT DetectNetCoreSdk( 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 025deaa26..0eef945a4 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 d48c7a85a..eca61fad9 100644 --- a/src/ext/NetFx/be/detectnetcoresdkfeatureband.cpp +++ b/src/ext/NetFx/be/detectnetcoresdkfeatureband.cpp @@ -29,7 +29,7 @@ HRESULT DetectNetCoreSdkFeatureBand( 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 1f92cd58c..d194c6b72 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 3a34cea3d..72eda51af 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 @@ extern "C" HRESULT WINAPI BundleExtensionCreate( 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 c66052412..2eeaf32c2 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 94026960d..d157b64a0 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 ffbf6ee03..38c34e3cc 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 5793dd55b..f532a5a53 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 a0ae10389..a97b3c5e8 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 bfadbe07f..70e83cc9b 100644 --- a/src/ext/NetFx/wixext/NetFxCompiler.cs +++ b/src/ext/NetFx/wixext/NetFxCompiler.cs @@ -225,15 +225,15 @@ private void ParseDotNetCoreSearchElement(Intermediate intermediate, Intermediat 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 @@ private void ParseDotNetCoreSdkSearchElement(Intermediate intermediate, Intermed 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 @@ private void ParseDotNetCoreSdkFeatureBandSearchElement(Intermediate intermediat 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 6371a9511..cc25a3eb4 100644 --- a/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs +++ b/src/ext/NetFx/wixext/Symbols/NetfxSymbolDefinitions.cs @@ -53,9 +53,9 @@ public static IntermediateSymbolDefinition ByType(NetfxSymbolDefinitionType type 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/NetfxBundleExtension_Platform.wxi b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_Platform.wxi similarity index 52% rename from src/ext/NetFx/wixlib/NetfxBundleExtension_Platform.wxi rename to src/ext/NetFx/wixlib/NetfxBootstrapperExtension_Platform.wxi index bc332efc3..98fbd5237 100644 --- a/src/ext/NetFx/wixlib/NetfxBundleExtension_Platform.wxi +++ b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_Platform.wxi @@ -5,11 +5,11 @@ - + - - + + - + diff --git a/src/ext/NetFx/wixlib/NetfxBundleExtension_arm64.wxs b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_arm64.wxs similarity index 83% rename from src/ext/NetFx/wixlib/NetfxBundleExtension_arm64.wxs rename to src/ext/NetFx/wixlib/NetfxBootstrapperExtension_arm64.wxs index 13757dd8f..00b607a1c 100644 --- a/src/ext/NetFx/wixlib/NetfxBundleExtension_arm64.wxs +++ b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_arm64.wxs @@ -3,5 +3,5 @@ - + diff --git a/src/ext/Util/wixlib/UtilBundleExtension_x64.wxs b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_x64.wxs similarity index 83% rename from src/ext/Util/wixlib/UtilBundleExtension_x64.wxs rename to src/ext/NetFx/wixlib/NetfxBootstrapperExtension_x64.wxs index 96c85a5b0..a7412e60c 100644 --- a/src/ext/Util/wixlib/UtilBundleExtension_x64.wxs +++ b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_x64.wxs @@ -3,5 +3,5 @@ - + diff --git a/src/ext/NetFx/wixlib/NetfxBundleExtension_x86.wxs b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_x86.wxs similarity index 83% rename from src/ext/NetFx/wixlib/NetfxBundleExtension_x86.wxs rename to src/ext/NetFx/wixlib/NetfxBootstrapperExtension_x86.wxs index 76a8358fc..406f61398 100644 --- a/src/ext/NetFx/wixlib/NetfxBundleExtension_x86.wxs +++ b/src/ext/NetFx/wixlib/NetfxBootstrapperExtension_x86.wxs @@ -3,5 +3,5 @@ - + diff --git a/src/ext/Util/be/UtilBootstrapperExtension.cpp b/src/ext/Util/be/UtilBootstrapperExtension.cpp new file mode 100644 index 000000000..4d4d89c7c --- /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 000000000..32cabb895 --- /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 23f5d94f7..000000000 --- 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 c55d6b851..000000000 --- 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 4abfc63c7..c7175a475 100644 --- a/src/ext/Util/be/detectsha2support.cpp +++ b/src/ext/Util/be/detectsha2support.cpp @@ -41,7 +41,7 @@ HRESULT DetectSHA2CodeSigning( 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 c38a3d59b..b387a3ea4 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 d04bf3050..0cf0c761c 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 d9816dc7e..b4e6fda30 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 @@ extern "C" HRESULT WINAPI BundleExtensionCreate( 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 711b1a5c2..b4e7e8930 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 d2697bbdc..df06cb467 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 20a514d85..59c497e30 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 deeab1f76..d19e240fe 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 06e70dcf0..0a93f3a41 100644 --- a/src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs +++ b/src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs @@ -372,11 +372,11 @@ public void CanBuildBundleWithSearches() 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 @@ public void CanBuildBundleWithSearches() .ToArray(); WixAssert.CompareLineByLine(new[] { - @"", + @"", @"", @"", @"", diff --git a/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs b/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs index 3b357a964..8152868f7 100644 --- a/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs +++ b/src/ext/Util/wixext/Symbols/UtilSymbolDefinitions.cs @@ -94,7 +94,7 @@ public static IntermediateSymbolDefinition ByType(UtilSymbolDefinitionType type) case UtilSymbolDefinitionType.WixRemoveRegistryKeyEx: return UtilSymbolDefinitions.WixRemoveRegistryKeyEx; - + case UtilSymbolDefinitionType.WixRestartResource: return UtilSymbolDefinitions.WixRestartResource; @@ -117,7 +117,7 @@ public static IntermediateSymbolDefinition ByType(UtilSymbolDefinitionType type) 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 6221c0524..3bcd2c0b3 100644 --- a/src/ext/Util/wixext/UtilCompiler.cs +++ b/src/ext/Util/wixext/UtilCompiler.cs @@ -611,15 +611,15 @@ private void ParseWindowsFeatureSearchElement(Intermediate intermediate, Interme 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/UtilBundleExtension_Platform.wxi b/src/ext/Util/wixlib/UtilBootstrapperExtension_Platform.wxi similarity index 60% rename from src/ext/Util/wixlib/UtilBundleExtension_Platform.wxi rename to src/ext/Util/wixlib/UtilBootstrapperExtension_Platform.wxi index 5c964d7dc..cbaf3f565 100644 --- a/src/ext/Util/wixlib/UtilBundleExtension_Platform.wxi +++ b/src/ext/Util/wixlib/UtilBootstrapperExtension_Platform.wxi @@ -5,6 +5,6 @@ - + diff --git a/src/ext/Util/wixlib/UtilBundleExtension_arm64.wxs b/src/ext/Util/wixlib/UtilBootstrapperExtension_arm64.wxs similarity index 83% rename from src/ext/Util/wixlib/UtilBundleExtension_arm64.wxs rename to src/ext/Util/wixlib/UtilBootstrapperExtension_arm64.wxs index b17be031a..093de00da 100644 --- a/src/ext/Util/wixlib/UtilBundleExtension_arm64.wxs +++ b/src/ext/Util/wixlib/UtilBootstrapperExtension_arm64.wxs @@ -3,5 +3,5 @@ - + diff --git a/src/ext/NetFx/wixlib/NetfxBundleExtension_x64.wxs b/src/ext/Util/wixlib/UtilBootstrapperExtension_x64.wxs similarity index 83% rename from src/ext/NetFx/wixlib/NetfxBundleExtension_x64.wxs rename to src/ext/Util/wixlib/UtilBootstrapperExtension_x64.wxs index f6c27a8e0..e778fc426 100644 --- a/src/ext/NetFx/wixlib/NetfxBundleExtension_x64.wxs +++ b/src/ext/Util/wixlib/UtilBootstrapperExtension_x64.wxs @@ -3,5 +3,5 @@ - + diff --git a/src/ext/Util/wixlib/UtilBundleExtension_x86.wxs b/src/ext/Util/wixlib/UtilBootstrapperExtension_x86.wxs similarity index 83% rename from src/ext/Util/wixlib/UtilBundleExtension_x86.wxs rename to src/ext/Util/wixlib/UtilBootstrapperExtension_x86.wxs index 3b458687d..101cf0894 100644 --- a/src/ext/Util/wixlib/UtilBundleExtension_x86.wxs +++ b/src/ext/Util/wixlib/UtilBootstrapperExtension_x86.wxs @@ -3,5 +3,5 @@ - + diff --git a/src/ext/beDecor.h b/src/ext/beDecor.h index 2c6a8818b..ecd905990 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 diff --git a/src/internal/SetBuildNumber/Directory.Packages.props.pp b/src/internal/SetBuildNumber/Directory.Packages.props.pp index 17a3b2570..bb0f96d85 100644 --- a/src/internal/SetBuildNumber/Directory.Packages.props.pp +++ b/src/internal/SetBuildNumber/Directory.Packages.props.pp @@ -13,8 +13,8 @@ - + @@ -57,17 +57,6 @@ - - - - - - - - diff --git a/src/wix/WixInternal.Core.TestPackage/BundleExtractor.cs b/src/wix/WixInternal.Core.TestPackage/BundleExtractor.cs index dc4005a53..74d13132d 100644 --- a/src/wix/WixInternal.Core.TestPackage/BundleExtractor.cs +++ b/src/wix/WixInternal.Core.TestPackage/BundleExtractor.cs @@ -16,7 +16,7 @@ public class BundleExtractor { private const string BurnNamespace = "http://wixtoolset.org/schemas/v4/2008/Burn"; private const string BADataFileName = "BootstrapperApplicationData.xml"; - private const string BundleExtensionDataFileName = "BundleExtensionData.xml"; + private const string BootstrapperExtensionDataFileName = "BootstrapperExtensionData.xml"; /// /// Extracts the BA container. @@ -71,8 +71,8 @@ public static ExtractBAContainerResult ExtractAllContainers(IMessaging messaging result.BADataDocument = LoadBAData(baFolderPath); result.BADataNamespaceManager = GetBADataNamespaceManager(result.BADataDocument, "ba"); - result.BundleExtensionDataDocument = LoadBundleExtensionData(baFolderPath); - result.BundleExtensionDataNamespaceManager = GetBundleExtensionDataNamespaceManager(result.BundleExtensionDataDocument, "be"); + result.BootstrapperExtensionDataDocument = LoadBootstrapperExtensionData(baFolderPath); + result.BootstrapperExtensionDataNamespaceManager = GetBootstrapperExtensionDataNamespaceManager(result.BootstrapperExtensionDataDocument, "be"); } return result; @@ -92,15 +92,15 @@ public static XmlNamespaceManager GetBADataNamespaceManager(XmlDocument document } /// - /// Gets an for BundleExtensionData.xml with the given prefix assigned to the root namespace. + /// Gets an for BootstrapperExtensionData.xml with the given prefix assigned to the root namespace. /// /// /// /// - public static XmlNamespaceManager GetBundleExtensionDataNamespaceManager(XmlDocument document, string prefix) + public static XmlNamespaceManager GetBootstrapperExtensionDataNamespaceManager(XmlDocument document, string prefix) { var namespaceManager = new XmlNamespaceManager(document.NameTable); - namespaceManager.AddNamespace(prefix, BurnConstants.BundleExtensionDataNamespace); + namespaceManager.AddNamespace(prefix, BurnConstants.BootstrapperExtensionDataNamespace); return namespaceManager; } @@ -134,10 +134,10 @@ public static XmlDocument LoadBAData(string baFolderPath) /// /// /// - public static XmlDocument LoadBundleExtensionData(string baFolderPath) + public static XmlDocument LoadBootstrapperExtensionData(string baFolderPath) { var document = new XmlDocument(); - document.Load(Path.Combine(baFolderPath, BundleExtensionDataFileName)); + document.Load(Path.Combine(baFolderPath, BootstrapperExtensionDataFileName)); return document; } diff --git a/src/wix/WixInternal.Core.TestPackage/ExtractBAContainerResult.cs b/src/wix/WixInternal.Core.TestPackage/ExtractBAContainerResult.cs index ab45d68ed..1d4ba47f0 100644 --- a/src/wix/WixInternal.Core.TestPackage/ExtractBAContainerResult.cs +++ b/src/wix/WixInternal.Core.TestPackage/ExtractBAContainerResult.cs @@ -13,14 +13,14 @@ namespace WixInternal.Core.TestPackage public class ExtractBAContainerResult { /// - /// for BundleExtensionData.xml. + /// for BootstrapperExtensionData.xml. /// - public XmlDocument BundleExtensionDataDocument { get; set; } + public XmlDocument BootstrapperExtensionDataDocument { get; set; } /// - /// for BundleExtensionData.xml. + /// for BootstrapperExtensionData.xml. /// - public XmlNamespaceManager BundleExtensionDataNamespaceManager { get; set; } + public XmlNamespaceManager BootstrapperExtensionDataNamespaceManager { get; set; } /// /// for BootstrapperApplicationData.xml. @@ -53,7 +53,7 @@ public class ExtractBAContainerResult public bool? AttachedContainersSuccess { get; set; } /// - /// + /// /// /// public ExtractBAContainerResult AssertSuccess() @@ -77,12 +77,12 @@ public string GetBAFilePath(string extractedBAContainerFolderPath) } /// - /// Returns the relative path of the BundleExtension entry point dll in the given folder. + /// Returns the relative path of the BootstrapperExtension entry point dll in the given folder. /// /// /// /// - public string GetBundleExtensionFilePath(string extractedBAContainerFolderPath, string extensionId) + public string GetBootstrapperExtensionFilePath(string extractedBAContainerFolderPath, string extensionId) { var uxPayloads = this.SelectManifestNodes($"/burn:BurnManifest/burn:UX/burn:Payload[@Id='{extensionId}']"); var bextPayload = uxPayloads[0]; @@ -91,7 +91,7 @@ public string GetBundleExtensionFilePath(string extractedBAContainerFolderPath, } /// - /// + /// /// /// elements must have the 'ba' prefix /// @@ -101,7 +101,7 @@ public XmlNodeList SelectBADataNodes(string xpath) } /// - /// + /// /// /// elements must have the 'ba' prefix /// Attributes for which the value should be set to '*'. @@ -112,28 +112,28 @@ public string[] GetBADataTestXmlLines(string xpath, Dictionary - /// + /// /// /// elements must have the 'be' prefix /// - public XmlNodeList SelectBundleExtensionDataNodes(string xpath) + public XmlNodeList SelectBootstrapperExtensionDataNodes(string xpath) { - return this.BundleExtensionDataDocument.SelectNodes(xpath, this.BundleExtensionDataNamespaceManager); + return this.BootstrapperExtensionDataDocument.SelectNodes(xpath, this.BootstrapperExtensionDataNamespaceManager); } /// - /// + /// /// /// elements must have the 'be' prefix /// Attributes for which the value should be set to '*'. /// - public string[] GetBundleExtensionTestXmlLines(string xpath, Dictionary> ignoredAttributesByElementName = null) + public string[] GetBootstrapperExtensionTestXmlLines(string xpath, Dictionary> ignoredAttributesByElementName = null) { - return this.SelectBundleExtensionDataNodes(xpath).GetTestXmlLines(ignoredAttributesByElementName); + return this.SelectBootstrapperExtensionDataNodes(xpath).GetTestXmlLines(ignoredAttributesByElementName); } /// - /// + /// /// /// elements must have the 'burn' prefix /// @@ -143,7 +143,7 @@ public XmlNodeList SelectManifestNodes(string xpath) } /// - /// + /// /// /// elements must have the 'burn' prefix /// Attributes for which the value should be set to '*'. diff --git a/src/wix/WixToolset.Core.Burn/Bind/BaseSearchFacade.cs b/src/wix/WixToolset.Core.Burn/Bind/BaseSearchFacade.cs index 0da787977..3974aef14 100644 --- a/src/wix/WixToolset.Core.Burn/Bind/BaseSearchFacade.cs +++ b/src/wix/WixToolset.Core.Burn/Bind/BaseSearchFacade.cs @@ -18,9 +18,9 @@ public virtual void WriteXml(XmlTextWriter writer) { writer.WriteAttributeString("Condition", this.SearchSymbol.Condition); } - if (!String.IsNullOrEmpty(this.SearchSymbol.BundleExtensionRef)) + if (!String.IsNullOrEmpty(this.SearchSymbol.BootstrapperExtensionRef)) { - writer.WriteAttributeString("ExtensionId", this.SearchSymbol.BundleExtensionRef); + writer.WriteAttributeString("ExtensionId", this.SearchSymbol.BootstrapperExtensionRef); } } } diff --git a/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs b/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs index c608e5053..3dbbffa7f 100644 --- a/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bind/BindBundleCommand.cs @@ -427,10 +427,10 @@ public void Execute() // Generate the bundle extension manifest... string bextManifestPath; { - var command = new CreateBundleExtensionManifestCommand(section, bundleSymbol, uxPayloadIndex, this.IntermediateFolder, this.InternalBurnBackendHelper); + var command = new CreateBootstrapperExtensionManifestCommand(section, bundleSymbol, uxPayloadIndex, this.IntermediateFolder, this.InternalBurnBackendHelper); command.Execute(); - var bextManifestPayload = command.BundleExtensionManifestPayloadRow; + var bextManifestPayload = command.BootstrapperExtensionManifestPayloadRow; bextManifestPath = command.OutputPath; payloadSymbols.Add(bextManifestPayload.Id.Id, bextManifestPayload); ++uxPayloadIndex; @@ -550,7 +550,7 @@ private WixOutput CreateWixout(List trackedFiles, Intermediate int wixout.ImportDataStream(BurnConstants.BurnManifestWixOutputStreamName, manifestPath); wixout.ImportDataStream(BurnConstants.BootstrapperApplicationDataWixOutputStreamName, baDataPath); - wixout.ImportDataStream(BurnConstants.BundleExtensionDataWixOutputStreamName, bextDataPath); + wixout.ImportDataStream(BurnConstants.BootstrapperExtensionDataWixOutputStreamName, bextDataPath); wixout.Reopen(); diff --git a/src/wix/WixToolset.Core.Burn/Bind/GenerateManifestDataFromIRCommand.cs b/src/wix/WixToolset.Core.Burn/Bind/GenerateManifestDataFromIRCommand.cs index 11b998b64..c947524b2 100644 --- a/src/wix/WixToolset.Core.Burn/Bind/GenerateManifestDataFromIRCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bind/GenerateManifestDataFromIRCommand.cs @@ -48,7 +48,7 @@ public void Execute() var extensionSearchSymbols = kvp.Value; foreach (var extensionSearchSymbol in extensionSearchSymbols) { - this.BackendHelper.AddBundleExtensionData(extensionId, extensionSearchSymbol, symbolIdIsIdAttribute: true); + this.BackendHelper.AddBootstrapperExtensionData(extensionId, extensionSearchSymbol, symbolIdIsIdAttribute: true); symbols.Remove(extensionSearchSymbol); } } @@ -70,7 +70,7 @@ public void Execute() case SymbolDefinitionType.WixBundleBundlePackagePayload: case SymbolDefinitionType.WixBundleExePackage: case SymbolDefinitionType.WixBundleExePackagePayload: - case SymbolDefinitionType.WixBundleExtension: + case SymbolDefinitionType.WixBootstrapperExtension: case SymbolDefinitionType.WixBundleHarvestedBundlePackage: case SymbolDefinitionType.WixBundleHarvestedDependencyProvider: case SymbolDefinitionType.WixBundleHarvestedMsiPackage: @@ -153,7 +153,7 @@ private bool IndexBundleCustomDataSymbol(WixBundleCustomDataSymbol wixBundleCust switch (wixBundleCustomDataSymbol.Type) { case WixBundleCustomDataType.BootstrapperApplication: - case WixBundleCustomDataType.BundleExtension: + case WixBundleCustomDataType.BootstrapperExtension: break; default: return false; @@ -195,8 +195,8 @@ private void AddIndexedCellSymbols(Dictionary case WixBundleCustomDataType.BootstrapperApplication: writer.WriteStartElement(elementName, BurnConstants.BootstrapperApplicationDataNamespace); break; - case WixBundleCustomDataType.BundleExtension: - writer.WriteStartElement(elementName, BurnConstants.BundleExtensionDataNamespace); + case WixBundleCustomDataType.BootstrapperExtension: + writer.WriteStartElement(elementName, BurnConstants.BootstrapperExtensionDataNamespace); break; default: throw new NotImplementedException(); @@ -219,8 +219,8 @@ private void AddIndexedCellSymbols(Dictionary case WixBundleCustomDataType.BootstrapperApplication: this.BackendHelper.AddBootstrapperApplicationData(sb.ToString()); break; - case WixBundleCustomDataType.BundleExtension: - this.BackendHelper.AddBundleExtensionData(customDataSymbol.BundleExtensionRef, sb.ToString()); + case WixBundleCustomDataType.BootstrapperExtension: + this.BackendHelper.AddBootstrapperExtensionData(customDataSymbol.BootstrapperExtensionRef, sb.ToString()); break; default: throw new NotImplementedException(); diff --git a/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs b/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs index 95673ab00..863a14aa0 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/BurnCommon.cs @@ -12,7 +12,7 @@ namespace WixToolset.Core.Burn.Bundles /// /// Common functionality for Burn PE Writer & Reader for the WiX toolset. /// - /// This class encapsulates common functionality related to + /// This class encapsulates common functionality related to /// bundled/chained setup packages. /// /// @@ -25,7 +25,7 @@ internal abstract class BurnCommon : IDisposable public const string BADataFileName = "BootstrapperApplicationData.xml"; - public const string BundleExtensionDataFileName = "BundleExtensionData.xml"; + public const string BootstrapperExtensionDataFileName = "BootstrapperExtensionData.xml"; // See WinNT.h for details about the PE format, including the // structure and offsets for IMAGE_DOS_HEADER, IMAGE_NT_HEADERS32, @@ -320,7 +320,7 @@ private bool GetWixburnSectionInfo(BinaryReader reader) this.wixburnRawDataSize = BurnCommon.ReadUInt32(bytes, IMAGE_SECTION_HEADER_OFFSET_SIZEOFRAWDATA); - // we need 52 bytes for the manifest header, which is always going to fit in + // we need 52 bytes for the manifest header, which is always going to fit in // the smallest alignment (512 bytes), but just to be paranoid... if (BURN_SECTION_MIN_SIZE > this.wixburnRawDataSize) { diff --git a/src/wix/WixToolset.Core.Burn/Bundles/CreateBundleExtensionManifestCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/CreateBootstrapperExtensionManifestCommand.cs similarity index 72% rename from src/wix/WixToolset.Core.Burn/Bundles/CreateBundleExtensionManifestCommand.cs rename to src/wix/WixToolset.Core.Burn/Bundles/CreateBootstrapperExtensionManifestCommand.cs index ab6dcea1e..045fe5d6b 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/CreateBundleExtensionManifestCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/CreateBootstrapperExtensionManifestCommand.cs @@ -11,9 +11,9 @@ namespace WixToolset.Core.Burn.Bundles using WixToolset.Data.Burn; using WixToolset.Data.Symbols; - internal class CreateBundleExtensionManifestCommand + internal class CreateBootstrapperExtensionManifestCommand { - public CreateBundleExtensionManifestCommand(IntermediateSection section, WixBundleSymbol bundleSymbol, int lastUXPayloadIndex, string intermediateFolder, IInternalBurnBackendHelper internalBurnBackendHelper) + public CreateBootstrapperExtensionManifestCommand(IntermediateSection section, WixBundleSymbol bundleSymbol, int lastUXPayloadIndex, string intermediateFolder, IInternalBurnBackendHelper internalBurnBackendHelper) { this.Section = section; this.BundleSymbol = bundleSymbol; @@ -32,18 +32,18 @@ public CreateBundleExtensionManifestCommand(IntermediateSection section, WixBund private string IntermediateFolder { get; } - public WixBundlePayloadSymbol BundleExtensionManifestPayloadRow { get; private set; } + public WixBundlePayloadSymbol BootstrapperExtensionManifestPayloadRow { get; private set; } public string OutputPath { get; private set; } public void Execute() { - this.OutputPath = this.CreateBundleExtensionManifest(); + this.OutputPath = this.CreateBootstrapperExtensionManifest(); - this.BundleExtensionManifestPayloadRow = this.CreateBundleExtensionManifestPayloadRow(this.OutputPath); + this.BootstrapperExtensionManifestPayloadRow = this.CreateBootstrapperExtensionManifestPayloadRow(this.OutputPath); } - private string CreateBundleExtensionManifest() + private string CreateBootstrapperExtensionManifest() { var path = Path.Combine(this.IntermediateFolder, "wix-bextdata.xml"); @@ -53,9 +53,9 @@ private string CreateBundleExtensionManifest() { writer.Formatting = Formatting.Indented; writer.WriteStartDocument(); - writer.WriteStartElement("BundleExtensionData", BurnConstants.BundleExtensionDataNamespace); + writer.WriteStartElement("BootstrapperExtensionData", BurnConstants.BootstrapperExtensionDataNamespace); - this.InternalBurnBackendHelper.WriteBundleExtensionData(writer); + this.InternalBurnBackendHelper.WriteBootstrapperExtensionData(writer); writer.WriteEndElement(); writer.WriteEndDocument(); @@ -64,9 +64,9 @@ private string CreateBundleExtensionManifest() return path; } - private WixBundlePayloadSymbol CreateBundleExtensionManifestPayloadRow(string bextManifestPath) + private WixBundlePayloadSymbol CreateBootstrapperExtensionManifestPayloadRow(string bextManifestPath) { - var generatedId = this.InternalBurnBackendHelper.GenerateIdentifier("ux", BurnCommon.BundleExtensionDataFileName); + var generatedId = this.InternalBurnBackendHelper.GenerateIdentifier("ux", BurnCommon.BootstrapperExtensionDataFileName); this.Section.AddSymbol(new WixGroupSymbol(this.BundleSymbol.SourceLineNumbers) { @@ -78,7 +78,7 @@ private WixBundlePayloadSymbol CreateBundleExtensionManifestPayloadRow(string be var symbol = this.Section.AddSymbol(new WixBundlePayloadSymbol(this.BundleSymbol.SourceLineNumbers, new Identifier(AccessModifier.Section, generatedId)) { - Name = BurnCommon.BundleExtensionDataFileName, + Name = BurnCommon.BootstrapperExtensionDataFileName, SourceFile = new IntermediateFieldPathValue { Path = bextManifestPath }, Compressed = true, UnresolvedSourceFile = bextManifestPath, diff --git a/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs index bb0572939..193bfcc8e 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/CreateBurnManifestCommand.cs @@ -702,16 +702,16 @@ public void Execute() writer.WriteEndElement(); } - // Write the BundleExtension elements. - var bundleExtensions = this.Section.Symbols.OfType(); + // Write the BootstrapperExtension elements. + var bootstrapperExtensions = this.Section.Symbols.OfType(); var uxPayloadsById = this.UXContainerPayloads.ToDictionary(p => p.Id.Id); - foreach (var bundleExtension in bundleExtensions) + foreach (var bootstrapperExtension in bootstrapperExtensions) { - var entryPayload = uxPayloadsById[bundleExtension.PayloadRef]; + var entryPayload = uxPayloadsById[bootstrapperExtension.PayloadRef]; - writer.WriteStartElement("BundleExtension"); - writer.WriteAttributeString("Id", bundleExtension.Id.Id); + writer.WriteStartElement("BootstrapperExtension"); + writer.WriteAttributeString("Id", bootstrapperExtension.Id.Id); writer.WriteAttributeString("EntryPayloadSourcePath", entryPayload.EmbeddedId); writer.WriteEndElement(); diff --git a/src/wix/WixToolset.Core.Burn/Bundles/OrderSearchesCommand.cs b/src/wix/WixToolset.Core.Burn/Bundles/OrderSearchesCommand.cs index 01d5657b9..60f375e59 100644 --- a/src/wix/WixToolset.Core.Burn/Bundles/OrderSearchesCommand.cs +++ b/src/wix/WixToolset.Core.Burn/Bundles/OrderSearchesCommand.cs @@ -329,7 +329,7 @@ private void ResolveConstraint(string resolvedId) .OfType() .ToDictionary(t => t.Id.Id); var extensionSearchesById = this.Section.Symbols - .Where(t => t.Definition.HasTag(BurnConstants.BundleExtensionSearchSymbolDefinitionTag)) + .Where(t => t.Definition.HasTag(BurnConstants.BootstrapperExtensionSearchSymbolDefinitionTag)) .ToDictionary(t => t.Id.Id); foreach (var searchId in sortedIds) @@ -348,10 +348,10 @@ private void ResolveConstraint(string resolvedId) { orderedSearchFacades.Add(new ExtensionSearchFacade(searchSymbol)); - if (!extensionSearchSymbolsByExtensionId.TryGetValue(searchSymbol.BundleExtensionRef, out var extensionSearchSymbols)) + if (!extensionSearchSymbolsByExtensionId.TryGetValue(searchSymbol.BootstrapperExtensionRef, out var extensionSearchSymbols)) { extensionSearchSymbols = new List(); - extensionSearchSymbolsByExtensionId[searchSymbol.BundleExtensionRef] = extensionSearchSymbols; + extensionSearchSymbolsByExtensionId[searchSymbol.BootstrapperExtensionRef] = extensionSearchSymbols; } extensionSearchSymbols.Add(extensionSearchSymbol); } diff --git a/src/wix/WixToolset.Core.Burn/ExtensibilityServices/BurnBackendHelper.cs b/src/wix/WixToolset.Core.Burn/ExtensibilityServices/BurnBackendHelper.cs index f2b3587df..93de0d2c3 100644 --- a/src/wix/WixToolset.Core.Burn/ExtensibilityServices/BurnBackendHelper.cs +++ b/src/wix/WixToolset.Core.Burn/ExtensibilityServices/BurnBackendHelper.cs @@ -25,7 +25,7 @@ internal class BurnBackendHelper : IInternalBurnBackendHelper private ManifestData BootstrapperApplicationManifestData { get; } = new ManifestData(); - private Dictionary BundleExtensionDataById { get; } = new Dictionary(); + private Dictionary BootstrapperExtensionDataById { get; } = new Dictionary(); public BurnBackendHelper(IServiceProvider serviceProvider) { @@ -149,16 +149,16 @@ public void AddBootstrapperApplicationData(IntermediateSymbol symbol, bool symbo this.BootstrapperApplicationManifestData.AddSymbol(symbol, symbolIdIsIdAttribute, BurnConstants.BootstrapperApplicationDataNamespace); } - public void AddBundleExtensionData(string extensionId, string xml) + public void AddBootstrapperExtensionData(string extensionId, string xml) { - var manifestData = this.GetBundleExtensionManifestData(extensionId); + var manifestData = this.GetBootstrapperExtensionManifestData(extensionId); manifestData.AddXml(xml); } - public void AddBundleExtensionData(string extensionId, IntermediateSymbol symbol, bool symbolIdIsIdAttribute = false) + public void AddBootstrapperExtensionData(string extensionId, IntermediateSymbol symbol, bool symbolIdIsIdAttribute = false) { - var manifestData = this.GetBundleExtensionManifestData(extensionId); - manifestData.AddSymbol(symbol, symbolIdIsIdAttribute, BurnConstants.BundleExtensionDataNamespace); + var manifestData = this.GetBootstrapperExtensionManifestData(extensionId); + manifestData.AddSymbol(symbol, symbolIdIsIdAttribute, BurnConstants.BootstrapperExtensionDataNamespace); } #endregion @@ -204,9 +204,9 @@ public void WriteBootstrapperApplicationData(XmlWriter writer) this.BootstrapperApplicationManifestData.Write(writer); } - public void WriteBundleExtensionData(XmlWriter writer) + public void WriteBootstrapperExtensionData(XmlWriter writer) { - foreach (var kvp in this.BundleExtensionDataById) + foreach (var kvp in this.BootstrapperExtensionDataById) { this.WriteExtension(writer, kvp.Key, kvp.Value); } @@ -214,17 +214,17 @@ public void WriteBundleExtensionData(XmlWriter writer) #endregion - private ManifestData GetBundleExtensionManifestData(string extensionId) + private ManifestData GetBootstrapperExtensionManifestData(string extensionId) { if (!this.backendHelper.IsValidIdentifier(extensionId)) { throw new ArgumentException($"'{extensionId}' is not a valid extensionId"); } - if (!this.BundleExtensionDataById.TryGetValue(extensionId, out var manifestData)) + if (!this.BootstrapperExtensionDataById.TryGetValue(extensionId, out var manifestData)) { manifestData = new ManifestData(); - this.BundleExtensionDataById.Add(extensionId, manifestData); + this.BootstrapperExtensionDataById.Add(extensionId, manifestData); } return manifestData; @@ -232,7 +232,7 @@ private ManifestData GetBundleExtensionManifestData(string extensionId) private void WriteExtension(XmlWriter writer, string extensionId, ManifestData manifestData) { - writer.WriteStartElement("BundleExtension"); + writer.WriteStartElement("BootstrapperExtension"); writer.WriteAttributeString("Id", extensionId); diff --git a/src/wix/WixToolset.Core.Burn/IInternalBurnBackendHelper.cs b/src/wix/WixToolset.Core.Burn/IInternalBurnBackendHelper.cs index 59c4f20fa..44517564e 100644 --- a/src/wix/WixToolset.Core.Burn/IInternalBurnBackendHelper.cs +++ b/src/wix/WixToolset.Core.Burn/IInternalBurnBackendHelper.cs @@ -9,6 +9,6 @@ internal interface IInternalBurnBackendHelper : IBurnBackendHelper { void WriteBootstrapperApplicationData(XmlWriter writer); - void WriteBundleExtensionData(XmlWriter writer); + void WriteBootstrapperExtensionData(XmlWriter writer); } } diff --git a/src/wix/WixToolset.Core/Compiler.cs b/src/wix/WixToolset.Core/Compiler.cs index 65c4be50b..d13f1a682 100644 --- a/src/wix/WixToolset.Core/Compiler.cs +++ b/src/wix/WixToolset.Core/Compiler.cs @@ -6083,11 +6083,11 @@ private void ParseFragmentElement(XElement node) case "BundleCustomDataRef": this.ParseBundleCustomDataRefElement(child); break; - case "BundleExtension": - this.ParseBundleExtensionElement(child); + case "BootstrapperExtension": + this.ParseBootstrapperExtensionElement(child); break; - case "BundleExtensionRef": - this.ParseSimpleRefElement(child, SymbolDefinitions.WixBundleExtension); + case "BootstrapperExtensionRef": + this.ParseSimpleRefElement(child, SymbolDefinitions.WixBootstrapperExtension); break; case "ComplianceCheck": this.ParseComplianceCheckElement(child); diff --git a/src/wix/WixToolset.Core/Compiler_Bundle.cs b/src/wix/WixToolset.Core/Compiler_Bundle.cs index baf59cfcf..fcf310140 100644 --- a/src/wix/WixToolset.Core/Compiler_Bundle.cs +++ b/src/wix/WixToolset.Core/Compiler_Bundle.cs @@ -312,11 +312,13 @@ private void ParseBundleElement(XElement node) case "BundleCustomDataRef": this.ParseBundleCustomDataRefElement(child); break; - case "BundleExtension": - this.ParseBundleExtensionElement(child); + case "BundleExtension": // kept for backward compatibility + case "BootstrapperExtension": + this.ParseBootstrapperExtensionElement(child); break; - case "BundleExtensionRef": - this.ParseSimpleRefElement(child, SymbolDefinitions.WixBundleExtension); + case "BundleExtensionRef": // kept for backward compatibility + case "BootstrapperExtensionRef": + this.ParseSimpleRefElement(child, SymbolDefinitions.WixBootstrapperExtension); break; case "OptionalUpdateRegistration": this.ParseOptionalUpdateRegistrationElement(child, manufacturer, parentName, name); @@ -916,18 +918,19 @@ private void ParseBundleCustomDataElement(XElement node) case "bootstrapperApplication": customDataType = WixBundleCustomDataType.BootstrapperApplication; break; - case "bundleExtension": - customDataType = WixBundleCustomDataType.BundleExtension; + case "bundleExtension": // kept for backward compatibility + case "bootstrapperExtension": + customDataType = WixBundleCustomDataType.BootstrapperExtension; break; default: - this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Type", typeValue, "bootstrapperApplication", "bundleExtension")); + this.Core.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, node.Name.LocalName, "Type", typeValue, "bootstrapperApplication", "bootstrapperExtension")); customDataType = WixBundleCustomDataType.Unknown; // set a value to prevent expected attribute error below. break; } break; case "ExtensionId": extensionId = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib); - this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixBundleExtension, extensionId); + this.Core.CreateSimpleReference(sourceLineNumbers, SymbolDefinitions.WixBootstrapperExtension, extensionId); break; default: this.Core.UnexpectedAttribute(node, attrib); @@ -948,7 +951,7 @@ private void ParseBundleCustomDataElement(XElement node) var hasExtensionId = null != extensionId; if (!customDataType.HasValue) { - customDataType = hasExtensionId ? WixBundleCustomDataType.BundleExtension : WixBundleCustomDataType.BootstrapperApplication; + customDataType = hasExtensionId ? WixBundleCustomDataType.BootstrapperExtension : WixBundleCustomDataType.BootstrapperApplication; } if (!customDataType.HasValue) @@ -962,9 +965,9 @@ private void ParseBundleCustomDataElement(XElement node) this.Core.Write(ErrorMessages.IllegalAttributeWithOtherAttribute(sourceLineNumbers, node.Name.LocalName, "ExtensonId", "Type", "bootstrapperApplication")); } } - else if (customDataType.Value == WixBundleCustomDataType.BundleExtension) + else if (customDataType.Value == WixBundleCustomDataType.BootstrapperExtension) { - this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ExtensionId", "Type", "bundleExtension")); + this.Core.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, node.Name.LocalName, "ExtensionId", "Type", "bootstrapperExtension")); } foreach (var child in node.Elements()) @@ -1007,7 +1010,7 @@ private void ParseBundleCustomDataElement(XElement node) { AttributeNames = attributeNames, Type = customDataType.Value, - BundleExtensionRef = extensionId, + BootstrapperExtensionRef = extensionId, }); } } @@ -1185,10 +1188,10 @@ private void ParseBundleElementElement(XElement node, SourceLineNumber sourceLin } /// - /// Parse the BundleExtension element. + /// Parse the BootstrapperExtension element. /// /// Element to parse - private void ParseBundleExtensionElement(XElement node) + private void ParseBootstrapperExtensionElement(XElement node) { var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); var compilerPayload = new CompilerPayload(this.Core, sourceLineNumbers, node); @@ -1261,10 +1264,10 @@ private void ParseBundleExtensionElement(XElement node) } } - // Add the BundleExtension. + // Add the BootstrapperExtension. if (!this.Core.EncounteredError) { - this.Core.AddSymbol(new WixBundleExtensionSymbol(sourceLineNumbers, compilerPayload.Id) + this.Core.AddSymbol(new WixBootstrapperExtensionSymbol(sourceLineNumbers, compilerPayload.Id) { PayloadRef = compilerPayload.Id.Id, }); diff --git a/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs b/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs index 5ccaffdc5..52a7cf122 100644 --- a/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs +++ b/src/wix/WixToolset.Core/ExtensibilityServices/ParseHelper.cs @@ -242,7 +242,7 @@ public void CreateWixGroupSymbol(IntermediateSection section, SourceLineNumber s }); } - public void CreateWixSearchSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after, string bundleExtensionId) + public void CreateWixSearchSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, string elementName, Identifier id, string variable, string condition, string after, string bootstrapperExtensionId) { if (variable == null) { @@ -257,7 +257,7 @@ public void CreateWixSearchSymbol(IntermediateSection section, SourceLineNumber { Variable = variable, Condition = condition, - BundleExtensionRef = bundleExtensionId, + BootstrapperExtensionRef = bootstrapperExtensionId, }); if (after != null) @@ -267,9 +267,9 @@ public void CreateWixSearchSymbol(IntermediateSection section, SourceLineNumber this.CreateWixSearchRelationSymbol(section, sourceLineNumbers, id, after, 2); } - if (!String.IsNullOrEmpty(bundleExtensionId)) + if (!String.IsNullOrEmpty(bootstrapperExtensionId)) { - this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBundleExtension, bundleExtensionId); + this.CreateSimpleReference(section, sourceLineNumbers, SymbolDefinitions.WixBootstrapperExtension, bootstrapperExtensionId); } } diff --git a/src/wix/test/Example.Extension/Data/example.wxs b/src/wix/test/Example.Extension/Data/example.wxs index dc0a68ec4..762b98e3a 100644 --- a/src/wix/test/Example.Extension/Data/example.wxs +++ b/src/wix/test/Example.Extension/Data/example.wxs @@ -17,6 +17,6 @@ - + diff --git a/src/wix/test/Example.Extension/ExampleCompilerExtension.cs b/src/wix/test/Example.Extension/ExampleCompilerExtension.cs index bdce8754e..f34cf963d 100644 --- a/src/wix/test/Example.Extension/ExampleCompilerExtension.cs +++ b/src/wix/test/Example.Extension/ExampleCompilerExtension.cs @@ -11,7 +11,7 @@ namespace Example.Extension internal class ExampleCompilerExtension : BaseCompilerExtension { - private const string BundleExtensionId = "ExampleBundleExtension"; + private const string BootstrapperExtensionId = "ExampleBootstrapperExtension"; public override XNamespace Namespace => ExampleConstants.Namespace; @@ -228,7 +228,7 @@ private void ParseExampleSearchElement(Intermediate intermediate, IntermediateSe 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); } if (!this.Messaging.EncounteredError) diff --git a/src/wix/test/Example.Extension/ExampleSymbolDefinitions.cs b/src/wix/test/Example.Extension/ExampleSymbolDefinitions.cs index 83b675c92..19704bc41 100644 --- a/src/wix/test/Example.Extension/ExampleSymbolDefinitions.cs +++ b/src/wix/test/Example.Extension/ExampleSymbolDefinitions.cs @@ -33,7 +33,7 @@ public static class ExampleSymbolDefinitions static ExampleSymbolDefinitions() { - ExampleSearch.AddTag(BurnConstants.BundleExtensionSearchSymbolDefinitionTag); + ExampleSearch.AddTag(BurnConstants.BootstrapperExtensionSearchSymbolDefinitionTag); } public static bool TryGetSymbolType(string name, out ExampleSymbolDefinitionType type) diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs index 935d20b55..3280c608d 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/BundleFixture.cs @@ -131,8 +131,8 @@ public void CanBuildSimpleBundle() var extractedBaManifestData = File.ReadAllText(Path.Combine(baFolderPath, "BootstrapperApplicationData.xml"), Encoding.UTF8); WixAssert.StringEqual(extractedBaManifestData, baManifestData); - var bextManifestData = wixOutput.GetData(BurnConstants.BundleExtensionDataWixOutputStreamName); - var extractedBextManifestData = File.ReadAllText(Path.Combine(baFolderPath, "BundleExtensionData.xml"), Encoding.UTF8); + var bextManifestData = wixOutput.GetData(BurnConstants.BootstrapperExtensionDataWixOutputStreamName); + var extractedBextManifestData = File.ReadAllText(Path.Combine(baFolderPath, "BootstrapperExtensionData.xml"), Encoding.UTF8); WixAssert.StringEqual(extractedBextManifestData, bextManifestData); foreach (XmlAttribute attribute in extractResult.ManifestDocument.DocumentElement.Attributes) @@ -631,8 +631,8 @@ public void CannotBuildWithDuplicatePayloadNames() WixAssert.CompareLineByLine(new string[] { "Error 8002: The Payload 'DuplicatePayloadNames.wxs' has a duplicate Name 'fakeba.dll' in the BA container. When extracting the container at runtime, the file will get overwritten.", + "Error 8002: The Payload 'uxmKgAFS4cS31ZH_Myfqo5J4kHixQ' has a duplicate Name 'BootstrapperExtensionData.xml' in the BA container. When extracting the container at runtime, the file will get overwritten.", "Error 8002: The Payload 'uxTxMXPVMXwQrPTMIGa5WGt93w0Ns' has a duplicate Name 'BootstrapperApplicationData.xml' in the BA container. When extracting the container at runtime, the file will get overwritten.", - "Error 8002: The Payload 'uxYRbgitOs0K878jn5L_z7LdJ21KI' has a duplicate Name 'BundleExtensionData.xml' in the BA container. When extracting the container at runtime, the file will get overwritten.", "Error 8003: The location of the payload related to the previous error.", "Error 8003: The location of the payload related to the previous error.", "Error 8003: The location of the payload related to the previous error.", diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs index 3c97ceb1a..f06d1e53f 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/BundleManifestFixture.cs @@ -192,7 +192,7 @@ public void CanBuildBundleManifestWithNormalizedRelatedBundles() } [Fact] - public void PopulatesBEManifestWithBundleExtensionBundleCustomData() + public void PopulatesBEManifestWithBootstrapperExtensionBundleCustomData() { var folder = TestData.Get(@"TestData"); @@ -222,7 +222,7 @@ public void PopulatesBEManifestWithBundleExtensionBundleCustomData() var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath); extractResult.AssertSuccess(); - var customElements = extractResult.GetBundleExtensionTestXmlLines("/be:BundleExtensionData/be:BundleExtension[@Id='CustomTableExtension']/be:BundleCustomTableBE"); + var customElements = extractResult.GetBootstrapperExtensionTestXmlLines("/be:BootstrapperExtensionData/be:BootstrapperExtension[@Id='CustomTableExtension']/be:BundleCustomTableBE"); WixAssert.CompareLineByLine(new[] { "", @@ -233,7 +233,7 @@ public void PopulatesBEManifestWithBundleExtensionBundleCustomData() } [Fact] - public void PopulatesManifestWithBundleExtension() + public void PopulatesManifestWithBootstrapperExtension() { var folder = TestData.Get(@"TestData"); @@ -248,8 +248,8 @@ public void PopulatesManifestWithBundleExtension() var result = WixRunner.Execute(new[] { "build", - Path.Combine(folder, "BundleExtension", "BundleExtension.wxs"), - Path.Combine(folder, "BundleExtension", "SimpleBundleExtension.wxs"), + Path.Combine(folder, "BootstrapperExtension", "BootstrapperExtension.wxs"), + Path.Combine(folder, "BootstrapperExtension", "SimpleBootstrapperExtension.wxs"), Path.Combine(folder, "BundleWithPackageGroupRef", "MinimalPackageGroup.wxs"), Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), "-bindpath", Path.Combine(folder, "SimpleBundle", "data"), @@ -264,22 +264,22 @@ public void PopulatesManifestWithBundleExtension() var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath); extractResult.AssertSuccess(); - var bundleExtensions = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:BundleExtension"); + var bootstrapperExtensions = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:BootstrapperExtension"); WixAssert.CompareLineByLine(new[] { - "", - }, bundleExtensions); + "", + }, bootstrapperExtensions); - var bundleExtensionPayloads = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:UX/burn:Payload[@Id='ExampleBext']"); + var bootstrapperExtensionPayloads = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:UX/burn:Payload[@Id='ExampleBext']"); WixAssert.CompareLineByLine(new[] { "", - }, bundleExtensionPayloads); + }, bootstrapperExtensionPayloads); } } [Fact] - public void PopulatesManifestWithBundleExtensionSearches() + public void PopulatesManifestWithBootstrapperExtensionSearches() { var folder = TestData.Get(@"TestData"); @@ -294,8 +294,8 @@ public void PopulatesManifestWithBundleExtensionSearches() var result = WixRunner.Execute(new[] { "build", - Path.Combine(folder, "BundleExtension", "BundleExtensionSearches.wxs"), - Path.Combine(folder, "BundleExtension", "BundleWithSearches.wxs"), + Path.Combine(folder, "BootstrapperExtension", "BootstrapperExtensionSearches.wxs"), + Path.Combine(folder, "BootstrapperExtension", "BundleWithSearches.wxs"), Path.Combine(folder, "BundleWithPackageGroupRef", "MinimalPackageGroup.wxs"), Path.Combine(folder, "BundleWithPackageGroupRef", "Bundle.wxs"), "-ext", ExtensionPaths.ExampleExtensionPath, @@ -311,29 +311,29 @@ public void PopulatesManifestWithBundleExtensionSearches() var extractResult = BundleExtractor.ExtractBAContainer(null, bundlePath, baFolderPath, extractFolderPath); extractResult.AssertSuccess(); - var bundleExtensions = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:BundleExtension"); + var bootstrapperExtensions = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:BootstrapperExtension"); WixAssert.CompareLineByLine(new[] { - "", - }, bundleExtensions); + "", + }, bootstrapperExtensions); var extensionSearches = extractResult.GetManifestTestXmlLines("/burn:BurnManifest/burn:ExtensionSearch"); WixAssert.CompareLineByLine(new[] { - "", - "", + "", + "", }, extensionSearches); - var bundleExtensionDatas = extractResult.GetBundleExtensionTestXmlLines("/be:BundleExtensionData/be:BundleExtension[@Id='ExampleBundleExtension']"); + var bootstrapperExtensionDatas = extractResult.GetBootstrapperExtensionTestXmlLines("/be:BootstrapperExtensionData/be:BootstrapperExtension[@Id='ExampleBootstrapperExtension']"); WixAssert.CompareLineByLine(new[] { - "" + + "" + "" + "" + - "" - }, bundleExtensionDatas); + "" + }, bootstrapperExtensionDatas); - var exampleSearches = extractResult.GetBundleExtensionTestXmlLines("/be:BundleExtensionData/be:BundleExtension[@Id='ExampleBundleExtension']/be:ExampleSearch"); + var exampleSearches = extractResult.GetBootstrapperExtensionTestXmlLines("/be:BootstrapperExtensionData/be:BootstrapperExtension[@Id='ExampleBootstrapperExtension']/be:ExampleSearch"); WixAssert.CompareLineByLine(new[] { "", diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BadInput/DuplicatePayloadNames.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BadInput/DuplicatePayloadNames.wxs index 57a856698..eead3c369 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BadInput/DuplicatePayloadNames.wxs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BadInput/DuplicatePayloadNames.wxs @@ -5,7 +5,7 @@ - + diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleExtension/BundleExtension.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BootstrapperExtension/BootstrapperExtension.wxs similarity index 57% rename from src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleExtension/BundleExtension.wxs rename to src/wix/test/WixToolsetTest.CoreIntegration/TestData/BootstrapperExtension/BootstrapperExtension.wxs index eefae822e..8a422ad0a 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleExtension/BundleExtension.wxs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BootstrapperExtension/BootstrapperExtension.wxs @@ -1,6 +1,6 @@ - + diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleExtension/BundleExtensionSearches.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BootstrapperExtension/BootstrapperExtensionSearches.wxs similarity index 100% rename from src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleExtension/BundleExtensionSearches.wxs rename to src/wix/test/WixToolsetTest.CoreIntegration/TestData/BootstrapperExtension/BootstrapperExtensionSearches.wxs diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleExtension/BundleWithSearches.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BootstrapperExtension/BundleWithSearches.wxs similarity index 100% rename from src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleExtension/BundleWithSearches.wxs rename to src/wix/test/WixToolsetTest.CoreIntegration/TestData/BootstrapperExtension/BundleWithSearches.wxs diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleExtension/SimpleBundleExtension.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BootstrapperExtension/SimpleBootstrapperExtension.wxs similarity index 82% rename from src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleExtension/SimpleBundleExtension.wxs rename to src/wix/test/WixToolsetTest.CoreIntegration/TestData/BootstrapperExtension/SimpleBootstrapperExtension.wxs index 7303a05a7..3af8c62c4 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleExtension/SimpleBundleExtension.wxs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BootstrapperExtension/SimpleBootstrapperExtension.wxs @@ -5,6 +5,6 @@ - + diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleCustomTable/BundleCustomTable.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleCustomTable/BundleCustomTable.wxs index e52302d46..4e6dfe626 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleCustomTable/BundleCustomTable.wxs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/BundleCustomTable/BundleCustomTable.wxs @@ -48,6 +48,6 @@ - +