/[ascend]/branches/adrian/nsis/detect.nsi
ViewVC logotype

Contents of /branches/adrian/nsis/detect.nsi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2944 - (show annotations) (download)
Thu Jun 4 20:28:52 2015 UTC (7 years ago) by adrian
File size: 2147 byte(s)
Added testing gtksourceview
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 ; Is GTK3 available?
35
36 Function DetectGTK
37 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gnome\libgtk-3*.dll"
38 StrCpy $HAVE_GTK "OK"
39 ${Else}
40 ;MessageBox MB_OK "No PyCairo in $PYPATH"
41 StrCpy $HAVE_GTK "NOK"
42 ${EndIf}
43 FunctionEnd
44
45 Function DetectGTKSourceView
46 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gnome\libgtksourceview-3*.dll"
47 StrCpy $HAVE_GTKSOURCEVIEW "OK"
48 ${Else}
49 ;MessageBox MB_OK "No PyCairo in $PYPATH"
50 StrCpy $HAVE_GTKSOURCEVIEW "NOK"
51 ${EndIf}
52 FunctionEnd
53
54 ;--------------------------------------------------------------------
55 ; Are necessary Python packages and pieces available?
56
57 Function DetectPyCairo
58 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gnome\libcairo-gobject-2*.dll"
59 StrCpy $HAVE_PYCAIRO "OK"
60 ${Else}
61 ;MessageBox MB_OK "No PyCairo in $PYPATH"
62 StrCpy $HAVE_PYCAIRO "NOK"
63 ${EndIf}
64 FunctionEnd
65
66 Function DetectPyGObject
67 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gnome\libgobject-2*.dll"
68 StrCpy $HAVE_PYGOBJECT "OK"
69 ${Else}
70 ;MessageBox MB_OK "No PyGObject in $PYPATH"
71 StrCpy $HAVE_PYGOBJECT "NOK"
72 ${EndIf}
73 FunctionEnd

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