aboutsummaryrefslogtreecommitdiff
path: root/src/burn/engine/core.cpp
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2021-07-02 10:18:08 -0500
committerSean Hall <r.sean.hall@gmail.com>2021-07-02 12:50:09 -0500
commitf43d176f95601ff7524e06247166d4f3b6e61c05 (patch)
tree2e3580ca60c85e1d07a0ab4a2b1279d25fd41f6c /src/burn/engine/core.cpp
parent9bdf3730cd43e1af8a4ea9be6cf2fba77fcff2d2 (diff)
downloadwix-f43d176f95601ff7524e06247166d4f3b6e61c05.tar.gz
wix-f43d176f95601ff7524e06247166d4f3b6e61c05.tar.bz2
wix-f43d176f95601ff7524e06247166d4f3b6e61c05.zip
Make the BA responsible for parsing restart prompt behavior.
Fixes #4975
Diffstat (limited to 'src/burn/engine/core.cpp')
-rw-r--r--src/burn/engine/core.cpp39
1 files changed, 0 insertions, 39 deletions
diff --git a/src/burn/engine/core.cpp b/src/burn/engine/core.cpp
index 8b97952c..f71103a8 100644
--- a/src/burn/engine/core.cpp
+++ b/src/burn/engine/core.cpp
@@ -924,7 +924,6 @@ extern "C" HRESULT CoreRecreateCommandLine(
924 __deref_inout_z LPWSTR* psczCommandLine, 924 __deref_inout_z LPWSTR* psczCommandLine,
925 __in BOOTSTRAPPER_ACTION action, 925 __in BOOTSTRAPPER_ACTION action,
926 __in BOOTSTRAPPER_DISPLAY display, 926 __in BOOTSTRAPPER_DISPLAY display,
927 __in BOOTSTRAPPER_RESTART restart,
928 __in BOOTSTRAPPER_RELATION_TYPE relationType, 927 __in BOOTSTRAPPER_RELATION_TYPE relationType,
929 __in BOOL fPassthrough, 928 __in BOOL fPassthrough,
930 __in_z_opt LPCWSTR wzActiveParent, 929 __in_z_opt LPCWSTR wzActiveParent,
@@ -965,17 +964,6 @@ extern "C" HRESULT CoreRecreateCommandLine(
965 } 964 }
966 ExitOnFailure(hr, "Failed to append action state to command-line"); 965 ExitOnFailure(hr, "Failed to append action state to command-line");
967 966
968 switch (restart)
969 {
970 case BOOTSTRAPPER_RESTART_ALWAYS:
971 hr = StrAllocConcat(psczCommandLine, L" /forcerestart", 0);
972 break;
973 case BOOTSTRAPPER_RESTART_NEVER:
974 hr = StrAllocConcat(psczCommandLine, L" /norestart", 0);
975 break;
976 }
977 ExitOnFailure(hr, "Failed to append restart state to command-line");
978
979 if (wzActiveParent) 967 if (wzActiveParent)
980 { 968 {
981 if (*wzActiveParent) 969 if (*wzActiveParent)
@@ -1246,32 +1234,10 @@ extern "C" HRESULT CoreParseCommandLine(
1246 CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"silent", -1)) 1234 CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"silent", -1))
1247 { 1235 {
1248 pCommand->display = BOOTSTRAPPER_DISPLAY_NONE; 1236 pCommand->display = BOOTSTRAPPER_DISPLAY_NONE;
1249
1250 if (BOOTSTRAPPER_RESTART_UNKNOWN == pCommand->restart)
1251 {
1252 pCommand->restart = BOOTSTRAPPER_RESTART_AUTOMATIC;
1253 }
1254 } 1237 }
1255 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"passive", -1)) 1238 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"passive", -1))
1256 { 1239 {
1257 pCommand->display = BOOTSTRAPPER_DISPLAY_PASSIVE; 1240 pCommand->display = BOOTSTRAPPER_DISPLAY_PASSIVE;
1258
1259 if (BOOTSTRAPPER_RESTART_UNKNOWN == pCommand->restart)
1260 {
1261 pCommand->restart = BOOTSTRAPPER_RESTART_AUTOMATIC;
1262 }
1263 }
1264 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"norestart", -1))
1265 {
1266 pCommand->restart = BOOTSTRAPPER_RESTART_NEVER;
1267 }
1268 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"forcerestart", -1))
1269 {
1270 pCommand->restart = BOOTSTRAPPER_RESTART_ALWAYS;
1271 }
1272 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"promptrestart", -1))
1273 {
1274 pCommand->restart = BOOTSTRAPPER_RESTART_PROMPT;
1275 } 1241 }
1276 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"layout", -1)) 1242 else if (CSTR_EQUAL == ::CompareStringW(LOCALE_INVARIANT, NORM_IGNORECASE, &argv[i][1], -1, L"layout", -1))
1277 { 1243 {
@@ -1653,11 +1619,6 @@ extern "C" HRESULT CoreParseCommandLine(
1653 pCommand->display = BOOTSTRAPPER_DISPLAY_FULL; 1619 pCommand->display = BOOTSTRAPPER_DISPLAY_FULL;
1654 } 1620 }
1655 1621
1656 if (BOOTSTRAPPER_RESTART_UNKNOWN == pCommand->restart)
1657 {
1658 pCommand->restart = BOOTSTRAPPER_RESTART_PROMPT;
1659 }
1660
1661LExit: 1622LExit:
1662 if (fInvalidCommandLine) 1623 if (fInvalidCommandLine)
1663 { 1624 {