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

Diff of /trunk/nsis/dependencies.nsi

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

revision 1570 by jpye, Fri Aug 3 14:18:08 2007 UTC revision 1573 by jpye, Sat Aug 4 09:37:03 2007 UTC
# Line 1  Line 1 
1  ;---------------------------------------------------------------------  ;---------------------------------------------------------------------
2  ; CUSTOM PAGE to DOWNLOAD REQUIRED DEPENDENCIES  ; CUSTOM PAGE to DOWNLOAD REQUIRED DEPENDENCIES
3    
4  !define DEPINI "dependencies.ini"  Var CHECKPY
5  !define DEPINIPATH "$PLUGINSDIR\${DEPINI}"  Var CHECKGTK
6    Var CHECKPYGTK
7    Var CHECKPYGOBJECT
8    Var CHECKPYCAIRO
9    Var CHECKTCL
10    
11    !macro setCheckboxChecked CB
12        SendMessage ${CB} ${BM_SETCHECK} 0x0001 0
13        Pop $0
14    !macroend
15    
16  Function dependenciesCreate  Function dependenciesCreate
17      MessageBox MB_OK "creating dependencies dialog"      
   
18      ${If} $PYOK == 'OK'      ${If} $PYOK == 'OK'
19      ${AndIf} $GTKOK == 'OK'      ${AndIf} $GTKOK == 'OK'
20      ${AndIf} $PYGTKOK == 'OK'      ${AndIf} $PYGTKOK == 'OK'
21      ${AndIf} $PYGOBJECTOK == 'OK'      ${AndIf} $PYGOBJECTOK == 'OK'
22      ${AndIf} $PYCAIROOK == 'OK'      ${AndIf} $PYCAIROOK == 'OK'
23          MessageBox MB_OK "all required dependencies were found"      ${AndIf} $TCLOK == 'OK'
24          ; do nothing in this page          ; do nothing in this page
25      ${Else}      ${Else}
26          MessageBox MB_OK "running dependencies dialog"          nsDialogs::Create /NOUNLOAD 1018
27              InitPluginsDir          Pop $0
             File ${DEPINI}  
             StrCpy $0 "${DEPINIPATH}"  
28    
29              Call CreateDialogFromINI          ${NSD_CreateLabel} 0% 0 100% 48% "The following additional packages are required for ASCEND to function correctly. Checked items will be downloaded and installed (some of the installers may require you to click 'next' a few times). If you don't want additional components to be downloaded you can unckeck them. This installer will then install only the parts for which the prerequisites are already satisfied."
30      ${EndIf}          Pop $0
31    
32            ${If} $PYOK == 'NOK'
33                ${NSD_CreateCheckbox} 10% 50% 100% 8u Python
34                Pop $CHECKPY
35                !insertmacro setCheckboxChecked $CHECKPY
36            ${EndIf}
37    
38            ${If} $GTKOK == 'NOK'
39                ${NSD_CreateCheckbox} 10% 58% 100% 8u GTK+
40                Pop $CHECKGTK
41                !insertmacro setCheckboxChecked $CHECKGTK
42            ${EndIf}
43    
44            ${If} $PYGOBJECTOK == 'NOK'
45                ${NSD_CreateCheckbox} 10% 66% 100% 8u PyGObject
46                Pop $CHECKPYGOBJECT
47                !insertmacro setCheckboxChecked $CHECKPYGOBJECT
48            ${EndIf}
49    
50            ${If} $PYCAIROOK == 'NOK'
51                ${NSD_CreateCheckbox} 10% 74% 100% 8u PyCairo
52                Pop $CHECKPYCAIRO
53                !insertmacro setCheckboxChecked $CHECKPYCAIRO
54            ${EndIf}
55    
56            ${If} $PYGTKOK == 'NOK'
57                ${NSD_CreateCheckbox} 10% 82% 100% 8u PyGTK
58                Pop $CHECKPYGTK
59                !insertmacro setCheckboxChecked $CHECKPYGTK        
60            ${EndIf}
61            
62            ${If} $TCLOK == 'NOK'
63                ${NSD_CreateCheckbox} 10% 90% 100% 8u Tcl/Tk
64                Pop $CHECKTCL
65                !insertmacro setCheckboxChecked $CHECKTCL
66            ${EndIf}
67    
68            nsDialogs::Show
69        ${EndIf}
70        
71  FunctionEnd  FunctionEnd
72    
73  ; this function finds which inputs were selected and sets global variables accordingly  Function DependenciesLeave
74  Function dependenciesLeave      SendMessage $CHECKPY ${BM_GETCHECK} 0 0 $PYDOWNLOAD
75           ReadINIStr $PYDOWNLOAD ${DEPINIPATH} "Field 3" "State"      SendMessage $CHECKGTK ${BM_GETCHECK} 0 0 $GTKDOWNLOAD
76           ReadINIStr $PYGTKDOWNLOAD ${DEPINIPATH} "Field 4" "State"      SendMessage $CHECKPYGTK ${BM_GETCHECK} 0 0 $PYGTKDOWNLOAD
77           ReadINIStr $PYGOBJECTDOWNLOAD ${DEPINIPATH} "Field 5" "State"      SendMessage $CHECKPYGOBJECT ${BM_GETCHECK} 0 0 $PYGOBJECTDOWNLOAD
78           ReadINIStr $PYCAIRODOWNLOAD ${DEPINIPATH} "Field 6" "State"      SendMessage $CHECKPYCAIRO ${BM_GETCHECK} 0 0 $PYCAIRODOWNLOAD
79           ReadINIStr $GTKDOWNLOAD ${DEPINIPATH} "Field 7" "State"      SendMessage $CHECKTCL ${BM_GETCHECK} 0 0 $TCLDOWNLOAD
80  FunctionEnd  FunctionEnd
81        

Legend:
Removed from v.1570  
changed lines
  Added in v.1573

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