home *** CD-ROM | disk | FTP | other *** search
/ Hackers Magazine 57 / CdHackersMagazineNr57.iso / Software / Programming / nsis-2.46-setup.exe / Docs / NSISdl / ReadMe.txt < prev   
Encoding:
Text File  |  2007-12-01  |  2.9 KB  |  92 lines

  1. NSISdl 1.3 - HTTP downloading plugin for NSIS
  2. ---------------------------------------------
  3.  
  4. Copyright (C) 2001-2002 Yaroslav Faybishenko & Justin Frankel
  5.  
  6. This plugin can be used from NSIS to download files via http.
  7.  
  8. To connect to the internet, use the Dialer plugin.
  9.  
  10. USAGE
  11. -----
  12.  
  13. NSISdl::download http://www.domain.com/file localfile.exe
  14.  
  15. You can also pass /TIMEOUT to set the timeout in milliseconds:
  16.  
  17. NSISdl::download /TIMEOUT=30000 http://www.domain.com/file localfile.exe
  18.  
  19. The return value is pushed to the stack:
  20.  
  21.   "cancel" if cancelled
  22.   "success" if success
  23.   otherwise, an error string describing the error
  24.  
  25. If you don't want the progress window to appear, use NSISdl::download_quiet.
  26.  
  27. Example of usage:
  28.  
  29. NSISdl::download http://www.domain.com/file localfile.exe
  30. Pop $R0 ;Get the return value
  31.   StrCmp $R0 "success" +3
  32.     MessageBox MB_OK "Download failed: $R0"
  33.     Quit
  34.  
  35. For another example, see waplugin.nsi in the examples directory.
  36.  
  37. PROXIES
  38. -------
  39.  
  40. NSISdl supports only basic configurations of proxies. It doesn't support
  41. proxies which require authentication, automatic configuration script, etc.
  42. NSISdl reads the proxy configuration from Internet Explorer's registry key
  43. under HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings. It
  44. reads and parses ProxyEnable and ProxyServer.
  45.  
  46. If you don't want NSISdl to use Internet Explorer's settings, use the
  47. /NOIEPROXY flag. /NOIEPROXY should be used after /TRANSLATE and
  48. /TIMEOUT. For example:
  49.  
  50. If you want to specify a proxy on your own, use the /PROXY flag.
  51.  
  52. NSISdl::download /NOIEPROXY http://www.domain.com/file localfile.exe
  53. NSISdl::download /TIMEOUT=30000 /NOIEPROXY http://www.domain.com/file localfile.exe
  54. NSISdl::download /PROXY proxy.whatever.com http://www.domain.com/file localfile.exe
  55. NSISdl::download /PROXY proxy.whatever.com:8080 http://www.domain.com/file localfile.exe
  56.  
  57. TRANSLATE
  58. ---------
  59.  
  60. To translate NSISdl add the following values to the call line:
  61.  
  62. /TRANSLATE2 downloading connecting second minute hour seconds minutes hours progress
  63.  
  64. Default values are:
  65.  
  66.   downloading - "Downloading %s"
  67.   connecting - "Connecting ..."
  68.   second - " (1 second remaining)"
  69.   minute - " (1 minute remaining)"
  70.   hour - " (1 hour remaining)"
  71.   seconds - " (%u seconds remaining)"
  72.   minutes - " (%u minutes remaining)"
  73.   hours - " (%u hours remaining)"
  74.   progress - "%skB (%d%%) of %skB @ %u.%01ukB/s"
  75.  
  76. The old /TRANSLATE method still works for backward compatibility.
  77.  
  78. /TRANSLATE downloading connecting second minute hour plural progress remianing
  79.  
  80. Default values are:
  81.  
  82.   downloading - "Downloading %s"
  83.   connecting - "Connecting ..."
  84.   second - "second"
  85.   minute - "minute"
  86.   hour - "hour"
  87.   plural - "s"
  88.   progress - "%dkB (%d%%) of %ukB @ %d.%01dkB/s"
  89.   remaining -  " (%d %s%s remaining)"
  90.  
  91. /TRANSLATE and /TRANSLATE2 must come before /TIMEOUT.
  92.