@ -1,3 +1,17 @@
@@ -1,3 +1,17 @@
; Uncomment when packaging 64bit qbittorrent
;!define QBT_IS_X64
; Uncomment when packaging qt6 qbittorrent
; It will also define QBT_IS_X64
;!define QBT_USES_QT6
!ifdef QBT_USES_QT6
!define /redef QBT_IS_X64
!endif
; qBittorrent version
!define /ifndef QBT_VERSION "4.5.0"
Unicode true
ManifestDPIAware true
;Compress the header too
@ -8,14 +22,11 @@ SetCompressor /SOLID LZMA
@@ -8,14 +22,11 @@ SetCompressor /SOLID LZMA
SetCompressorDictSize 64
XPStyle on
;Uncomment when packaging 64bit qbittorrent
;!define APP64BIT
!include "MUI.nsh"
!include "UAC.nsh"
!include "FileFunc.nsh"
!include "WinVer.nsh"
!ifdef APP64BIT
!ifdef QBT_IS_X64
!include "x64.nsh"
!endif
@ -27,41 +38,46 @@ XPStyle on
@@ -27,41 +38,46 @@ XPStyle on
!define CSIDL_APPDATA '0x1A' ;Application Data path
!define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path
; Program specific
!define PROG_VERSION "4.5.0"
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
!define MUI_FINISHPAGE_RUN_TEXT $(launch_qbt)
!ifndef APP64BIT
; The name of the installer
Name "qBittorrent ${PROG_VERSION}"
; The file to write
OutFile "qbittorrent_${PROG_VERSION}_setup.exe"
!else
!ifndef QBT_IS_X64
; The name of the installer
Name "qBittorrent ${PROG_VERSION} x64 "
Name "qBittorrent ${QBT_VERSION}"
; The file to write
OutFile "qbittorrent_${PROG_VERSION}_x64_setup.exe"
!endif
OutFile "qbittorrent_${QBT_VERSION}_setup.exe"
!else ; QBT_IS_X64
!ifndef QBT_USES_QT6
; The name of the installer
Name "qBittorrent ${QBT_VERSION} x64"
; The file to write
OutFile "qbittorrent_${QBT_VERSION}_x64_setup.exe"
!else ; QBT_USES_QT6
; The name of the installer
Name "qBittorrent ${QBT_VERSION} (qt6) x64"
; The file to write
OutFile "qbittorrent_${QBT_VERSION}_qt6_x64_setup.exe"
!endif ; QBT_USES_QT6
!endif ; QBT_IS_X64
;Installer Version Information
VIAddVersionKey "ProductName" "qBittorrent"
VIAddVersionKey "CompanyName" "The qBittorrent project"
VIAddVersionKey "LegalCopyright" "Copyright ©2006-2022 The qBittorrent project"
VIAddVersionKey "FileDescription" "qBittorrent - A Bittorrent Client"
VIAddVersionKey "FileVersion" "${PROG_VERSION}"
VIAddVersionKey "FileVersion" "${QBT _VERSION}"
VIProductVersion "${PROG_VERSION}.0"
VIProductVersion "${QBT _VERSION}.0"
; The default installation directory. It changes depending if we install in the 64bit dir or not.
; A caveat of this is if a user has installed a 32bit version and then runs the 64bit installer
; (which in turn launches the 32bit uninstaller first) the value will still point to the 32bit location.
; The user has to manually uninstall the old version and THEN run the 64bit installer
!ifndef APP64BIT
!ifndef QBT_IS_X64
InstallDir $PROGRAMFILES32\qBittorrent
!else
InstallDir $PROGRAMFILES64\qBittorrent