From 927eeb7a2a9c83592ded8613f1557c6edbe11af6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20Br=C3=BCbach?= Date: Wed, 23 Sep 2026 21:08:48 +0200 Subject: [PATCH] [Windows] Replace the GetTickCount macro with a direct System::Call --- cmake/NSIS.template.in | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/cmake/NSIS.template.in b/cmake/NSIS.template.in index 49140c7d8..df961f1b6 100644 --- a/cmake/NSIS.template.in +++ b/cmake/NSIS.template.in @@ -281,7 +281,8 @@ Function WaitForAppToClose Call CloseMatchingApps ; wall-clock deadline: each poll has to spawn a fresh powershell.exe, so ; a bare loop counter would not bound the real wait time to 60 s. - ${GetTickCount} $R8 + System::Call 'kernel32::GetTickCount()i.s' + Pop $R8 ck_wait_loop: Sleep 500 Call IsAppRunning @@ -289,7 +290,8 @@ Function WaitForAppToClose DetailPrint "$R1 closed." Return ${EndIf} - ${GetTickCount} $R9 + System::Call 'kernel32::GetTickCount()i.s' + Pop $R9 IntOp $R9 $R9 - $R8 ${If} $R9 < 60000 Goto ck_wait_loop @@ -388,7 +390,8 @@ Function un.WaitForAppToClose Call un.CloseMatchingApps ; wall-clock deadline: each poll has to spawn a fresh powershell.exe, so ; a bare loop counter would not bound the real wait time to 60 s. - ${GetTickCount} $R8 + System::Call 'kernel32::GetTickCount()i.s' + Pop $R8 un_ck_wait_loop: Sleep 500 Call un.IsAppRunning @@ -396,7 +399,8 @@ Function un.WaitForAppToClose DetailPrint "$R1 closed." Return ${EndIf} - ${GetTickCount} $R9 + System::Call 'kernel32::GetTickCount()i.s' + Pop $R9 IntOp $R9 $R9 - $R8 ${If} $R9 < 60000 Goto un_ck_wait_loop