mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-14 18:47:37 -07:00
NSIS: trim whitespaces
This commit is contained in:
parent
9eb01fbe4d
commit
d2e02605e9
2 changed files with 39 additions and 39 deletions
44
dist/windows/installer.nsi
vendored
44
dist/windows/installer.nsi
vendored
|
@ -18,14 +18,14 @@ SectionEnd
|
|||
Section $(inst_qbt_req) ;"qBittorrent (required)"
|
||||
|
||||
SectionIn RO
|
||||
|
||||
|
||||
; Set output path to the installation directory.
|
||||
SetOutPath $INSTDIR
|
||||
|
||||
|
||||
;Create 'translations' directory
|
||||
CreateDirectory $INSTDIR\translations
|
||||
|
||||
; Put file there
|
||||
|
||||
; Put file there
|
||||
File "qbittorrent.exe"
|
||||
File "qbittorrent.pdb"
|
||||
File "qt.conf"
|
||||
|
@ -74,10 +74,10 @@ Section $(inst_qbt_req) ;"qBittorrent (required)"
|
|||
File /oname=translations\qtbase_ru.qm "translations\qtbase_ru.qm"
|
||||
File /oname=translations\qtbase_sk.qm "translations\qtbase_sk.qm"
|
||||
File /oname=translations\qtbase_uk.qm "translations\qtbase_uk.qm"
|
||||
|
||||
; Write the installation path into the registry
|
||||
|
||||
; Write the installation path into the registry
|
||||
WriteRegStr HKLM "Software\qBittorrent" "InstallLocation" "$INSTDIR"
|
||||
|
||||
|
||||
; Write the uninstall keys for Windows
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "DisplayName" "qBittorrent ${PROG_VERSION}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "UninstallString" '"$INSTDIR\uninst.exe"'
|
||||
|
@ -87,53 +87,53 @@ Section $(inst_qbt_req) ;"qBittorrent (required)"
|
|||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "DisplayVersion" "${PROG_VERSION}"
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "NoModify" 1
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "NoRepair" 1
|
||||
WriteUninstaller "uninst.exe"
|
||||
WriteUninstaller "uninst.exe"
|
||||
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
|
||||
IntFmt $0 "0x%08X" $0
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "EstimatedSize" "$0"
|
||||
|
||||
|
||||
; qBittorrent ProgID
|
||||
WriteRegStr HKLM "Software\Classes\qBittorrent" "" "qBittorrent Torrent File"
|
||||
WriteRegStr HKLM "Software\Classes\qBittorrent" "FriendlyTypeName" "qBittorrent Torrent File"
|
||||
WriteRegStr HKLM "Software\Classes\qBittorrent\shell" "" "open"
|
||||
WriteRegStr HKLM "Software\Classes\qBittorrent\shell\open\command" "" '"$INSTDIR\qbittorrent.exe" "%1"'
|
||||
WriteRegStr HKLM "Software\Classes\qBittorrent\DefaultIcon" "" '"$INSTDIR\qbittorrent.exe",1'
|
||||
|
||||
|
||||
SectionEnd
|
||||
|
||||
; Optional section (can be disabled by the user)
|
||||
Section /o $(inst_dekstop) ;"Create Desktop Shortcut"
|
||||
|
||||
CreateShortCut "$DESKTOP\qBittorrent.lnk" "$INSTDIR\qbittorrent.exe"
|
||||
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section $(inst_startmenu) ;"Create Start Menu Shortcut"
|
||||
|
||||
CreateDirectory "$SMPROGRAMS\qBittorrent"
|
||||
CreateDirectory "$SMPROGRAMS\qBittorrent"
|
||||
CreateShortCut "$SMPROGRAMS\qBittorrent\qBittorrent.lnk" "$INSTDIR\qbittorrent.exe"
|
||||
CreateShortCut "$SMPROGRAMS\qBittorrent\Uninstall.lnk" "$INSTDIR\uninst.exe"
|
||||
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section $(inst_torrent) ;"Open .torrent files with qBittorrent"
|
||||
|
||||
ReadRegStr $0 HKLM "Software\Classes\.torrent" ""
|
||||
|
||||
|
||||
StrCmp $0 "qBittorrent" clear_errors 0
|
||||
;Check if empty string
|
||||
StrCmp $0 "" clear_errors 0
|
||||
;Write old value to OpenWithProgIds
|
||||
WriteRegStr HKLM "Software\Classes\.torrent\OpenWithProgIds" $0 ""
|
||||
|
||||
|
||||
clear_errors:
|
||||
ClearErrors
|
||||
|
||||
WriteRegStr HKLM "Software\Classes\.torrent" "" "qBittorrent"
|
||||
WriteRegStr HKLM "Software\Classes\.torrent" "Content Type" "application/x-bittorrent"
|
||||
|
||||
|
||||
!insertmacro UAC_AsUser_Call Function inst_torrent_user ${UAC_SYNCREGISTERS}|${UAC_SYNCOUTDIR}|${UAC_SYNCINSTDIR}
|
||||
|
||||
|
||||
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
|
||||
|
||||
SectionEnd
|
||||
|
@ -141,13 +141,13 @@ SectionEnd
|
|||
Function inst_torrent_user
|
||||
|
||||
ReadRegStr $0 HKCU "Software\Classes\.torrent" ""
|
||||
|
||||
|
||||
StrCmp $0 "qBittorrent" clear_errors 0
|
||||
;Check if empty string
|
||||
StrCmp $0 "" clear_errors 0
|
||||
;Write old value to OpenWithProgIds
|
||||
WriteRegStr HKCU "Software\Classes\.torrent\OpenWithProgIds" $0 ""
|
||||
|
||||
|
||||
clear_errors:
|
||||
ClearErrors
|
||||
|
||||
|
@ -164,7 +164,7 @@ Section $(inst_magnet) ;"Open magnet links with qBittorrent"
|
|||
WriteRegStr HKLM "Software\Classes\magnet\DefaultIcon" "" '"$INSTDIR\qbittorrent.exe",1'
|
||||
WriteRegStr HKLM "Software\Classes\magnet\shell" "" "open"
|
||||
WriteRegStr HKLM "Software\Classes\magnet\shell\open\command" "" '"$INSTDIR\qbittorrent.exe" "%1"'
|
||||
|
||||
|
||||
!insertmacro UAC_AsUser_Call Function inst_magnet_user ${UAC_SYNCREGISTERS}|${UAC_SYNCOUTDIR}|${UAC_SYNCINSTDIR}
|
||||
|
||||
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
|
||||
|
@ -185,8 +185,8 @@ FunctionEnd
|
|||
Section $(inst_firewall)
|
||||
|
||||
DetailPrint $(inst_firewallinfo)
|
||||
nsisFirewallW::AddAuthorizedApplication "$INSTDIR\qbittorrent.exe" "qBittorrent"
|
||||
|
||||
nsisFirewallW::AddAuthorizedApplication "$INSTDIR\qbittorrent.exe" "qBittorrent"
|
||||
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue