From 24c3079a293978a74845621263de2ce1868edc50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Fri, 2 Oct 2026 01:32:25 +0200 Subject: [PATCH 1/5] [Installer] Close the /? help string so the installer compiles again The last line of the continued MessageBox string ended in $\n\" instead of $\n". NSIS reads \" as an escaped quote, so the string never terminated and makensis rejected the script, which took the CPack packaging step down with it. The Windows build failed on "Problem running NSIS command" before ever reaching the new required-runtime check. --- cmake/NSIS.template.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/NSIS.template.in b/cmake/NSIS.template.in index 24856729f..b647072e0 100644 --- a/cmake/NSIS.template.in +++ b/cmake/NSIS.template.in @@ -95,7 +95,7 @@ ${IfNot} ${Errors} /S : Silent install$\n\ /R : Silent upgrade$\n\ /PID=%pid% : Process to wait for before replacing files (used by the in-app updater)$\n\ - /D=%directory% : Specify destination directory$\n\" + /D=%directory% : Specify destination directory$\n" Quit ${EndIf} From 397ef4c0106131419250c539fe61025ae5ddbdea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Fri, 2 Oct 2026 02:40:12 +0200 Subject: [PATCH 2/5] [Installer] Give FindFirst the two arguments it takes FindFirst takes the pattern and the output variable and leaves the search handle in $0. There is no handle argument, and FindNext taking only a variable is the giveaway: the handle has to live somewhere implicit, and it is $0. The call passed three arguments, so makensis rejected the script and the CPack packaging step failed with "Problem running NSIS command" before ever reaching the required-runtime check. This was not only a compile error. The handle variable was never populated, so the stale-runtime check that commit 844a1a9b added could never see a match: it probed $StaleFindHandle, which stayed empty, and the widened wildcard scan over the purge set was a no-op. Pass the pattern, test $0, and close $0. No FindNext is needed, because $R0 is a yes/no flag rather than a list. Drops the now unused StaleFindHandle Var. --- cmake/NSIS.template.in | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/cmake/NSIS.template.in b/cmake/NSIS.template.in index b647072e0..b2b4cb535 100644 --- a/cmake/NSIS.template.in +++ b/cmake/NSIS.template.in @@ -15,7 +15,6 @@ Var ReinstallMode Var AllowForceClose Var GuardDir Var OldUninstallString -Var StaleFindHandle Var StaleFindName Var IsUpgrade Var AbortReason @@ -686,10 +685,16 @@ Function CheckStaleRuntimeMask ${If} $R0 = 1 Return ${EndIf} - FindFirst $StaleFindHandle $StaleFindName "$INSTDIR\$R3" - ${If} $StaleFindHandle != "" + ; FindFirst takes the pattern and the name variable only, and leaves the + ; search handle in $0 - there is no handle argument and no handle variable + ; to keep, which is why FindNext does not take one either. $R3 and $R0 are + ; untouched by it, so only $0 is consumed here. + ; One match is enough: $R0 is a yes/no flag, not a list, so there is no + ; FindNext and nothing to iterate. + FindFirst "$INSTDIR\$R3" $StaleFindName + ${If} $0 != "" StrCpy $R0 1 - FindClose $StaleFindHandle + FindClose $0 ${EndIf} FunctionEnd From a041d8c0c3c3e4fa6ecc13bf38c9792476f42856 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Fri, 2 Oct 2026 02:40:32 +0200 Subject: [PATCH 3/5] [CI] Dump the NSIS compile log when packaging fails CPack reports a failed makensis run as "Problem running NSIS command" plus a path to NSISOutput.log, and that log exists only on the runner, so the actual compile error never reaches the workflow output. An installer script that does not compile is therefore undiagnosable from CI alone, which is exactly how a three-argument FindFirst cost two build cycles here. --- .github/workflows/desktop-build.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index bd528f245..206bc930e 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -458,6 +458,14 @@ jobs: VCPKG_FEATURE_FLAGS: dependencygraph run: .ci/compile.sh --server --test --vcpkg + # CPack reports a failed makensis run as "Problem running NSIS command" + # plus a path to NSISOutput.log, and that log lives only on the runner, so + # the actual compile error is otherwise nowhere in the workflow output. + # Dump it, or a broken installer script is undiagnosable from CI alone. + - name: "Dump NSIS compile log" + if: failure() && matrix.os == 'Windows' + run: find . -name NSISOutput.log -exec cat {} \; + # Delete used cache to emulate a ccache update. See https://github.com/actions/cache/issues/342 - name: "[macOS] Delete remote compiler cache (ccache)" if: matrix.os == 'macOS' && matrix.use_ccache == 1 && github.ref == 'refs/heads/master' && steps.restore_ccache.outputs.cache-hit From 4c911df257c1b4d538a3e6c3d8f5d67189f7a99e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Fri, 2 Oct 2026 03:24:21 +0200 Subject: [PATCH 4/5] [CI] Run the NSIS log dump under bash The dump step used the default pwsh shell, where `find` resolves to Windows' text-search find.exe rather than a file finder, so it died with "FIND: Parameter format not correct" instead of printing anything. Pin shell: bash. --- .github/workflows/desktop-build.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/desktop-build.yml b/.github/workflows/desktop-build.yml index 206bc930e..17c42b07d 100644 --- a/.github/workflows/desktop-build.yml +++ b/.github/workflows/desktop-build.yml @@ -462,9 +462,12 @@ jobs: # plus a path to NSISOutput.log, and that log lives only on the runner, so # the actual compile error is otherwise nowhere in the workflow output. # Dump it, or a broken installer script is undiagnosable from CI alone. + # shell: bash matters here - the default pwsh resolves `find` to Windows' + # text-search find.exe, which errors instead of searching. - name: "Dump NSIS compile log" if: failure() && matrix.os == 'Windows' - run: find . -name NSISOutput.log -exec cat {} \; + shell: bash + run: find . -name NSISOutput.log -exec cat {} + # Delete used cache to emulate a ccache update. See https://github.com/actions/cache/issues/342 - name: "[macOS] Delete remote compiler cache (ccache)" 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 5/5] [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