From 75f4dce4ea53b82f99932573f27ccfc799d0c5c1 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Mon, 4 Apr 2022 17:38:26 -0500 Subject: Add option for BundlePackage to be hidden in ARP like MsiPackage. Requires support for this feature in the nested bundle. Simplest implementation of 4454 --- src/burn/engine/core.cpp | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'src/burn/engine/core.cpp') diff --git a/src/burn/engine/core.cpp b/src/burn/engine/core.cpp index 0bbf7039..be8c011f 100644 --- a/src/burn/engine/core.cpp +++ b/src/burn/engine/core.cpp @@ -1044,6 +1044,12 @@ static HRESULT CoreRecreateCommandLine( ExitOnFailure(hr, "Failed to append relation type to command-line."); } + if (pInternalCommand->fArpSystemComponent) + { + hr = StrAllocConcatFormatted(psczCommandLine, L" /%ls", BURN_COMMANDLINE_SWITCH_SYSTEM_COMPONENT); + ExitOnFailure(hr, "Failed to append system component to command-line."); + } + if (fPassthrough) { hr = StrAllocConcatFormatted(psczCommandLine, L" /%ls", BURN_COMMANDLINE_SWITCH_PASSTHROUGH); @@ -1633,6 +1639,29 @@ extern "C" HRESULT CoreParseCommandLine( } } } + else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], lstrlenW(BURN_COMMANDLINE_SWITCH_SYSTEM_COMPONENT), BURN_COMMANDLINE_SWITCH_SYSTEM_COMPONENT, lstrlenW(BURN_COMMANDLINE_SWITCH_SYSTEM_COMPONENT))) + { + // Get a pointer to the next character after the switch. + LPCWSTR wzParam = &argv[i][1 + lstrlenW(BURN_COMMANDLINE_SWITCH_SYSTEM_COMPONENT)]; + + // Switch without an argument is allowed. An empty string means FALSE, everything else means TRUE. + if (L'\0' != wzParam[0]) + { + if (L'=' != wzParam[0]) + { + fInvalidCommandLine = TRUE; + TraceLog(E_INVALIDARG, "Invalid switch: %ls", argv[i]); + } + else + { + pInternalCommand->fArpSystemComponent = L'\0' != wzParam[1]; + } + } + else + { + pInternalCommand->fArpSystemComponent = TRUE; + } + } else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, BURN_COMMANDLINE_SWITCH_EMBEDDED, -1)) { if (i + 3 >= argc) -- cgit v1.2.3-55-g6feb