/[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 2604 by jpye, Mon Mar 28 06:32:53 2011 UTC revision 2605 by jpye, Tue Apr 24 06:14:23 2012 UTC
# Line 3  Var DAI_MSG Line 3  Var DAI_MSG
3  Var DAI_TMPFILE  Var DAI_TMPFILE
4  Var DAI_REMOVE  Var DAI_REMOVE
5    
6  !macro downloadAndInstall DAI_NAME DAI_URL DAI_FN DAI_CMD DAI_MD5  !macro downloadAndInstall DAI_NAME DAI_URL DAI_FN DAI_CMD
7      Push $0      Push $0
8      Push $1      Push $1
9    
# Line 16  Var DAI_REMOVE Line 16  Var DAI_REMOVE
16              StrCpy $DAI_RET "success"              StrCpy $DAI_RET "success"
17              StrCpy $DAI_TMPFILE "${DAI_FN}"              StrCpy $DAI_TMPFILE "${DAI_FN}"
18          ${EndIf}          ${EndIf}
   
 ; Unable to get reliable behaviour with md5dll or Crypto plugins for NSIS...      
 ;       md5dll::GetMD5File "${DAI_FN}"  
 ;       ;Crypto::HashFile "MD5" "${DAI_FN}"  
 ;       ;Pop $0  
 ;       ${If} $0 == "${DAI_MD5}"  
 ;           StrCpy $DAI_RET "success"  
 ;           StrCpy $DAI_TMPFILE "${DAI_FN}"  
 ;       ${Else}  
 ;           ${If} ${Cmd} `MessageBox MB_ICONQUESTION|MB_YESNO "File ${DAI_FN} was found (with MD5 sum '$0')$\n but did not have expected MD5 '${DAI_MD5}'.$\n$\nWould you like this file to be used?" IDYES `  
                 StrCpy $DAI_RET "success"  
                 StrCpy $DAI_TMPFILE "${DAI_FN}"  
 ;           ${EndIf}  
 ;       ${EndIf}  
 ;   ${Else}  
 ;       MessageBox MB_OK "File ${DAI_FN} not found. Will be downloaded."  
19      ${EndIf}      ${EndIf}
20            
21      ${If} $DAI_RET != "success"      ${If} $DAI_RET != "success"

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

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