mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2024-10-22 10:46:04 +03:00
Support adding of windows firewall rule.
This commit is contained in:
parent
422d0c9210
commit
735247f41f
3 changed files with 16 additions and 0 deletions
|
@ -10,6 +10,8 @@ LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
|||
LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
|
||||
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
|
||||
LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
|
||||
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
|
||||
|
||||
|
||||
;------------------------------------
|
||||
|
@ -25,3 +27,5 @@ LangString remove_associations ${LANG_ENGLISH} "Remove file associations"
|
|||
LangString remove_registry ${LANG_ENGLISH} "Remove registry keys"
|
||||
;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
|
||||
LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
|
||||
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
|
||||
LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
|
||||
|
|
|
@ -92,6 +92,12 @@ Section $(inst_magnet) ;"Open magnet links with qBittorrent"
|
|||
|
||||
SectionEnd
|
||||
|
||||
Section $(inst_firewall)
|
||||
|
||||
nsisFirewall::AddAuthorizedApplication "$INSTDIR\qbittorrent.exe" "qBittorrent"
|
||||
|
||||
SectionEnd
|
||||
|
||||
;--------------------------------
|
||||
|
||||
Function .onInit
|
||||
|
|
|
@ -62,6 +62,12 @@ Section "un.$(remove_registry)" ;"un.Remove registry keys"
|
|||
DeleteRegKey HKLM "Software\qbittorrent"
|
||||
SectionEnd
|
||||
|
||||
Section "un.$(remove_firewall)" ;
|
||||
|
||||
nsisFirewall::RemoveAuthorizedApplication "$INSTDIR\qbittorrent.exe"
|
||||
|
||||
SectionEnd
|
||||
|
||||
Section /o "un.$(remove_conf)" ;"un.Remove configuration files"
|
||||
System::Call 'shell32::SHGetSpecialFolderPath(i $HWNDPARENT, t .r1, i ${CSIDL_APPDATA}, i0)i.r0'
|
||||
RMDir /r "$1\qBittorrent"
|
||||
|
|
Loading…
Reference in a new issue