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

Diff of /trunk/nsis/download.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 1571 by jpye, Fri Aug 3 15:50:59 2007 UTC
# Line 3  Var DAI_TMPFILE Line 3  Var DAI_TMPFILE
3    
4  !macro downloadAndInstall DAI_NAME DAI_URL DAI_FN DAI_CMD  !macro downloadAndInstall DAI_NAME DAI_URL DAI_FN DAI_CMD
5    
6      MessageBox MB_OK "Downloading ${DAI_NAME}..."      ;MessageBox MB_OK "Downloading ${DAI_NAME}..."
7    
8      StrCpy $DAI_TMPFILE "$TEMP\${DAI_FN}"      StrCpy $DAI_TMPFILE "$TEMP\${DAI_FN}"
9      nsisdl::download /TIMEOUT=30000 ${DAI_URL} $DAI_TMPFILE      nsisdl::download /TIMEOUT=30000 ${DAI_URL} $DAI_TMPFILE
10      Pop $DAI_RET ;Get the return value      Pop $DAI_RET ;Get the return value
11      ${If} $DAI_RET == "success"      ${If} $DAI_RET == "success"
12          MessageBox MB_OK "Installing ${DAI_NAME}..."          ;MessageBox MB_OK "Installing ${DAI_NAME}..."
13            DetailPrint "Installing ${DAI_NAME} (${DAI_FN})"
14          ExecWait "${DAI_CMD}" $0          ExecWait "${DAI_CMD}" $0
15          MessageBox MB_OK "${DAI_NAME} installer returned $0"          DetailPrint "Return code: $0"
16            ${If} $0 != "0"
17                MessageBox MB_OK "${DAI_NAME} installer returned $0"
18            ${EndIf}
19          Delete $DAI_TMPFILE          Delete $DAI_TMPFILE
20          Push $0          Push $0
21      ${ElseIf} $DAI_RET == "cancel"      ${ElseIf} $DAI_RET == "cancel"
22          MessageBox MB_OK "${DAI_NAME} download cancelled"          MessageBox MB_OK "${DAI_NAME} download cancelled."
23          Push 2          Push 2
24      ${Else}      ${Else}
25          MessageBox MB_OK "Download failed: $DAI_RET"          MessageBox MB_OK "Download failed: $DAI_RET"

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

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