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

Diff of /trunk/nsis/detect.nsi

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2604 by jpye, Mon Apr 2 23:47:07 2012 UTC revision 2605 by jpye, Tue Apr 24 06:14:23 2012 UTC
# Line 5  Line 5 
5  ; Look for Python in HKLM and HKCU  ; Look for Python in HKLM and HKCU
6    
7  Function DetectPython  Function DetectPython
8  !if "${INST64}" != "0"  !ifdef INST64
9      SetRegView 64      SetRegView 64
10  !endif  !endif
11      ReadRegStr $R6 HKLM "SOFTWARE\Python\PythonCore\${PYVERSION}\InstallPath" ""      ReadRegStr $R6 HKLM "SOFTWARE\Python\PythonCore\${PYVERSION}\InstallPath" ""
# Line 14  Function DetectPython Line 14  Function DetectPython
14          ReadRegStr $R6 HKCU "SOFTWARE\Python\PythonCore\${PYVERSION}\InstallPath" ""          ReadRegStr $R6 HKCU "SOFTWARE\Python\PythonCore\${PYVERSION}\InstallPath" ""
15          ${If} $R6 == ''          ${If} $R6 == ''
16              ;MessageBox MB_OK "No Python in HKCU"              ;MessageBox MB_OK "No Python in HKCU"
17              Push "No registry key found"              StrCpy $HAVE_PYTHON "NOK"
18              Push "NOK"              StrCpy $PYPATH "No registry key found"
19              Return              Return
20          ${EndIf}          ${EndIf}
21      ${EndIf}      ${EndIf}
22            
23      ${If} ${FileExists} "$R6\python.exe"      ${If} ${FileExists} "$R6\python.exe"
24          Push "$R6"          StrCpy $PYPATH "$R6"
25          Push "OK"          StrCpy $HAVE_PYTHON "OK"
26      ${Else}      ${Else}
27          ;MessageBox MB_OK "No python.exe in $R6"              ;MessageBox MB_OK "No python.exe in $R6"    
28          Push "No python.exe found"          StrCpy $PYPATH "No python.exe found"
29          Push "NOK"          StrCpy $HAVE_PYTHON "NOK"
30      ${EndIf}      ${EndIf}
31  FunctionEnd  FunctionEnd
32    
# Line 34  FunctionEnd Line 34  FunctionEnd
34  ; Prefer the current user's installation of GTK, fall back to the local machine  ; Prefer the current user's installation of GTK, fall back to the local machine
35    
36  Function DetectGTK  Function DetectGTK
37  !if "${INST64}" != "0"  !ifdef INST64
38      ${If} ${RunningX64}      ${If} ${RunningX64}
39          ${If} ${FileExists} "${GTKSEARCHPATH}\manifest\gtk+-bundle_2.22.1-20101229_win64.mft"  !endif
40            ${If} ${FileExists} "${GTKSEARCHPATH}\manifest\${GTK_MFT}"
41                  MessageBox MB_OK "GTK OK in ${GTKSEARCHPATH}\manifest"                  MessageBox MB_OK "GTK OK in ${GTKSEARCHPATH}\manifest"
42                  Push "${GTKSEARCHPATH}\bin"                  StrCpy $GTKPATH "${GTKSEARCHPATH}\bin"
43                  Push "OK"                  StrCpy $HAVE_GTK "OK"
44                  Return                  Return
45          ${EndIf}          ${EndIf}
46    !ifdef INST64
47      ${EndIf}      ${EndIf}
     MessageBox MB_OK "Expected to gtk+-bundle_2.22.1-20101229_win64.mft in ${GTKSEARCHPATH}\manifest"  
 !else  
     ${If} ${FileExists} "${GTKSEARCHPATH}\manifest\gtk+-bundle_2.24.10-20120208_win32.mft"  
         MessageBox MB_OK "GTK OK in ${GTKSEARCHPATH}\manifest"  
         Push "${GTKSEARCHPATH}\bin"  
         Push "OK"  
         Return  
     ${EndIf}  
     MessageBox MB_OK "Expected to find gtk+-bundle_2.24.10-20120208_win32.mft in ${GTKSEARCHPATH}\manifest"  
