summaryrefslogtreecommitdiff
path: root/CMake/Modules/NSIS.template.in
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2026-06-22 12:03:55 +0200
committerChristoph Berg <myon@debian.org>2026-06-22 12:03:55 +0200
commitde18fc13175a5bf0e2b48a042d2fc06e87c88d24 (patch)
treef517074cd603d30eb7ba7e2122d38051e4c1439c /CMake/Modules/NSIS.template.in
parentb76e8361909e47f0937d4a64a5a4cb5939f51eb7 (diff)
parentd83a420f0517d7fc47aeb288a6a0cf4891784fcc (diff)
Update upstream source from tag 'upstream/3.0.2+dfsg'
Update to upstream version '3.0.2+dfsg' with Debian dir 90381fe7be9f5ea84d9b16c9cccf200a3fbe138b
Diffstat (limited to 'CMake/Modules/NSIS.template.in')
-rw-r--r--CMake/Modules/NSIS.template.in16
1 files changed, 16 insertions, 0 deletions
diff --git a/CMake/Modules/NSIS.template.in b/CMake/Modules/NSIS.template.in
index 9e171e28..b14a8623 100644
--- a/CMake/Modules/NSIS.template.in
+++ b/CMake/Modules/NSIS.template.in
@@ -970,6 +970,22 @@ SectionEnd
; "Program Files" for AllUsers, "My Documents" for JustMe...
Function .onInit
+ ; --- WSJT-X running-process check (custom) ---
+ ; Abort cleanly if WSJT-X is already running, to avoid a half-installed
+ ; mess when the user upgrades over a live instance. Uses tasklist+findstr
+ ; (built into every supported Windows version) so no NSIS plugin is
+ ; required.
+ wsjtx_running_check:
+ nsExec::Exec '"$SYSDIR\cmd.exe" /c tasklist /FI "IMAGENAME eq wsjtx.exe" 2>NUL | $SYSDIR\findstr.exe /I "wsjtx.exe" >NUL'
+ Pop $0
+ ${If} $0 == "0"
+ MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION \
+ "WSJT-X is currently running. $\n$\nPlease close it before installing or upgrading." \
+ /SD IDCANCEL IDRETRY wsjtx_running_check
+ Abort
+ ${EndIf}
+ ; --- end WSJT-X running-process check ---
+
Push $0
Push $1
Push $2