Set specific exit codes when NSIS installer failed in silent mode

* Set specific exit codes when NSIS installer failed in silent mode
  Related: https://github.com/qbittorrent/qBittorrent/issues/18115#issuecomment-1789404780
* GHA CI: treat NSIS warnings as errors

PR #20296.
This commit is contained in:
Chocobo1
2024-01-22 14:01:15 +08:00
committed by GitHub
parent c5d7b62473
commit 31d456c43b
3 changed files with 16 additions and 12 deletions

View File

@@ -75,15 +75,16 @@ FunctionEnd
Function un.check_instance
check:
FindProcDLL::FindProc "qbittorrent.exe"
StrCmp $R0 "1" 0 notfound
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(uninst_warning) IDRETRY check IDCANCEL done
check:
FindProcDLL::FindProc "qbittorrent.exe"
StrCmp $R0 "1" 0 notfound
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(uninst_warning) /SD IDCANCEL IDRETRY check IDCANCEL canceled
done:
Abort
canceled:
SetErrorLevel 15618 # WinError.h: `ERROR_PACKAGES_IN_USE`
Abort
notfound:
notfound:
FunctionEnd