48  !endif  !endif
49      Push "gtk+-bundle manifest not found in ${GTKSEARCHPATH}\manifest"      MessageBox MB_OK "Expected to find ${GTK_MFT} in ${GTKSEARCHPATH}\manifest"
50      Push "NOK"      StrCpy $GTKPATH "gtk+-bundle manifest not found in ${GTKSEARCHPATH}\manifest"
51        StrCpy $HAVE_GTK "NOK"
52  FunctionEnd  FunctionEnd
53    
54  ;--------------------------------------------------------------------  ;--------------------------------------------------------------------
# Line 62  FunctionEnd Line 56  FunctionEnd
56    
57  Function DetectPyGTK  Function DetectPyGTK
58      ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\gtk\__init__.py"      ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\gtk\__init__.py"
59          Push "OK"          StrCpy $HAVE_PYGTK "OK"
60      ${Else}      ${Else}
61          MessageBox MB_OK "No PyGTK in $PYPATH"                MessageBox MB_OK "No PyGTK in $PYPATH"      
62          Push "NOK"          StrCpy $HAVE_PYGTK "NOK"
63      ${EndIf}      ${EndIf}
64  FunctionEnd  FunctionEnd
65    
66  Function DetectPyCairo  Function DetectPyCairo
67      ${If} ${FileExists} "$PYPATH\Lib\site-packages\cairo\__init__.py"      ${If} ${FileExists} "$PYPATH\Lib\site-packages\cairo\__init__.py"
68          Push "OK"          StrCpy $HAVE_PYCAIRO "OK"
69      ${Else}      ${Else}
70          MessageBox MB_OK "No PyCairo in $PYPATH"                  MessageBox MB_OK "No PyCairo in $PYPATH"        
71          Push "NOK"          StrCpy $HAVE_PYCAIRO "NOK"
72      ${EndIf}      ${EndIf}
73  FunctionEnd  FunctionEnd
74    
75  Function DetectPyGObject  Function DetectPyGObject
76      ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\gobject\__init__.py"      ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\gobject\__init__.py"
77          Push "OK"          StrCpy $HAVE_PYGOBJECT "OK"
78      ${Else}      ${Else}
79          MessageBox MB_OK "No PyGObject in $PYPATH"                MessageBox MB_OK "No PyGObject in $PYPATH"      
80          Push "NOK"          StrCpy $HAVE_PYGOBJECT "NOK"
81      ${EndIf}      ${EndIf}
82  FunctionEnd  FunctionEnd
   
 ;--------------------------------------------------------------------  
 ; Prefer the current user's installation of GTK, fall back to the local machine  
   
 ; don't need glade any more, we converted to gtkbuilder.  
 ;Function DetectGlade  
 ;   ${If} $PYOK == "OK"  
 ;       ${If} ${FileExists} "$PYPATH\Lib\site-packages\gtk-2.0\runtime\bin\libglade-2.0-0.dll"  
 ;           Push "$PYPATH\Lib\site\packages\gtk-2.0\runtime\bin"  
 ;           Push "OK"  
 ;       ${Else}  
 ;           Push "libglade-2.0-0.dll not found in $PYPATH\Lib\site\packages\gtk-2.0\runtime\bin"  
 ;           Push "NOK"  
 ;       ${EndIf}  
 ;   ${Else}  
 ;       Push "Python not detected (we are looking for PyGTK All-in-one package)"  
 ;       Push "NOK"  
 ;   ${EndIf}  
 ;FunctionEnd  
   
 ;--------------------------------------------------------------------  
   
 ;Function DetectTcl  
 ;!if ${INST64}  
 ;   SetRegView 64  
 ;!endif  
 ;   ReadRegStr $R6 HKCU "SOFTWARE\ActiveState\ActiveTcl" "CurrentVersion"  
 ;   ${If} $R6 == ''  
 ;       ReadRegStr $R6 HKLM "SOFTWARE\ActiveState\ActiveTcl" "CurrentVersion"  
 ;       ${If} $R6 == ''  
 ;           Push "No 'CurrentVersion' registry key"  
 ;           Push "NOK"  
 ;           Return  
 ;       ${Else}  
 ;           StrCpy $R7 "SOFTWARE\ActiveState\ActiveTcl\$R6"  
 ;           ReadRegStr $R8 HKLM $R7 ""        
 ;       ${EndIf}  
 ;   ${Else}  
 ;       StrCpy $R7 "SOFTWARE\ActiveState\ActiveTcl\$R6"  
 ;       ReadRegStr $R8 HKCU $R7 ""        
 ;   ${EndIf}  
 ;    
 ;   ${If} $R8 == ''  
 ;       Push "No value for $R7"  
 ;       Push "NOK"  
 ;   ${Else}  
 ;       Push "$R8\bin"  
 ;       Push "OK"  
 ;   ${EndIf}  
 ;FunctionEnd  

Legend:
Removed from v.2604  
changed lines
  Added in v.2605

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