This plug-in was created on the base of MS WinInet API for http 
and ftp downloads. Command line may include few URL/File pairs 
to be downloaded. Plug-in supports 3 "download in progress" 
display modes: 1) old NSISdl style - additional embedded progress 
bar and text on the INSTFILES page; 2) POPUP dialog mode with 
detailed info; 3) BANNER mode with simple popup window. Plug-in 
recognizes Installer' Silent mode and this case hides any output. 
Program implements simple re-get functionality - host reconnect 
and download from current position after short pause. NSISdl code 
fragment was used for progress bar displaying in the "old style" 
mode. 

Requires NSIS 2.03


Command line parameters (NSIS script):

  InetLoad::load [/SILENT] [/POPUP | /BANNER CAPTION TEXT] [/TRANSLATE LANG_PARAMS] URL1 local_file1 [URL2 local_file2 [...]] [/END]

/SILENT hides plug-in' output (both popup dialog and embedded progress bar)
        Not required if installer is running in the 'silent' mode (NSIS 2.03 option).

/POPUP  displays detailed download dialog instead of embedded progress bar.
        Useful in .onInit function (i.e. not in Section)

/BANNER displays simple popup dialog (MSI Banner mode) and sets dialog CAPTION 
        ("NSIS Installer - InetLoad" is default) and TEXT.

/END    allows to limit plug-in stack reading (optional, required if you stores other 
        vars in the stack) 

/TRANSLATE allows to translate plug-in text in the "embedded" mode. Usage:

  /TRANSLATE downloading connecting second minute hour plural progress remaining

Default values are:

  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)"


For example:

  InetLoad::load "http://dl.zvuki.ru/6306/mp3/12.mp3" "$EXEDIR\12.mp3" "ftp://dl.zvuki.ru/6306/mp3/11.mp3" "$EXEDIR\11.mp3"

or

    InetLoad::load /BANNER "" "Cameron Diaz download in progress, please wait ;)" "http://www.dreamgirlswallpaper.co.uk/fiveyearsonline/wallpaper/Cameron_Diaz/camerond09big.JPG" "$EXEDIR\cd.jpg"

Return value is "OK" string if successful, error description 
string if failed (see InetLoad.cpp file for a full set of status 
strings). Result processing may be following:

  Pop $0
  StrCmp $0 "OK" dlok
  MessageBox MB_OK|MB_ICONEXCLAMATION "Download Error, click OK to abort installation" /SD IDOK
  Abort
dlok:
  ...

Takhir Bedertdinov, Moscow, Russia
ineum@narod.ru
