NSIS: depend on nsProcess instead of Processes NSIS plugin
authorDaniel Molkentin <danimo@owncloud.com>
Fri, 13 Mar 2015 13:04:16 +0000 (14:04 +0100)
committerDaniel Molkentin <danimo@owncloud.com>
Fri, 13 Mar 2015 13:04:16 +0000 (14:04 +0100)
The Processes plugin is no longer maintained, and OBS
compiles an up-to-date version of nsProcess for us.

cmake/modules/NSIS.template.in

index 8ec3cfb2579d5d860cddf56ea1b74e83f7680de0..754363ddd14066fd9f24ae8837d3c9ecaa038acc 100644 (file)
@@ -97,6 +97,7 @@ ReserveFile "${NSISDIR}\Plugins\InstallOptions.dll"
 !include WordFunc.nsh  ;Used by VersionCompare macro function.
 !include FileFunc.nsh  ;Used to read out parameters
 !include UAC.nsh ;Used by the UAC elevation to install as user or admin.
+!include nsProcess.nsh ;Used to kill the running process
 !include Library.nsh ;Used by the COM registration for shell extensions
 !include x64.nsh ;Used to determine the right arch for the shell extensions
 
@@ -257,7 +258,7 @@ FunctionEnd
 ##############################################################################
 
 !macro CheckForProcess processName gotoWhenFound gotoWhenNotFound
-   Processes::FindProcess ${processName}
+   ${nsProcess::FindProcess} ${processName} $R0
    StrCmp $R0 "0" ${gotoWhenNotFound} ${gotoWhenFound}
 !macroend
 
@@ -267,7 +268,7 @@ FunctionEnd
      /SD IDYES IDYES process_${processName}_kill IDNO process_${processName}_ended
    process_${processName}_kill:
       DetailPrint $ConfirmEndProcess_KILLING_PROCESSES_TEXT
-      Processes::KillProcess ${processName}
+      ${nsProcess::KillProcess} ${processName} $R0
       Sleep 1500
       StrCmp $R0 "1" process_${processName}_ended
       DetailPrint $ConfirmEndProcess_KILL_NOT_FOUND_TEXT