Auto-detect if python is installed on startup

This commit is contained in:
John Garland 2009-02-25 07:58:50 +00:00
parent 29c98e374c
commit c7a67f5c53

View file

@ -28,7 +28,7 @@
!macro install_MSI installer_name install_dir
${download} "${${installer_name}_URL}" "$TEMP\${${installer_name}}"
ExecWait 'msiexec /qn /i "$TEMP\${${installer_name}}" TARGETDIR="${install_dir}'
ExecWait 'msiexec /qn /i "$TEMP\${${installer_name}}"'
delete "$TEMP\${${installer_name}}"
!macroend
@ -96,6 +96,19 @@
${create_url} LIBTORRENT_INSTALLER
${create_url} LIBTORRENT_DLL_ZIP
; Variables
var PYTHONDIR
; Functions
Function .onInit
ReadRegStr $PYTHONDIR HKLM "SOFTWARE\Python\PythonCore\${PYTHON_VERSION}\InstallPath" ""
IfErrors 0 +2
StrCpy $PYTHONDIR "$INSTDIR\Python"
FunctionEnd
; General Settings
; Version
@ -337,8 +350,8 @@ SectionGroupEnd
; Descriptions
; Language strings
LangString DESC_deluge ${LANG_ENGLISH} "Deluge 1.1.3"
LangString DESC_python ${LANG_ENGLISH} "Python 2.5.4"
LangString DESC_deluge ${LANG_ENGLISH} "Deluge ${DELUGE_VERSION}"
LangString DESC_python ${LANG_ENGLISH} "Python ${PYTHON_VERSION}"
; Assign language strings to sections
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN