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

Contents of /trunk/nsis/detect.nsi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2203 - (show annotations) (download)
Fri May 21 04:29:59 2010 UTC (14 years, 6 months ago) by jpye
File size: 3024 byte(s)
USe PNG image for splash, instead of SVG.
Change installer to use Tcl 8.5.8.2.
Fix URL for Tcl/Tk download.
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 ReadRegStr $R6 HKLM "SOFTWARE\Gtk+" "Path"
32 ${If} $R6 == ''
33 Push "No GTK registry key found"
34 Push "NOK"
35 Return
36 ${EndIf}
37
38 ${If} ${FileExists} "$R6\bin\libgtk-win32-2.0-0.dll"
39 Push "$R6\bin"
40 Push "OK"
41 ${Else}
42 Push "No libgtk-win32-2.0-0.dll found in'$R6\bin'"
43 Push "NOK"
44 ${EndIf}
45 FunctionEnd
46
47 ;--------------------------------------------------------------------
48 ; Are necessary PyGTK bits and pieces available?
49
50 Function DetectPyGTK
51 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\gtk\__init__.py"
52 Push "OK"
53 ${Else}
54 Push "NOK"
55 ${EndIf}
56 FunctionEnd
57
58 Function DetectPyCairo
59 ${If} ${FileExists} "$PYPATH\Lib\site-packages\cairo\__init__.py"
60 Push "OK"
61 ${Else}
62 Push "NOK"
63 ${EndIf}
64 FunctionEnd
65
66 Function DetectPyGObject
67 ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\gobject\__init__.py"
68 Push "OK"
69 ${Else}
70 Push "NOK"
71 ${EndIf}
72 FunctionEnd
73
74 ;--------------------------------------------------------------------
75 ; Prefer the current user's installation of GTK, fall back to the local machine
76
77 Function DetectGlade
78 ReadRegStr $R6 HKLM "SOFTWARE\Gtk+" "Path"
79 ${If} $R6 == ''
80 Push "No GTK registry key found"
81 Push "NOK"
82 Return
83 ${EndIf}
84
85 ${If} ${FileExists} "$R6\bin\libglade-2.0-0.dll"
86 Push "$R6\bin"
87 Push "OK"
88 ${Else}
89 Push "No libglade-2.0-0.dll found in'$R6\bin'"
90 Push "NOK"
91 ${EndIf}
92 FunctionEnd
93
94 ;--------------------------------------------------------------------
95
96 Function DetectTcl
97 ReadRegStr $R6 HKCU "SOFTWARE\ActiveState\ActiveTcl" "CurrentVersion"
98 ${If} $R6 == ''
99 ReadRegStr $R6 HKLM "SOFTWARE\ActiveState\ActiveTcl" "CurrentVersion"
100 ${If} $R6 == ''
101 Push "No 'CurrentVersion' registry key"
102 Push "NOK"
103 Return
104 ${Else}
105 StrCpy $R7 "SOFTWARE\ActiveState\ActiveTcl\$R6"
106 ReadRegStr $R8 HKLM $R7 ""
107 ${EndIf}
108 ${Else}
109 StrCpy $R7 "SOFTWARE\ActiveState\ActiveTcl\$R6"
110 ReadRegStr $R8 HKCU $R7 ""
111 ${EndIf}
112
113 ${If} $R8 == ''
114 Push "No value for $R7"
115 Push "NOK"
116 ${Else}
117 Push "$R8\bin"
118 Push "OK"
119 ${EndIf}
120 FunctionEnd

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