mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-11-24 10:16:00 +03:00
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:
parent
c5d7b62473
commit
31d456c43b
3 changed files with 16 additions and 12 deletions
2
.github/workflows/ci_windows.yaml
vendored
2
.github/workflows/ci_windows.yaml
vendored
|
@ -187,7 +187,7 @@ jobs:
|
||||||
- name: Create installer
|
- name: Create installer
|
||||||
run: |
|
run: |
|
||||||
7z x -o"dist/windows/" "dist/windows/NSISPlugins.zip"
|
7z x -o"dist/windows/" "dist/windows/NSISPlugins.zip"
|
||||||
makensis /DQBT_DIST_DIR="../../upload/qBittorrent" dist/windows/qbittorrent.nsi
|
makensis /DQBT_DIST_DIR="../../upload/qBittorrent" /WX dist/windows/qbittorrent.nsi
|
||||||
|
|
||||||
- name: Upload installer
|
- name: Upload installer
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
11
dist/windows/installer.nsh
vendored
11
dist/windows/installer.nsh
vendored
|
@ -117,12 +117,14 @@ Function .onInit
|
||||||
!insertmacro MUI_LANGDLL_DISPLAY
|
!insertmacro MUI_LANGDLL_DISPLAY
|
||||||
|
|
||||||
${IfNot} ${AtLeastWaaS} 1809 ; Windows 10 (1809) / Windows Server 2019. Min supported version by Qt6
|
${IfNot} ${AtLeastWaaS} 1809 ; Windows 10 (1809) / Windows Server 2019. Min supported version by Qt6
|
||||||
MessageBox MB_OK|MB_ICONEXCLAMATION $(inst_requires_win10)
|
MessageBox MB_OK|MB_ICONEXCLAMATION $(inst_requires_win10) /SD IDOK
|
||||||
|
SetErrorLevel 1654 # WinError.h: `ERROR_INSTALL_REJECTED`
|
||||||
Abort
|
Abort
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
${IfNot} ${RunningX64}
|
${IfNot} ${RunningX64}
|
||||||
MessageBox MB_OK|MB_ICONEXCLAMATION $(inst_requires_64bit)
|
MessageBox MB_OK|MB_ICONEXCLAMATION $(inst_requires_64bit) /SD IDOK
|
||||||
|
SetErrorLevel 1654 # WinError.h: `ERROR_INSTALL_REJECTED`
|
||||||
Abort
|
Abort
|
||||||
${EndIf}
|
${EndIf}
|
||||||
|
|
||||||
|
@ -147,9 +149,10 @@ Function check_instance
|
||||||
check:
|
check:
|
||||||
FindProcDLL::FindProc "qbittorrent.exe"
|
FindProcDLL::FindProc "qbittorrent.exe"
|
||||||
StrCmp $R0 "1" 0 notfound
|
StrCmp $R0 "1" 0 notfound
|
||||||
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(inst_warning) IDRETRY check IDCANCEL done
|
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(inst_warning) /SD IDCANCEL IDRETRY check IDCANCEL canceled
|
||||||
|
|
||||||
done:
|
canceled:
|
||||||
|
SetErrorLevel 15618 # WinError.h: `ERROR_PACKAGES_IN_USE`
|
||||||
Abort
|
Abort
|
||||||
|
|
||||||
notfound:
|
notfound:
|
||||||
|
|
15
dist/windows/uninstaller.nsh
vendored
15
dist/windows/uninstaller.nsh
vendored
|
@ -75,15 +75,16 @@ FunctionEnd
|
||||||
|
|
||||||
Function un.check_instance
|
Function un.check_instance
|
||||||
|
|
||||||
check:
|
check:
|
||||||
FindProcDLL::FindProc "qbittorrent.exe"
|
FindProcDLL::FindProc "qbittorrent.exe"
|
||||||
StrCmp $R0 "1" 0 notfound
|
StrCmp $R0 "1" 0 notfound
|
||||||
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(uninst_warning) IDRETRY check IDCANCEL done
|
MessageBox MB_RETRYCANCEL|MB_ICONEXCLAMATION $(uninst_warning) /SD IDCANCEL IDRETRY check IDCANCEL canceled
|
||||||
|
|
||||||
done:
|
canceled:
|
||||||
Abort
|
SetErrorLevel 15618 # WinError.h: `ERROR_PACKAGES_IN_USE`
|
||||||
|
Abort
|
||||||
|
|
||||||
notfound:
|
notfound:
|
||||||
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue