mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-13 06:20:28 +00:00
26 lines
611 B
Plaintext
26 lines
611 B
Plaintext
|
/*
|
||
|
|
||
|
Support code for file downloads
|
||
|
|
||
|
*/
|
||
|
|
||
|
!macro DownloadFile RET ID FILENAME
|
||
|
|
||
|
#Downloads a file using the InetLoad plug-in (HTTP or FTP)
|
||
|
|
||
|
#RET = Return value (OK if succesful)
|
||
|
#ID = Name of the download in settings.nsh
|
||
|
#FILENAME = Location to store file
|
||
|
|
||
|
#Try first mirror server
|
||
|
InetLoad::load "${DOWNLOAD_${ID}}" "$PLUGINSDIR\${FILENAME}" /END
|
||
|
Pop ${RET} #Return value (OK if succesful)
|
||
|
|
||
|
${if} ${RET} != "OK"
|
||
|
#Download failed, try second mirror server
|
||
|
InetLoad::load "${DOWNLOADALT_${ID}}" "$PLUGINSDIR\${FILENAME}" /END
|
||
|
Pop ${RET}
|
||
|
${endif}
|
||
|
|
||
|
!macroend
|