mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-20 19:44:52 +00:00
Moved functions to bottom so that they could include defines
Installer now automatically selects python if not installed
This commit is contained in:
parent
16c8769ab9
commit
270bb4ae1b
1 changed files with 21 additions and 19 deletions
|
@ -107,25 +107,6 @@
|
|||
|
||||
var PYTHONDIR
|
||||
|
||||
; Functions
|
||||
|
||||
Function autodetect_python
|
||||
Pop $0
|
||||
ReadRegStr "" HKLM "SOFTWARE\Python\PythonCore\${PYTHON_VERSION}\InstallPath" ""
|
||||
IfErrors 0 +2
|
||||
SectionSetInstTypes $0 3
|
||||
FunctionEnd
|
||||
|
||||
Function set_python_dir
|
||||
ReadRegStr $PYTHONDIR HKLM "SOFTWARE\Python\PythonCore\${PYTHON_VERSION}\InstallPath" ""
|
||||
IfErrors 0 +2
|
||||
StrCpy $PYTHONDIR "$INSTDIR\Python"
|
||||
FunctionEnd
|
||||
|
||||
Function .onInit
|
||||
Call set_python_dir
|
||||
FunctionEnd
|
||||
|
||||
; General Settings
|
||||
|
||||
; Version
|
||||
|
@ -376,3 +357,24 @@ SectionGroupEnd
|
|||
!insertmacro MUI_DESCRIPTION_TEXT ${deluge} $(DESC_deluge)
|
||||
!insertmacro MUI_DESCRIPTION_TEXT ${python} $(DESC_python)
|
||||
!insertmacro MUI_FUNCTION_DESCRIPTION_END
|
||||
|
||||
; Functions
|
||||
|
||||
Function autodetect_python
|
||||
Pop $0
|
||||
ReadRegStr "" HKLM "SOFTWARE\Python\PythonCore\${PYTHON_VERSION}\InstallPath" ""
|
||||
IfErrors 0 +3
|
||||
SectionSetInstTypes $0 3
|
||||
SetCurInstType 0
|
||||
FunctionEnd
|
||||
|
||||
Function set_python_dir
|
||||
ReadRegStr $PYTHONDIR HKLM "SOFTWARE\Python\PythonCore\${PYTHON_VERSION}\InstallPath" ""
|
||||
IfErrors 0 +2
|
||||
StrCpy $PYTHONDIR "$INSTDIR\Python"
|
||||
FunctionEnd
|
||||
|
||||
Function .onInit
|
||||
Call set_python_dir
|
||||
${autodetect} python
|
||||
FunctionEnd
|
||||
|
|
Loading…
Add table
Reference in a new issue