fix: installer package error

This commit is contained in:
MystiPanda 2024-05-19 19:13:21 +08:00
parent 8f6bf6e002
commit 554c8fe163

View File

@ -420,23 +420,14 @@ Function .onInit
FunctionEnd FunctionEnd
!macro CheckAllVergeProcesses !macro CheckAllVergeProcesses
; Check if Clash Verge.exe is running
nsis_tauri_utils::FindProcess "Clash Verge.exe"
${If} $R0 != 0
; Kill the process
DetailPrint "Kill Clash Verge.exe..."
!if "${INSTALLMODE}" == "currentUser"
nsis_tauri_utils::KillProcessCurrentUser "Clash Verge.exe"
!else
nsis_tauri_utils::KillProcess "Clash Verge.exe"
!endif
${EndIf}
; Check if clash-verge-service.exe is running ; Check if clash-verge-service.exe is running
!if "${INSTALLMODE}" == "currentUser"
nsis_tauri_utils::FindProcessCurrentUser "clash-verge-service.exe"
!else
nsis_tauri_utils::FindProcess "clash-verge-service.exe" nsis_tauri_utils::FindProcess "clash-verge-service.exe"
${If} $R0 != 0 !endif
; Kill the process Pop $R0
${If} $R0 = 0
DetailPrint "Kill clash-verge-service.exe..." DetailPrint "Kill clash-verge-service.exe..."
!if "${INSTALLMODE}" == "currentUser" !if "${INSTALLMODE}" == "currentUser"
nsis_tauri_utils::KillProcessCurrentUser "clash-verge-service.exe" nsis_tauri_utils::KillProcessCurrentUser "clash-verge-service.exe"
@ -445,11 +436,14 @@ FunctionEnd
!endif !endif
${EndIf} ${EndIf}
; Check if clash-meta-alpha.exe is running ; Check if clash-meta-alpha.exe is running
!if "${INSTALLMODE}" == "currentUser"
nsis_tauri_utils::FindProcessCurrentUser "clash-meta-alpha.exe"
!else
nsis_tauri_utils::FindProcess "clash-meta-alpha.exe" nsis_tauri_utils::FindProcess "clash-meta-alpha.exe"
${If} $R0 != 0 !endif
; Kill the process Pop $R0
${If} $R0 = 0
DetailPrint "Kill clash-meta-alpha.exe..." DetailPrint "Kill clash-meta-alpha.exe..."
!if "${INSTALLMODE}" == "currentUser" !if "${INSTALLMODE}" == "currentUser"
nsis_tauri_utils::KillProcessCurrentUser "clash-meta-alpha.exe" nsis_tauri_utils::KillProcessCurrentUser "clash-meta-alpha.exe"
@ -459,9 +453,13 @@ FunctionEnd
${EndIf} ${EndIf}
; Check if clash-meta.exe is running ; Check if clash-meta.exe is running
!if "${INSTALLMODE}" == "currentUser"
nsis_tauri_utils::FindProcessCurrentUser "clash-meta.exe"
!else
nsis_tauri_utils::FindProcess "clash-meta.exe" nsis_tauri_utils::FindProcess "clash-meta.exe"
${If} $R0 != 0 !endif
; Kill the process Pop $R0
${If} $R0 = 0
DetailPrint "Kill clash-meta.exe..." DetailPrint "Kill clash-meta.exe..."
!if "${INSTALLMODE}" == "currentUser" !if "${INSTALLMODE}" == "currentUser"
nsis_tauri_utils::KillProcessCurrentUser "clash-meta.exe" nsis_tauri_utils::KillProcessCurrentUser "clash-meta.exe"