From 16c8769ab9ea7148ab36ea93dc4deacb748f65ec Mon Sep 17 00:00:00 2001 From: John Garland Date: Wed, 25 Feb 2009 11:27:09 +0000 Subject: [PATCH] Second attempt at autodetect install --- win32/deluge.nsi | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/win32/deluge.nsi b/win32/deluge.nsi index 7132b137d..ea330d90e 100644 --- a/win32/deluge.nsi +++ b/win32/deluge.nsi @@ -13,9 +13,8 @@ !macroend !macro autodetect component + Push ${${component}} Call autodetect_${component} - Pop $0 - SectionIn $0 !macroend !macro download url filename @@ -111,11 +110,10 @@ ; Functions Function autodetect_python - StrCpy $0 "1 2" - ReadRegStr $1 HKLM "SOFTWARE\Python\PythonCore\${PYTHON_VERSION}\InstallPath" "" + Pop $0 + ReadRegStr "" HKLM "SOFTWARE\Python\PythonCore\${PYTHON_VERSION}\InstallPath" "" IfErrors 0 +2 - StrCpy $0 "2" - Push $0 + SectionSetInstTypes $0 3 FunctionEnd Function set_python_dir