mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-15 01:41:43 +00:00
ba5b4f385d
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_5_X@19213 a592a061-630c-0410-9148-cb99ea01b6c8
27 lines
703 B
Plaintext
27 lines
703 B
Plaintext
/*
|
|
|
|
Support code for file downloads
|
|
|
|
*/
|
|
|
|
!macro DownloadFile RET ID FILENAME APPEND
|
|
|
|
#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
|
|
#APPEND = Filename to append to server location in settings.nsh
|
|
|
|
#Try first mirror server
|
|
InetLoad::load "${DOWNLOAD_${ID}}${APPEND}" "$PLUGINSDIR\${FILENAME}" /END
|
|
Pop ${RET} #Return value (OK if succesful)
|
|
|
|
${if} ${RET} != "OK"
|
|
#Download failed, try second mirror server
|
|
InetLoad::load "${DOWNLOADALT_${ID}}${APPEND}" "$PLUGINSDIR\${FILENAME}" /END
|
|
Pop ${RET}
|
|
${endif}
|
|
|
|
!macroend
|