summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Resch <andrewresch@gmail.com>2009-11-25 03:09:42 +0000
committerAndrew Resch <andrewresch@gmail.com>2009-11-25 03:09:42 +0000
commitf858e271ad71eaef612e2e1333ffd00b0b82b9b6 (patch)
tree5071ff2038cbbf9e5e4a2fe42138dc222c397cfd
parent708f0521532a786b2b43bd150223498af7a9c656 (diff)
downloaddeluge-f858e271ad71eaef612e2e1333ffd00b0b82b9b6.tar.gz
deluge-f858e271ad71eaef612e2e1333ffd00b0b82b9b6.tar.bz2
deluge-f858e271ad71eaef612e2e1333ffd00b0b82b9b6.zip
Add magnet link association to the installer
-rw-r--r--win32/deluge-win32-installer.nsi34
1 files changed, 23 insertions, 11 deletions
diff --git a/win32/deluge-win32-installer.nsi b/win32/deluge-win32-installer.nsi
index a2079a3ba..fb2194d3e 100644
--- a/win32/deluge-win32-installer.nsi
+++ b/win32/deluge-win32-installer.nsi
@@ -213,8 +213,18 @@ Section "Create .torrent file association for Deluge" Section2
WriteRegStr HKCR "Deluge\shell\open\command" "" '"$INSTDIR\deluge.cmd" "%1"'
SectionEnd
-# Install GTK+ 2.16
-Section "GTK+ 2.16 runtime" Section3
+
+# Create magnet uri association
+Section "Create magnet uri link association for Deluge" Section3
+ DeleteRegKey HKCR "magnet"
+ WriteRegStr HKCR "magnet" "" "URL:magnet protocol"
+ WriteRegStr HKCR "magnet" "URL Protocol" ""
+
+ WriteRegStr HKCR "magnet\shell\open\command" "" '"$INSTDIR\deluge.cmd" "%1"'
+SectionEnd
+
+# Install GTK+ 2.16
+Section "GTK+ 2.16 runtime" Section4
# Check whether GTK+ 2.12 is installed on the system; if so skip this section
# The criterion is whether the registry key HKLM\SOFTWARE\GTK\2.0\Version exists
ReadRegStr $0 HKLM "SOFTWARE\GTK\2.0" "Version"
@@ -261,15 +271,17 @@ Section "GTK+ 2.16 runtime" Section3
GTK_install_exit:
SectionEnd
-LangString DESC_Section1 ${LANG_ENGLISH} "Install Deluge Bittorrent client."
-LangString DESC_Section2 ${LANG_ENGLISH} "Select this option unless you have another torrent client which you want to use for opening .torrent files."
-LangString DESC_Section3 ${LANG_ENGLISH} "Download and install the GTK+ 2.16 runtime. \
- This is skipped automatically if GTK+ is already installed."
-
-!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
- !insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
- !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
- !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section3)
+LangString DESC_Section1 ${LANG_ENGLISH} "Install Deluge Bittorrent client."
+LangString DESC_Section2 ${LANG_ENGLISH} "Select this option unless you have another torrent client which you want to use for opening .torrent files."
+LangString DESC_Section3 ${LANG_ENGLISH} "Select this option to have Deluge handle magnet links."
+LangString DESC_Section4 ${LANG_ENGLISH} "Download and install the GTK+ 2.16 runtime. \
+ This is skipped automatically if GTK+ is already installed."
+
+!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
+ !insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
+ !insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
+ !insertmacro MUI_DESCRIPTION_TEXT ${Section3} $(DESC_Section3)
+ !insertmacro MUI_DESCRIPTION_TEXT ${Section4} $(DESC_Section4)
!insertmacro MUI_FUNCTION_DESCRIPTION_END