aboutsummaryrefslogtreecommitdiff
path: root/src/ext/Bal/dnchost
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2022-05-13 15:39:40 -0500
committerSean Hall <r.sean.hall@gmail.com>2022-05-14 11:12:31 -0500
commitd5985a1688bc878e42ffd3ce3939fa52303cab16 (patch)
tree0c283fe5454659c569317b37840a040474cfa032 /src/ext/Bal/dnchost
parent6a6974a15deb6edf593736cdb8043bfb93064782 (diff)
downloadwix-d5985a1688bc878e42ffd3ce3939fa52303cab16.tar.gz
wix-d5985a1688bc878e42ffd3ce3939fa52303cab16.tar.bz2
wix-d5985a1688bc878e42ffd3ce3939fa52303cab16.zip
Add option to hosts to always install prereqs.
Add PrereqPackage to BundlePackage Implements 4718
Diffstat (limited to 'src/ext/Bal/dnchost')
-rw-r--r--src/ext/Bal/dnchost/dnchost.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ext/Bal/dnchost/dnchost.cpp b/src/ext/Bal/dnchost/dnchost.cpp
index 6c066f43..36970f83 100644
--- a/src/ext/Bal/dnchost/dnchost.cpp
+++ b/src/ext/Bal/dnchost/dnchost.cpp
@@ -76,6 +76,16 @@ extern "C" HRESULT WINAPI BootstrapperApplicationCreate(
76 vstate.fInitialized = TRUE; 76 vstate.fInitialized = TRUE;
77 } 77 }
78 78
79 if (vstate.prereqData.fAlwaysInstallPrereqs && !vstate.prereqData.fCompleted)
80 {
81 BalLog(BOOTSTRAPPER_LOG_LEVEL_STANDARD, "Loading prerequisite bootstrapper application since it's configured to always run before loading the runtime.");
82
83 hr = CreatePrerequisiteBA(&vstate, pEngine, pArgs, pResults);
84 BalExitOnFailure(hr, "Failed to create the pre-requisite bootstrapper application.");
85
86 ExitFunction();
87 }
88
79 if (!vstate.fInitializedRuntime) 89 if (!vstate.fInitializedRuntime)
80 { 90 {
81 hr = LoadRuntime(&vstate); 91 hr = LoadRuntime(&vstate);
@@ -214,6 +224,15 @@ static HRESULT LoadDncConfiguration(
214 hr = StrAllocConcat(&pState->sczBaFactoryRuntimeConfigPath, L".runtimeconfig.json", 0); 224 hr = StrAllocConcat(&pState->sczBaFactoryRuntimeConfigPath, L".runtimeconfig.json", 0);
215 BalExitOnFailure(hr, "Failed to concat extension to runtime config path."); 225 BalExitOnFailure(hr, "Failed to concat extension to runtime config path.");
216 226
227 hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixMbaPrereqOptions", &pixnHost);
228 BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to find WixMbaPrereqOptions element in bootstrapper application config.");
229
230 if (fXmlFound)
231 {
232 hr = XmlGetAttributeNumber(pixnHost, L"AlwaysInstallPrereqs", reinterpret_cast<DWORD*>(&pState->prereqData.fAlwaysInstallPrereqs));
233 BalExitOnOptionalXmlQueryFailure(hr, fXmlFound, "Failed to get AlwaysInstallPrereqs value.");
234 }
235
217 pState->type = DNCHOSTTYPE_FDD; 236 pState->type = DNCHOSTTYPE_FDD;
218 237
219 hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixDncOptions", &pixnHost); 238 hr = XmlSelectSingleNode(pixdManifest, L"/BootstrapperApplicationData/WixDncOptions", &pixnHost);