aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Tilloy <olivier@tilloy.net>2010-03-23 10:56:02 +0100
committerOlivier Tilloy <olivier@tilloy.net>2010-03-23 10:56:02 +0100
commitf07321d174660b322bc1881abf92c9fa3f8410ca (patch)
tree8713c1988af2d2fe878efec0a6f69be936dd518d
parentd8d0a7fc3437546fb958783e81cf4ce5554f1572 (diff)
downloadpyexiv2-f07321d174660b322bc1881abf92c9fa3f8410ca.tar.gz
Python version as a define.
-rw-r--r--win32-installer.nsi8
1 files changed, 5 insertions, 3 deletions
diff --git a/win32-installer.nsi b/win32-installer.nsi
index bec7e82..8f582d0 100644
--- a/win32-installer.nsi
+++ b/win32-installer.nsi
@@ -20,7 +20,9 @@ Page custom InstallationOptions InstallationOptionsLeave
!insertmacro MUI_LANGUAGE "English"
-!define PYTHON_KEY "Software\Python\PythonCore\2.6\InstallPath"
+!define PYTHON_MAJOR "2"
+!define PYTHON_MINOR "6"
+!define PYTHON_KEY "Software\Python\PythonCore\${PYTHON_MAJOR}.${PYTHON_MINOR}\InstallPath"
!define PYEXIV2_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\pyexiv2-0.2"
Var python_install_path
@@ -36,12 +38,12 @@ Function .onInit
ReadRegStr $python_install_path SHCTX ${PYTHON_KEY} ""
StrCmp $python_install_path "" 0 Continue
- MessageBox MB_OK|MB_ICONSTOP "Unable to locate Python 2.6."
+ MessageBox MB_OK|MB_ICONSTOP "Unable to locate Python ${PYTHON_MAJOR}.${PYTHON_MINOR}."
Quit
Continue:
StrCpy $system_wide "$python_install_pathLib\site-packages"
- StrCpy $user_site "$APPDATA\Python\Python26\site-packages"
+ StrCpy $user_site "$APPDATA\Python\Python${PYTHON_MAJOR}${PYTHON_MINOR}\site-packages"
FunctionEnd
Function un.onInit