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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2939 - (show annotations) (download)
Wed Jun 3 22:05:25 2015 UTC (7 years, 1 month ago) by adrian
File size: 1886 byte(s)
Removed unecessary packages from installer
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-0.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 ;--------------------------------------------------------------------
46 ; Are necessary Python packages and pieces available?
47
48 Function DetectPyCairo
49 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gnome\libcairo-gobject-2.dll"
50 StrCpy $HAVE_PYCAIRO "OK"
51 ${Else}
52 ;MessageBox MB_OK "No PyCairo in $PYPATH"
53 StrCpy $HAVE_PYCAIRO "NOK"
54 ${EndIf}
55 FunctionEnd
56
57 Function DetectPyGObject
58 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gnome\libgobject-2.0-0.dll"
59 StrCpy $HAVE_PYGOBJECT "OK"
60 ${Else}
61 ;MessageBox MB_OK "No PyGObject in $PYPATH"
62 StrCpy $HAVE_PYGOBJECT "NOK"
63 ${EndIf}
64 FunctionEnd

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