mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 19:40:18 -07:00
Truly sync the changes in the file assocations code/installer with master.
This commit is contained in:
parent
c78ad12144
commit
0bd4308d0f
3 changed files with 24 additions and 63 deletions
|
@ -60,21 +60,28 @@ Section $(inst_qbt_req) ;"qBittorrent (required)"
|
|||
File /oname=translations\qt_zh_TW.qm "translations\qt_zh_TW.qm"
|
||||
|
||||
; Write the installation path into the registry
|
||||
WriteRegStr HKLM "Software\qbittorrent" "InstallLocation" "$INSTDIR"
|
||||
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"'
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qbittorrent" "DisplayIcon" '"$INSTDIR\qbittorrent.exe",0'
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qbittorrent" "Publisher" "The qBittorrent project"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qbittorrent" "URLInfoAbout" "http://www.qbittorrent.org"
|
||||
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
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "DisplayName" "qBittorrent ${PROG_VERSION}"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "UninstallString" '"$INSTDIR\uninst.exe"'
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "DisplayIcon" '"$INSTDIR\qbittorrent.exe",0'
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "Publisher" "The qBittorrent project"
|
||||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent" "URLInfoAbout" "http://www.qbittorrent.org"
|
||||
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"
|
||||
${GetSize} "$INSTDIR" "/S=0K" $0 $1 $2
|
||||
IntFmt $0 "0x%08X" $0
|
||||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qbittorrent" "EstimatedSize" "$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
|
||||
|
||||
|
@ -93,32 +100,6 @@ Section $(inst_startmenu) ;"Create Start Menu Shortcut"
|
|||
|
||||
SectionEnd
|
||||
|
||||
Section $(inst_torrent) ;"Open .torrent files with qBittorrent"
|
||||
|
||||
WriteRegStr HKEY_CLASSES_ROOT ".torrent" "" "qBittorrent"
|
||||
WriteRegStr HKEY_CLASSES_ROOT ".torrent" "Content Type" "application/x-bittorrent"
|
||||
WriteRegStr HKEY_CLASSES_ROOT "qBittorrent\shell" "" "open"
|
||||
WriteRegStr HKEY_CLASSES_ROOT "qBittorrent\shell\open\command" "" '"$INSTDIR\qbittorrent.exe" "%1"'
|
||||
WriteRegStr HKEY_CLASSES_ROOT "qBittorrent\Content Type" "" "application/x-bittorrent"
|
||||
WriteRegStr HKEY_CLASSES_ROOT "qBittorrent\DefaultIcon" "" '"$INSTDIR\qbittorrent.exe",1'
|
||||
|
||||
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section $(inst_magnet) ;"Open magnet links with qBittorrent"
|
||||
|
||||
WriteRegStr HKEY_CLASSES_ROOT "Magnet" "" "Magnet URI"
|
||||
WriteRegStr HKEY_CLASSES_ROOT "Magnet" "Content Type" "application/x-magnet"
|
||||
WriteRegStr HKEY_CLASSES_ROOT "Magnet" "URL Protocol" ""
|
||||
WriteRegStr HKEY_CLASSES_ROOT "Magnet\DefaultIcon" "" '"$INSTDIR\qbittorrent.exe",1'
|
||||
WriteRegStr HKEY_CLASSES_ROOT "Magnet\shell" "" "open"
|
||||
WriteRegStr HKEY_CLASSES_ROOT "Magnet\shell\open\command" "" '"$INSTDIR\qbittorrent.exe" "%1"'
|
||||
|
||||
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section $(inst_torrent) ;"Open .torrent files with qBittorrent"
|
||||
|
||||
ReadRegStr $0 HKLM "Software\Classes\.torrent" ""
|
||||
|
|
|
@ -19,7 +19,7 @@ XPStyle on
|
|||
!define CSIDL_APPDATA '0x1A' ;Application Data path
|
||||
!define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path
|
||||
|
||||
!define PROG_VERSION "3.1.9.2"
|
||||
!define PROG_VERSION "3.2.0"
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
|
||||
!define MUI_FINISHPAGE_RUN_TEXT $(launch_qbt)
|
||||
|
@ -37,7 +37,7 @@ VIAddVersionKey "LegalCopyright" "Copyright ©2006-2014 The qBittorrent project"
|
|||
VIAddVersionKey "FileDescription" "qBittorrent - A Bittorrent Client"
|
||||
VIAddVersionKey "FileVersion" "${PROG_VERSION}"
|
||||
|
||||
VIProductVersion "${PROG_VERSION}"
|
||||
VIProductVersion "${PROG_VERSION}.0"
|
||||
|
||||
; The default installation directory
|
||||
InstallDir $PROGRAMFILES\qBittorrent
|
||||
|
|
|
@ -85,34 +85,14 @@ Function un.remove_associations_user
|
|||
magnet_end:
|
||||
FunctionEnd
|
||||
|
||||
SectionIn RO
|
||||
ReadRegStr $0 HKEY_CLASSES_ROOT ".torrent" ""
|
||||
StrCmp $0 "qBittorrent" torrent 0
|
||||
DetailPrint "$(uninst_tor_warn) $0"
|
||||
Goto qbt
|
||||
torrent:
|
||||
DeleteRegKey HKEY_CLASSES_ROOT ".torrent"
|
||||
|
||||
qbt:
|
||||
DeleteRegKey HKEY_CLASSES_ROOT "qBittorrent"
|
||||
|
||||
ReadRegStr $0 HKEY_CLASSES_ROOT "Magnet\shell\open\command" ""
|
||||
StrCmp $0 '"$INSTDIR\qbittorrent.exe" "%1"' magnet 0
|
||||
DetailPrint "$(uninst_mag_warn) $0"
|
||||
Goto done
|
||||
|
||||
magnet:
|
||||
DeleteRegKey HKEY_CLASSES_ROOT "Magnet"
|
||||
|
||||
done:
|
||||
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
|
||||
SectionEnd
|
||||
|
||||
Section "un.$(remove_registry)" ;"un.Remove registry keys"
|
||||
SectionIn RO
|
||||
; Remove registry keys
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qbittorrent"
|
||||
DeleteRegKey HKLM "Software\qbittorrent"
|
||||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\qBittorrent"
|
||||
DeleteRegKey HKLM "Software\qBittorrent"
|
||||
DeleteRegKey HKLM "Software\Classes\qBittorrent"
|
||||
|
||||
System::Call 'Shell32::SHChangeNotify(i ${SHCNE_ASSOCCHANGED}, i ${SHCNF_IDLIST}, i 0, i 0)'
|
||||
SectionEnd
|
||||
|
||||
Section "un.$(remove_firewall)" ;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue