First attempt at auto-detect install type
This commit is contained in:
parent
538643b5ba
commit
2efc6161f2
@ -12,6 +12,12 @@
|
|||||||
!define ${installer}_URL "http://download.deluge-torrent.org/windows/deps/${${installer}}"
|
!define ${installer}_URL "http://download.deluge-torrent.org/windows/deps/${${installer}}"
|
||||||
!macroend
|
!macroend
|
||||||
|
|
||||||
|
!macro autodetect component
|
||||||
|
Call autodetect_${component}
|
||||||
|
Pop $0
|
||||||
|
SectionIn $0
|
||||||
|
!macroend
|
||||||
|
|
||||||
!macro download url filename
|
!macro download url filename
|
||||||
DetailPrint "Downloading: ${url}"
|
DetailPrint "Downloading: ${url}"
|
||||||
NSISdl::download ${url} ${filename}
|
NSISdl::download ${url} ${filename}
|
||||||
@ -45,6 +51,7 @@
|
|||||||
|
|
||||||
; Redefine macros/functions
|
; Redefine macros/functions
|
||||||
!define create_url "!insertmacro create_url"
|
!define create_url "!insertmacro create_url"
|
||||||
|
!define autodetect "!insertmacro autodetect"
|
||||||
!define download "!insertmacro download"
|
!define download "!insertmacro download"
|
||||||
!define install_NSIS "!insertmacro install_NSIS"
|
!define install_NSIS "!insertmacro install_NSIS"
|
||||||
!define install_MSI "!insertmacro install_MSI"
|
!define install_MSI "!insertmacro install_MSI"
|
||||||
@ -103,6 +110,14 @@
|
|||||||
|
|
||||||
; Functions
|
; Functions
|
||||||
|
|
||||||
|
Function autodetect_python
|
||||||
|
StrCpy $0 "1 2"
|
||||||
|
ReadRegStr $1 HKLM "SOFTWARE\Python\PythonCore\${PYTHON_VERSION}\InstallPath" ""
|
||||||
|
IfErrors 0 +2
|
||||||
|
StrCpy $0 "2"
|
||||||
|
Push $0
|
||||||
|
FunctionEnd
|
||||||
|
|
||||||
Function set_python_dir
|
Function set_python_dir
|
||||||
ReadRegStr $PYTHONDIR HKLM "SOFTWARE\Python\PythonCore\${PYTHON_VERSION}\InstallPath" ""
|
ReadRegStr $PYTHONDIR HKLM "SOFTWARE\Python\PythonCore\${PYTHON_VERSION}\InstallPath" ""
|
||||||
IfErrors 0 +2
|
IfErrors 0 +2
|
||||||
@ -132,6 +147,7 @@ FunctionEnd
|
|||||||
BrandingText "Deluge Windows Installer v${SCRIPT_VERSION}"
|
BrandingText "Deluge Windows Installer v${SCRIPT_VERSION}"
|
||||||
|
|
||||||
!ifndef NOINSTTYPES
|
!ifndef NOINSTTYPES
|
||||||
|
InstType "Auto-detect"
|
||||||
InstType "Full"
|
InstType "Full"
|
||||||
InstType "Upgrade"
|
InstType "Upgrade"
|
||||||
!endif
|
!endif
|
||||||
@ -183,7 +199,7 @@ SectionGroup /e "Dependencies" dependencies
|
|||||||
|
|
||||||
Section "Python" python
|
Section "Python" python
|
||||||
|
|
||||||
SectionIn 1
|
${autodetect} python
|
||||||
|
|
||||||
${install_MSI} PYTHON_INSTALLER "$INSTDIR\Python"
|
${install_MSI} PYTHON_INSTALLER "$INSTDIR\Python"
|
||||||
|
|
||||||
@ -191,7 +207,7 @@ SectionGroup /e "Dependencies" dependencies
|
|||||||
|
|
||||||
Section "Python Win32 Extensions" pywin32
|
Section "Python Win32 Extensions" pywin32
|
||||||
|
|
||||||
SectionIn 1
|
SectionIn 2
|
||||||
|
|
||||||
${install_ZIP} PYWIN32_INSTALLER "$INSTDIR\Python\site-packages"
|
${install_ZIP} PYWIN32_INSTALLER "$INSTDIR\Python\site-packages"
|
||||||
|
|
||||||
@ -199,7 +215,7 @@ SectionGroup /e "Dependencies" dependencies
|
|||||||
|
|
||||||
Section "GTK+ Runtime" gtk+
|
Section "GTK+ Runtime" gtk+
|
||||||
|
|
||||||
SectionIn 1
|
SectionIn 2
|
||||||
|
|
||||||
${install_NSIS} GTK_INSTALLER "$INSTDIR\GTK"
|
${install_NSIS} GTK_INSTALLER "$INSTDIR\GTK"
|
||||||
|
|
||||||
@ -207,7 +223,7 @@ SectionGroup /e "Dependencies" dependencies
|
|||||||
|
|
||||||
Section "PyGTK" pygtk
|
Section "PyGTK" pygtk
|
||||||
|
|
||||||
SectionIn 1
|
SectionIn 2
|
||||||
|
|
||||||
${install_ZIP} PYGTK_INSTALLER "$INSTDIR\Python\site-packages"
|
${install_ZIP} PYGTK_INSTALLER "$INSTDIR\Python\site-packages"
|
||||||
|
|
||||||
@ -215,7 +231,7 @@ SectionGroup /e "Dependencies" dependencies
|
|||||||
|
|
||||||
Section "PyCairo" pycairo
|
Section "PyCairo" pycairo
|
||||||
|
|
||||||
SectionIn 1
|
SectionIn 2
|
||||||
|
|
||||||
${install_ZIP} PYCAIRO_INSTALLER "$INSTDIR\Python\site-packages"
|
${install_ZIP} PYCAIRO_INSTALLER "$INSTDIR\Python\site-packages"
|
||||||
|
|
||||||
@ -223,7 +239,7 @@ SectionGroup /e "Dependencies" dependencies
|
|||||||
|
|
||||||
Section "PyGame" pygame
|
Section "PyGame" pygame
|
||||||
|
|
||||||
SectionIn 1
|
SectionIn 2
|
||||||
|
|
||||||
${install_MSI} PYGAME_INSTALLER "$INSTDIR\Python\site-packages"
|
${install_MSI} PYGAME_INSTALLER "$INSTDIR\Python\site-packages"
|
||||||
|
|
||||||
@ -231,7 +247,7 @@ SectionGroup /e "Dependencies" dependencies
|
|||||||
|
|
||||||
Section "PyGObject" pygobject
|
Section "PyGObject" pygobject
|
||||||
|
|
||||||
SectionIn 1
|
SectionIn 2
|
||||||
|
|
||||||
${install_ZIP} PYGOBJECT_INSTALLER "$INSTDIR\Python\site-packages"
|
${install_ZIP} PYGOBJECT_INSTALLER "$INSTDIR\Python\site-packages"
|
||||||
|
|
||||||
@ -239,7 +255,7 @@ SectionGroup /e "Dependencies" dependencies
|
|||||||
|
|
||||||
Section "PyOpenSSL" pyopenssl
|
Section "PyOpenSSL" pyopenssl
|
||||||
|
|
||||||
SectionIn 1
|
SectionIn 2
|
||||||
|
|
||||||
${install_MSI} PYOPENSSL_INSTALLER "$INSTDIR\Python\site-packages"
|
${install_MSI} PYOPENSSL_INSTALLER "$INSTDIR\Python\site-packages"
|
||||||
|
|
||||||
@ -247,7 +263,7 @@ SectionGroup /e "Dependencies" dependencies
|
|||||||
|
|
||||||
Section "PyXdg" pyxdg
|
Section "PyXdg" pyxdg
|
||||||
|
|
||||||
SectionIn 1
|
SectionIn 2
|
||||||
|
|
||||||
${install_MSI} PYXDG_INSTALLER "$INSTDIR\Python\site-packages"
|
${install_MSI} PYXDG_INSTALLER "$INSTDIR\Python\site-packages"
|
||||||
|
|
||||||
@ -255,7 +271,7 @@ SectionGroup /e "Dependencies" dependencies
|
|||||||
|
|
||||||
Section "Setuptools" setuptools
|
Section "Setuptools" setuptools
|
||||||
|
|
||||||
SectionIn 1
|
SectionIn 2
|
||||||
|
|
||||||
${install_ZIP} SETUPTOOLS_INSTALLER "$INSTDIR\Python\site-packages"
|
${install_ZIP} SETUPTOOLS_INSTALLER "$INSTDIR\Python\site-packages"
|
||||||
|
|
||||||
@ -263,7 +279,7 @@ SectionGroup /e "Dependencies" dependencies
|
|||||||
|
|
||||||
Section "libtorrent" libtorrent
|
Section "libtorrent" libtorrent
|
||||||
|
|
||||||
SectionIn 1
|
SectionIn 2
|
||||||
|
|
||||||
${install_MSI} LIBTORRENT_INSTALLER "$INSTDIR\Python\site-packages"
|
${install_MSI} LIBTORRENT_INSTALLER "$INSTDIR\Python\site-packages"
|
||||||
${install_ZIP} LIBTORRENT_DLL_ZIP "$SYSDIR"
|
${install_ZIP} LIBTORRENT_DLL_ZIP "$SYSDIR"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user