aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/pseudobundle.cpp
diff options
context:
space:
mode:
authorNir Bar <nir.bar@panel-sw.co.il>2023-06-05 13:27:56 +0300
committerBob Arnson <github@bobs.org>2024-01-20 22:27:41 -0500
commitdfea4478a4938ce738fd49282350d36c73fb9a35 (patch)
tree8445e774b7a79a76f239ed523c6689f445961da2 /src/burn/engine/pseudobundle.cpp
parentcde596e1bb9288f8cebb447a5f8cb79ca684cfe1 (diff)
downloadwix-dfea4478a4938ce738fd49282350d36c73fb9a35.tar.gz
wix-dfea4478a4938ce738fd49282350d36c73fb9a35.tar.bz2
wix-dfea4478a4938ce738fd49282350d36c73fb9a35.zip
Fixes wixtoolset/issues#5220: Automatically add logging flag for any burn ExePackage, BundlePackage, and related bundles
Diffstat (limited to 'src/burn/engine/pseudobundle.cpp')
-rw-r--r--src/burn/engine/pseudobundle.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/burn/engine/pseudobundle.cpp b/src/burn/engine/pseudobundle.cpp
index 8b30ebfc..f0d67068 100644
--- a/src/burn/engine/pseudobundle.cpp
+++ b/src/burn/engine/pseudobundle.cpp
@@ -27,7 +27,7 @@ extern "C" HRESULT PseudoBundleInitializeRelated(
27 ExitOnNull(pPackage->payloads.rgItems, hr, E_OUTOFMEMORY, "Failed to allocate space for burn payload group inside of related bundle struct"); 27 ExitOnNull(pPackage->payloads.rgItems, hr, E_OUTOFMEMORY, "Failed to allocate space for burn payload group inside of related bundle struct");
28 pPackage->payloads.cItems = 1; 28 pPackage->payloads.cItems = 1;
29 29
30 pPayload = (BURN_PAYLOAD*)MemAlloc(sizeof(BURN_PAYLOAD), TRUE); 30 pPayload = (BURN_PAYLOAD*)MemAlloc(sizeof(BURN_PAYLOAD), TRUE);
31 ExitOnNull(pPayload, hr, E_OUTOFMEMORY, "Failed to allocate space for burn payload inside of related bundle struct"); 31 ExitOnNull(pPayload, hr, E_OUTOFMEMORY, "Failed to allocate space for burn payload inside of related bundle struct");
32 pPackage->payloads.rgItems[0].pPayload = pPayload; 32 pPackage->payloads.rgItems[0].pPayload = pPayload;
33 pPayload->packaging = BURN_PAYLOAD_PACKAGING_EXTERNAL; 33 pPayload->packaging = BURN_PAYLOAD_PACKAGING_EXTERNAL;
@@ -59,6 +59,10 @@ extern "C" HRESULT PseudoBundleInitializeRelated(
59 hr = StrAllocString(&pPackage->sczCacheId, wzId, 0); 59 hr = StrAllocString(&pPackage->sczCacheId, wzId, 0);
60 ExitOnFailure(hr, "Failed to copy cache id for pseudo bundle."); 60 ExitOnFailure(hr, "Failed to copy cache id for pseudo bundle.");
61 61
62 // Log variables - best effort
63 StrAllocFormatted(&pPackage->sczLogPathVariable, L"WixBundleLog_%ls", pPackage->sczId);
64 StrAllocFormatted(&pPackage->sczRollbackLogPathVariable, L"WixBundleRollbackLog_%ls", pPackage->sczId);
65
62 if (pDependencyProvider) 66 if (pDependencyProvider)
63 { 67 {
64 pPackage->rgDependencyProviders = (BURN_DEPENDENCY_PROVIDER*)MemAlloc(sizeof(BURN_DEPENDENCY_PROVIDER), TRUE); 68 pPackage->rgDependencyProviders = (BURN_DEPENDENCY_PROVIDER*)MemAlloc(sizeof(BURN_DEPENDENCY_PROVIDER), TRUE);
@@ -122,6 +126,10 @@ extern "C" HRESULT PseudoBundleInitializePassthrough(
122 hr = StrAllocString(&pPassthroughPackage->sczCacheId, pPackage->sczCacheId, 0); 126 hr = StrAllocString(&pPassthroughPackage->sczCacheId, pPackage->sczCacheId, 0);
123 ExitOnFailure(hr, "Failed to copy cache id for passthrough pseudo bundle."); 127 ExitOnFailure(hr, "Failed to copy cache id for passthrough pseudo bundle.");
124 128
129 // Log variables - best effort
130 StrAllocFormatted(&pPackage->sczLogPathVariable, L"WixBundleLog_%ls", pPackage->sczId);
131 StrAllocFormatted(&pPackage->sczRollbackLogPathVariable, L"WixBundleRollbackLog_%ls", pPackage->sczId);
132
125 hr = CoreCreatePassthroughBundleCommandLine(&sczArguments, pInternalCommand, pCommand); 133 hr = CoreCreatePassthroughBundleCommandLine(&sczArguments, pInternalCommand, pCommand);
126 ExitOnFailure(hr, "Failed to create command-line arguments."); 134 ExitOnFailure(hr, "Failed to create command-line arguments.");
127 135
@@ -207,6 +215,10 @@ extern "C" HRESULT PseudoBundleInitializeUpdateBundle(
207 hr = StrAllocString(&pPackage->sczCacheId, wzCacheId, 0); 215 hr = StrAllocString(&pPackage->sczCacheId, wzCacheId, 0);
208 ExitOnFailure(hr, "Failed to copy cache id for update bundle."); 216 ExitOnFailure(hr, "Failed to copy cache id for update bundle.");
209 217
218 // Log variables - best effort
219 StrAllocFormatted(&pPackage->sczLogPathVariable, L"WixBundleLog_%ls", pPackage->sczId);
220 StrAllocFormatted(&pPackage->sczRollbackLogPathVariable, L"WixBundleRollbackLog_%ls", pPackage->sczId);
221
210 hr = StrAllocString(&pPackage->Exe.sczInstallArguments, wzInstallArguments, 0); 222 hr = StrAllocString(&pPackage->Exe.sczInstallArguments, wzInstallArguments, 0);
211 ExitOnFailure(hr, "Failed to copy install arguments for update bundle package"); 223 ExitOnFailure(hr, "Failed to copy install arguments for update bundle package");
212 224