2004-02-01 18:52:06 +00:00
|
|
|
NSISdl 1.3 - HTTP downloading plugin for NSIS
|
2003-02-19 21:46:08 +00:00
|
|
|
---------------------------------------------
|
2002-08-02 10:01:35 +00:00
|
|
|
|
2003-02-19 21:46:08 +00:00
|
|
|
Copyright (C) 2001-2002 Yaroslav Faybishenko & Justin Frankel
|
2002-08-02 10:01:35 +00:00
|
|
|
|
2003-02-19 21:46:08 +00:00
|
|
|
This plugin can be used from NSIS to download files via http.
|
2002-08-02 10:01:35 +00:00
|
|
|
|
2005-09-16 11:27:51 +00:00
|
|
|
To connect to the internet, use the Dialer plugin.
|
2002-08-02 10:01:35 +00:00
|
|
|
|
2003-02-19 21:46:08 +00:00
|
|
|
USAGE
|
|
|
|
-----
|
2002-08-02 10:01:35 +00:00
|
|
|
|
2003-02-19 21:46:08 +00:00
|
|
|
NSISdl::download http://www.domain.com/file localfile.exe
|
2002-08-02 10:01:35 +00:00
|
|
|
|
2003-02-19 21:46:08 +00:00
|
|
|
You can also pass /TIMEOUT to set the timeout in milliseconds:
|
2002-08-02 10:01:35 +00:00
|
|
|
|
2003-02-19 21:46:08 +00:00
|
|
|
NSISdl::download /TIMEOUT=30000 http://www.domain.com/file localfile.exe
|
2002-08-02 10:01:35 +00:00
|
|
|
|
2003-02-19 21:46:08 +00:00
|
|
|
The return value is pushed to the stack:
|
2002-09-21 18:57:02 +00:00
|
|
|
|
2003-02-19 21:46:08 +00:00
|
|
|
"cancel" if cancelled
|
|
|
|
"success" if success
|
|
|
|
otherwise, an error string describing the error
|
2002-09-21 18:57:02 +00:00
|
|
|
|
2005-09-16 11:27:51 +00:00
|
|
|
If you don't want the progress window to appear, use NSISdl::download_quiet.
|
2003-05-05 13:29:57 +00:00
|
|
|
|
2003-02-19 21:46:08 +00:00
|
|
|
Example of usage:
|
2002-09-21 18:57:02 +00:00
|
|
|
|
2003-02-19 21:46:08 +00:00
|
|
|
NSISdl::download http://www.domain.com/file localfile.exe
|
|
|
|
Pop $R0 ;Get the return value
|
|
|
|
StrCmp $R0 "success" +3
|
|
|
|
MessageBox MB_OK "Download failed: $R0"
|
|
|
|
Quit
|
|
|
|
|
2003-05-05 13:29:57 +00:00
|
|
|
For another example, see waplugin.nsi in the examples directory.
|
2003-02-19 21:46:08 +00:00
|
|
|
|
2004-02-02 14:06:53 +00:00
|
|
|
PROXIES
|
|
|
|
-------
|
|
|
|
|
|
|
|
NSISdl supports only basic configurations of proxies. It doesn't support
|
|
|
|
proxies which require authentication, automatic configuration script, etc.
|
|
|
|
NSISdl reads the proxy configuration from Internet Explorer's registry key
|
|
|
|
under HKLM\Software\Microsoft\Windows\CurrentVersion\Internet Settings. It
|
|
|
|
reads and parses ProxyEnable and ProxyServer.
|
|
|
|
|
2004-09-02 21:07:12 +00:00
|
|
|
If you don't want NSISdl to use Internet Explorer's settings, use the
|
|
|
|
/NOIEPROXY flag. /NOIEPROXY should be used after /TRANSLATE and
|
|
|
|
/TIMEOUT. For example:
|
|
|
|
|
|
|
|
NSISdl::download /NOIEPROXY http://www.domain.com/file localfile.exe
|
|
|
|
NSISdl::download /TIMEOUT=30000 /NOIEPROXY http://www.domain.com/file localfile.exe
|
|
|
|
|
2003-02-19 21:46:08 +00:00
|
|
|
TRANSLATE
|
|
|
|
---------
|
|
|
|
|
|
|
|
To translate NSISdl add the following values to the call line:
|
2002-12-05 13:05:49 +00:00
|
|
|
|
|
|
|
/TRANSLATE downloading connecting second minute hour plural progress remianing
|
|
|
|
|
|
|
|
Default values are:
|
2003-02-19 21:46:08 +00:00
|
|
|
|
2002-12-05 13:05:49 +00:00
|
|
|
downloading - "Downloading %s"
|
|
|
|
connecting - "Connecting ..."
|
|
|
|
second - "second"
|
|
|
|
minute - "minute"
|
|
|
|
hour - "hour"
|
|
|
|
plural - "s"
|
|
|
|
progress - "%dkB (%d%%) of %dkB @ %d.%01dkB/s"
|
|
|
|
remaining - "(%d %s%s remaining)"
|
|
|
|
|
|
|
|
/TRANSLATE must come before /TIMEOUT.
|