--- /dev/null
+/*\r
+\r
+Support code for file downloads\r
+\r
+*/\r
+\r
+!macro DownloadFile RET ID FILENAME\r
+\r
+ #Downloads a file using the InetLoad plug-in (HTTP or FTP)\r
+ \r
+ #RET = Return value (OK if succesful)\r
+ #ID = Name of the download in settings.nsh\r
+ #FILENAME = Location to store file\r
+\r
+ #Try first mirror server\r
+ InetLoad::load "${DOWNLOAD_${ID}}" "$PLUGINSDIR\${FILENAME}" /END\r
+ Pop ${RET} #Return value (OK if succesful)\r
+\r
+ ${if} ${RET} != "OK"\r
+ #Download failed, try second mirror server\r
+ InetLoad::load "${DOWNLOADALT_${ID}}" "$PLUGINSDIR\${FILENAME}" /END\r
+ Pop ${RET}\r
+ ${endif}\r
+\r
+!macroend\r
\r
#--------------------------------\r
#Locations of components to download\r
-!define DOWNLOAD_LATEX "http://superb-west.dl.sourceforge.net/sourceforge/miktex/basic-miktex-2.5.2580.exe"\r
-!define DOWNLOAD_IMAGEMAGICK "http://superb-west.dl.sourceforge.net/sourceforge/imagemagick/ImageMagick-6.3.3-7-Q16-windows-dll.exe"\r
-!define DOWNLOAD_GHOSTSCRIPT "http://superb-west.dl.sourceforge.net/sourceforge/ghostscript/gs854w32-gpl.exe"\r
+\r
+!define MIRROR_SF1 "http://superb-west.dl.sourceforge.net/sourceforge"\r
+!define MIRROR_SF2 "http://mesh.dl.sourceforge.net/sourceforge"\r
+\r
+!macro SourceForgeMirror ID FILENAME\r
+ !define DOWNLOAD_${ID} "${MIRROR_SF1}/${FILENAME}"\r
+ !define DOWNLOADALT_${ID} "${MIRROR_SF2}/${FILENAME}"\r
+!macroend\r
+\r
+!insertmacro SourceForgeMirror LATEX "miktex/basic-miktex-2.6.2704.exe"\r
+!insertmacro SourceForgeMirror IMAGEMAGICK "imagemagick/ImageMagick-6.3.4-10-Q16-windows-dll.exe"\r
+!insertmacro SourceForgeMirror GHOSTSCRIPT "ghostscript/gs857w32.exe"\r
+\r
!define DOWNLOAD_VIEWER "http://tug.ctan.org/tex-archive/nonfree/support/ghostscript/ghostgum/gsv48w32.exe"\r
+!define DOWNLOADALT_VIEWER "http://ctan.basemirror.de/nonfree/support/ghostscript/ghostgum/gsv48w32.exe"\r
\r
!define DOWNLOAD_ASPELLDICTS "ftp://ftp.lyx.org/pub/lyx/contrib/aspell6-windows"\r
-!define ALT_DOWNLOAD_ASPELLDICTS "http://www.lyx.org/~bpeng/aspell6-windows"\r
+!define DOWNLOADALT_ASPELLDICTS "http://www.lyx.org/~bpeng/aspell6-windows"\r
\r
#--------------------------------\r
#Download size (in KB)\r
\r
-!define SIZE_DOWNLOAD_LATEX 47271\r
-!define SIZE_DOWNLOAD_IMAGEMAGICK 6947\r
-!define SIZE_DOWNLOAD_GHOSTSCRIPT 12669\r
+!define SIZE_DOWNLOAD_LATEX 53759\r
+!define SIZE_DOWNLOAD_IMAGEMAGICK 7111\r
+!define SIZE_DOWNLOAD_GHOSTSCRIPT 11916\r
!define SIZE_DOWNLOAD_VIEWER 1459\r
\r
#--------------------------------\r
#Approximations of space required for components (in KB)\r
\r
!define SIZE_LATEX 120000\r
-!define SIZE_IMAGEMAGICK 17000\r
-!define SIZE_GHOSTSCRIPT 26000\r
+!define SIZE_IMAGEMAGICK 18000\r
+!define SIZE_GHOSTSCRIPT 30000\r
!define SIZE_VIEWER 4000\r
\r
#--------------------------------\r
#Locations of setup files for components (for bundled setup)\r
\r
-!define INSTALL_LATEX "basic-miktex-2.5.2580.exe"\r
-!define INSTALL_IMAGEMAGICK "ImageMagick-6.3.3-7-Q16-windows-dll.exe"\r
-!define INSTALL_GHOSTSCRIPT "gs854w32-gpl.exe"\r
+!define INSTALL_LATEX "basic-miktex-2.6.2704.exe"\r
+!define INSTALL_IMAGEMAGICK "ImageMagick-6.3.4-8-Q16-windows-dll.exe"\r
+!define INSTALL_GHOSTSCRIPT "gs857w32.exe"\r
!define INSTALL_VIEWER "gsv48w32.exe"\r
\r
#--------------------------------\r
!define APP_SERIES_KEY "15"\r
!define APP_DIR_USERDATA "LyX1.5.x"\r
!define APP_INFO "${APP_NAME} - The Document Processor"\r
-!define APP_COPYRIGHT "LyX is Copyright © 1995 by Matthias Ettrich, 1995-2006 LyX Team"\r
+!define APP_COPYRIGHT "LyX is Copyright © 1995 by Matthias Ettrich, 1995-2007 LyX Team"\r
\r
!define APP_RUN "bin\lyx.exe"\r
\r