From 43c6ec973cabe89da9d79cc36a24d594f05c5947 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Fri, 2 Oct 2026 04:36:11 +0200 Subject: [PATCH] [Installer] Test the error flag with LogicLib's ${Errors} condition makensis rejected the script with "macro _If requires 4 parameter(s), passed 2" at the ClearErrors/OpenProcess pair. A ${If} condition cannot be a bare $Var: LogicLib needs either a comparison or one of its flag macros, and a lone $Errors splits into too few arguments for _If. ${Errors} is the documented flag condition and is the same mechanism as the ${Silent} test already used here. The dump step earned its keep - this took one run to locate rather than another round of guessing. --- cmake/NSIS.template.in | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/NSIS.template.in b/cmake/NSIS.template.in index b2b4cb535..bee52d8b2 100644 --- a/cmake/NSIS.template.in +++ b/cmake/NSIS.template.in @@ -518,9 +518,9 @@ Function WaitForLauncherToExit ; do with the upgrade. ClearErrors System::Call 'kernel32::OpenProcess(i 0x00100000, i 0, i $WaitPid) p.r0' - ${If} $Errors - ; The launcher is gone - OpenProcess cannot open a dead process - which is - ; exactly the state the wait was for. + ${If} ${Errors} + ; The launcher is gone - OpenProcess cannot open a dead process - which is + ; exactly the state the wait was for. DetailPrint "The application that started this installer has already exited." StrCpy $LauncherExited 1 Return