Browse Source

Support adding of windows firewall rule.

adaptive-webui-19844
sledgehammer999 12 years ago
parent
commit
feadedf8ef
  1. 4
      src/windows/installer-translations/english.nsi
  2. 6
      src/windows/installer.nsi
  3. 6
      src/windows/uninstaller.nsi

4
src/windows/installer-translations/english.nsi

@ -10,6 +10,8 @@ LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut" @@ -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" @@ -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"

6
src/windows/installer.nsi

@ -92,6 +92,12 @@ Section $(inst_magnet) ;"Open magnet links with qBittorrent" @@ -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

6
src/windows/uninstaller.nsi

@ -62,6 +62,12 @@ Section "un.$(remove_registry)" ;"un.Remove registry keys" @@ -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…
Cancel
Save