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 |
|
|
10 |
|
!macro setCheckboxChecked CB |
11 |
|
SendMessage ${CB} ${BM_SETCHECK} 0x0001 0 |
12 |
|
Pop $0 |
13 |
|
!macroend |
14 |
|
|
15 |
Function dependenciesCreate |
Function dependenciesCreate |
16 |
MessageBox MB_OK "creating dependencies dialog" |
|
|
|
|
17 |
${If} $PYOK == 'OK' |
${If} $PYOK == 'OK' |
18 |
${AndIf} $GTKOK == 'OK' |
${AndIf} $GTKOK == 'OK' |
19 |
${AndIf} $PYGTKOK == 'OK' |
${AndIf} $PYGTKOK == 'OK' |
20 |
${AndIf} $PYGOBJECTOK == 'OK' |
${AndIf} $PYGOBJECTOK == 'OK' |
21 |
${AndIf} $PYCAIROOK == 'OK' |
${AndIf} $PYCAIROOK == 'OK' |
|
MessageBox MB_OK "all required dependencies were found" |
|
22 |
; do nothing in this page |
; do nothing in this page |
23 |
${Else} |
${Else} |
24 |
MessageBox MB_OK "running dependencies dialog" |
nsDialogs::Create /NOUNLOAD 1018 |
25 |
InitPluginsDir |
Pop $0 |
|
File ${DEPINI} |
|
|
StrCpy $0 "${DEPINIPATH}" |
|
26 |
|
|
27 |
Call CreateDialogFromINI |
${NSD_CreateLabel} 0 0 75% 40u "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." |
28 |
${EndIf} |
Pop $0 |
29 |
|
|
30 |
|
${If} $PYOK == 'NOK' |
31 |
|
${NSD_CreateCheckbox} 0 50% 100% 8u Python |
32 |
|
Pop $CHECKPY |
33 |
|
!insertmacro setCheckboxChecked $CHECKPY |
34 |
|
${EndIf} |
35 |
|
|
36 |
|
${If} $GTKOK == 'NOK' |
37 |
|
${NSD_CreateCheckbox} 0 58% 100% 8u GTK+ |
38 |
|
Pop $CHECKGTK |
39 |
|
!insertmacro setCheckboxChecked $CHECKGTK |
40 |
|
${EndIf} |
41 |
|
|
42 |
|
${If} $PYGOBJECTOK == 'NOK' |
43 |
|
${NSD_CreateCheckbox} 0 66% 100% 8u PyGObject |
44 |
|
Pop $CHECKPYGOBJECT |
45 |
|
!insertmacro setCheckboxChecked $CHECKPYGOBJECT |
46 |
|
${EndIf} |
47 |
|
|
48 |
|
${If} $PYCAIROOK == 'NOK' |
49 |
|
${NSD_CreateCheckbox} 0 74% 100% 8u PyCairo |
50 |
|
Pop $CHECKPYCAIRO |
51 |
|
!insertmacro setCheckboxChecked $CHECKPYCAIRO |
52 |
|
${EndIf} |
53 |
|
|
54 |
|
${If} $PYGTKOK == 'NOK' |
55 |
|
${NSD_CreateCheckbox} 0 82% 100% 8u PyGTK |
56 |
|
Pop $CHECKPYGTK |
57 |
|
!insertmacro setCheckboxChecked $CHECKPYGTK |
58 |
|
${EndIf} |
59 |
|
|
60 |
|
nsDialogs::Show |
61 |
|
${EndIf} |
62 |
|
|
63 |
FunctionEnd |
FunctionEnd |
64 |
|
|
65 |
; this function finds which inputs were selected and sets global variables accordingly |
Function DependenciesLeave |
66 |
Function dependenciesLeave |
SendMessage $CHECKPY ${BM_GETCHECK} 0 0 $PYDOWNLOAD |
67 |
ReadINIStr $PYDOWNLOAD ${DEPINIPATH} "Field 3" "State" |
SendMessage $CHECKGTK ${BM_GETCHECK} 0 0 $GTKDOWNLOAD |
68 |
ReadINIStr $PYGTKDOWNLOAD ${DEPINIPATH} "Field 4" "State" |
SendMessage $CHECKPYGTK ${BM_GETCHECK} 0 0 $PYGTKDOWNLOAD |
69 |
ReadINIStr $PYGOBJECTDOWNLOAD ${DEPINIPATH} "Field 5" "State" |
SendMessage $CHECKPYGOBJECT ${BM_GETCHECK} 0 0 $PYGOBJECTDOWNLOAD |
70 |
ReadINIStr $PYCAIRODOWNLOAD ${DEPINIPATH} "Field 6" "State" |
SendMessage $CHECKPYCAIRO ${BM_GETCHECK} 0 0 $PYCAIRODOWNLOAD |
|
ReadINIStr $GTKDOWNLOAD ${DEPINIPATH} "Field 7" "State" |
|
71 |
FunctionEnd |
FunctionEnd |
72 |
|
|