/[ascend]/trunk/nsis/detect.nsi
ViewVC logotype

Contents of /trunk/nsis/detect.nsi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2605 - (show annotations) (download)
Tue Apr 24 06:14:23 2012 UTC (12 years, 3 months ago) by jpye
File size: 2448 byte(s)
Working on re-adding support for dependency download in installer (incl 64-bit).
1 ;---------------------------------------------------------------------
2 ; ROUTINES TO DETECT PYTHON, PYGTK, PYGOBJECT, PYCAIRO and TCL/TK.
3
4 ;---------------------------------------------------------------------
5 ; Look for Python in HKLM and HKCU
6
7 Function DetectPython
8 !ifdef INST64
9 SetRegView 64
10 !endif
11 ReadRegStr $R6 HKLM "SOFTWARE\Python\PythonCore\${PYVERSION}\InstallPath" ""
12 ${If} $R6 == ''
13 ;MessageBox MB_OK "No Python in HKLM"
14 ReadRegStr $R6 HKCU "SOFTWARE\Python\PythonCore\${PYVERSION}\InstallPath" ""
15 ${If} $R6 == ''
16 ;MessageBox MB_OK "No Python in HKCU"
17 StrCpy $HAVE_PYTHON "NOK"
18 StrCpy $PYPATH "No registry key found"
19 Return
20 ${EndIf}
21 ${EndIf}
22
23 ${If} ${FileExists} "$R6\python.exe"
24 StrCpy $PYPATH "$R6"
25 StrCpy $HAVE_PYTHON "OK"
26 ${Else}
27 ;MessageBox MB_OK "No python.exe in $R6"
28 StrCpy $PYPATH "No python.exe found"
29 StrCpy $HAVE_PYTHON "NOK"
30 ${EndIf}
31 FunctionEnd
32
33 ;--------------------------------------------------------------------
34 ; Prefer the current user's installation of GTK, fall back to the local machine
35
36 Function DetectGTK
37 !ifdef INST64
38 ${If} ${RunningX64}
39 !endif
40 ${If} ${FileExists} "${GTKSEARCHPATH}\manifest\${GTK_MFT}"
41 MessageBox MB_OK "GTK OK in ${GTKSEARCHPATH}\manifest"
42 StrCpy $GTKPATH "${GTKSEARCHPATH}\bin"
43 StrCpy $HAVE_GTK "OK"
44 Return
45 ${EndIf}
46 !ifdef INST64
47 ${EndIf}
48 !endif
49 MessageBox MB_OK "Expected to find ${GTK_MFT} in ${GTKSEARCHPATH}\manifest"
50 StrCpy $GTKPATH "gtk+-bundle manifest not found in ${GTKSEARCHPATH}\manifest"
51 StrCpy $HAVE_GTK "NOK"
52 FunctionEnd
53
54 ;--------------------------------------------------------------------
55 ; Are necessary PyGTK bits and pieces available?
56
57 Function DetectPyGTK
58 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\gtk\__init__.py"
59 StrCpy $HAVE_PYGTK "OK"
60 ${Else}
61 MessageBox MB_OK "No PyGTK in $PYPATH"
62 StrCpy $HAVE_PYGTK "NOK"
63 ${EndIf}
64 FunctionEnd
65
66 Function DetectPyCairo
67 ${If} ${FileExists} "$PYPATH\Lib\site-packages\cairo\__init__.py"
68 StrCpy $HAVE_PYCAIRO "OK"
69 ${Else}
70 MessageBox MB_OK "No PyCairo in $PYPATH"
71 StrCpy $HAVE_PYCAIRO "NOK"
72 ${EndIf}
73 FunctionEnd
74
75 Function DetectPyGObject
76 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\gobject\__init__.py"
77 StrCpy $HAVE_PYGOBJECT "OK"
78 ${Else}
79 MessageBox MB_OK "No PyGObject in $PYPATH"
80 StrCpy $HAVE_PYGOBJECT "NOK"
81 ${EndIf}
82 FunctionEnd

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22