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

Contents of /trunk/nsis/detect.nsi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2492 - (show annotations) (download)
Sat Aug 13 04:05:13 2011 UTC (10 years, 10 months ago) by jpye
File size: 3284 byte(s)
Remove TCL GUI from Windows installer
1 ;---------------------------------------------------------------------
2 ; ROUTINES TO DETECT PYTHON, PYGTK, PYGOBJECT, PYCAIRO and TCL/TK.
3
4 ;---------------------------------------------------------------------
5 ; Look for Python in HKLM. No attempt to detect it in HKCU at this stage.
6
7 Function DetectPython
8 ReadRegStr $R6 HKCU "SOFTWARE\Python\PythonCore\${PYVERSION}\InstallPath" ""
9 ${If} $R6 == ''
10 ReadRegStr $R6 HKLM "SOFTWARE\Python\PythonCore\${PYVERSION}\InstallPath" ""
11 ${If} $R6 == ''
12 Push "No registry key found"
13 Push "NOK"
14 Return
15 ${EndIf}
16 ${EndIf}
17
18 ${If} ${FileExists} "$R6\python.exe"
19 Push "$R6"
20 Push "OK"
21 ${Else}
22 Push "No python.exe found"
23 Push "NOK"
24 ${EndIf}
25 FunctionEnd
26
27 ;--------------------------------------------------------------------
28 ; Prefer the current user's installation of GTK, fall back to the local machine
29
30 Function DetectGTK
31 ${If} $PYOK == "OK"
32 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\runtime\bin\libgtk-win32-2.0-0.dll"
33 Push "$PYPATH\Lib\site-packages\gtk-2.0\runtime\bin"
34 Push "OK"
35 ${Else}
36 Push "libgtk-win32-2.0-0.dll not found in $PYPATH\Lib\site\packages\gtk-2.0\runtime\bin"
37 Push "NOK"
38 ${EndIf}
39 ${Else}
40 Push "Python not detected (we are looking for PyGTK All-in-one package)"
41 Push "NOK"
42 ${EndIf}
43 FunctionEnd
44
45 ;--------------------------------------------------------------------
46 ; Are necessary PyGTK bits and pieces available?
47
48 Function DetectPyGTK
49 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\gtk\__init__.py"
50 Push "OK"
51 ${Else}
52 Push "NOK"
53 ${EndIf}
54 FunctionEnd
55
56 Function DetectPyCairo
57 ${If} ${FileExists} "$PYPATH\Lib\site-packages\cairo\__init__.py"
58 Push "OK"
59 ${Else}
60 Push "NOK"
61 ${EndIf}
62 FunctionEnd
63
64 Function DetectPyGObject
65 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\gobject\__init__.py"
66 Push "OK"
67 ${Else}
68 Push "NOK"
69 ${EndIf}
70 FunctionEnd
71
72 ;--------------------------------------------------------------------
73 ; Prefer the current user's installation of GTK, fall back to the local machine
74
75 Function DetectGlade
76 ${If} $PYOK == "OK"
77 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\runtime\bin\libglade-2.0-0.dll"
78 Push "$PYPATH\Lib\site\packages\gtk-2.0\runtime\bin"
79 Push "OK"
80 ${Else}
81 Push "libglade-2.0-0.dll not found in $PYPATH\Lib\site\packages\gtk-2.0\runtime\bin"
82 Push "NOK"
83 ${EndIf}
84 ${Else}
85 Push "Python not detected (we are looking for PyGTK All-in-one package)"
86 Push "NOK"
87 ${EndIf}
88 FunctionEnd
89
90 ;--------------------------------------------------------------------
91
92 ;Function DetectTcl
93 ; ReadRegStr $R6 HKCU "SOFTWARE\ActiveState\ActiveTcl" "CurrentVersion"
94 ; ${If} $R6 == ''
95 ; ReadRegStr $R6 HKLM "SOFTWARE\ActiveState\ActiveTcl" "CurrentVersion"
96 ; ${If} $R6 == ''
97 ; Push "No 'CurrentVersion' registry key"
98 ; Push "NOK"
99 ; Return
100 ; ${Else}
101 ; StrCpy $R7 "SOFTWARE\ActiveState\ActiveTcl\$R6"
102 ; ReadRegStr $R8 HKLM $R7 ""
103 ; ${EndIf}
104 ; ${Else}
105 ; StrCpy $R7 "SOFTWARE\ActiveState\ActiveTcl\$R6"
106 ; ReadRegStr $R8 HKCU $R7 ""
107 ; ${EndIf}
108 ;
109 ; ${If} $R8 == ''
110 ; Push "No value for $R7"
111 ; Push "NOK"
112 ; ${Else}
113 ; Push "$R8\bin"
114 ; Push "OK"
115 ; ${EndIf}
116 ;FunctionEnd

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