fix windows build
This commit is contained in:
@@ -3,29 +3,12 @@
|
||||
; Install: enables long paths, adds resources\cli to user PATH for openclaw CLI.
|
||||
; Uninstall: removes the PATH entry and optionally deletes user data.
|
||||
|
||||
; When customCheckAppRunning is defined, electron-builder skips its conditional
|
||||
; !include for getProcessInfo.nsh and the "Var pid" declaration. We must do
|
||||
; both ourselves so ${GetProcessInfo} and $pid are available.
|
||||
!ifndef getProcessInfo_included
|
||||
!define getProcessInfo_included
|
||||
!include "getProcessInfo.nsh"
|
||||
Var pid
|
||||
!endif
|
||||
!ifndef nsProcess_included
|
||||
!define nsProcess_included
|
||||
!include "nsProcess.nsh"
|
||||
!endif
|
||||
|
||||
!macro customCheckAppRunning
|
||||
${GetProcessInfo} 0 $pid $1 $2 $3 $4
|
||||
${if} $3 != "${APP_EXECUTABLE_FILENAME}"
|
||||
${if} ${isUpdated}
|
||||
# allow app to exit without explicit kill
|
||||
Sleep 300
|
||||
${endIf}
|
||||
|
||||
# Instead of launching cmd.exe /c tasklist, use the nsProcess plugin directly for all environments.
|
||||
# This prevents the brief black cmd window from flashing.
|
||||
${nsProcess::FindProcess} "${APP_EXECUTABLE_FILENAME}" $R0
|
||||
|
||||
${if} $R0 == 0
|
||||
@@ -80,7 +63,6 @@
|
||||
not_running:
|
||||
nsProcess::Unload
|
||||
${endIf}
|
||||
${endIf}
|
||||
!macroend
|
||||
|
||||
!macro customInstall
|
||||
|
||||
Reference in New Issue
Block a user