From: Joost Verburg Date: Thu, 21 Jun 2007 18:41:24 +0000 (+0000) Subject: two mirror servers for all downloads X-Git-Tag: 1.6.10~9319 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=0e0a947aa9fa73dbf0991d487509c0ac41c71ad5;p=features.git two mirror servers for all downloads git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18847 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/development/Win32/packaging/installer/components/dicts.nsh b/development/Win32/packaging/installer/components/dicts.nsh index fa77c832bf..63c1b2d2d3 100644 --- a/development/Win32/packaging/installer/components/dicts.nsh +++ b/development/Win32/packaging/installer/components/dicts.nsh @@ -106,18 +106,10 @@ Function DownloadDictionary dict_download: - #Download - InetLoad::load "${DOWNLOAD_ASPELLDICTS}/aspell6-$R0.exe" "$PLUGINSDIR\aspell6-$R0.exe" /END - Pop $R3 + !insertmacro DownloadFile $R3 ASPELLDICTS aspell6-$R0.exe ${if} $R3 != "OK" - #Download failed, try an alternative link - InetLoad::load "${ALT_DOWNLOAD_ASPELLDICTS}/aspell6-$R0.exe" "$PLUGINSDIR\aspell6-$R0.exe" /END - Pop $R3 - ${endif} - - ${if} $R3 != "OK" - #Download failed again + #Download failed MessageBox MB_YESNO|MB_ICONEXCLAMATION "$(TEXT_DOWNLOAD_FAILED_DICT) ($R3)" IDYES dict_download Goto dict_noinstall ${endif} diff --git a/development/Win32/packaging/installer/components/external.nsh b/development/Win32/packaging/installer/components/external.nsh index c58868cf85..2c33850faa 100644 --- a/development/Win32/packaging/installer/components/external.nsh +++ b/development/Win32/packaging/installer/components/external.nsh @@ -73,9 +73,7 @@ External Components: MiKTeX, ImageMagick, Ghostscript download_${COMPONENT}: - #Download using HTTP - InetLoad::load "${DOWNLOAD_${COMPONENT}}" "$PLUGINSDIR\${COMPONENT}Setup.exe" /END - Pop $R0 + !insertmacro DownloadFile $R0 "${COMPONENT}" "${COMPONENT}Setup.exe" ${if} $R0 != "OK" #Download failed diff --git a/development/Win32/packaging/installer/include/declarations.nsh b/development/Win32/packaging/installer/include/declarations.nsh index 42b686b305..b7f5ac8a38 100644 --- a/development/Win32/packaging/installer/include/declarations.nsh +++ b/development/Win32/packaging/installer/include/declarations.nsh @@ -108,6 +108,7 @@ Var AspellHive #-------------------------------- #LyX installer header files +!include "include\download.nsh" !include "include\init.nsh" !include "include\windows.nsh" !include "include\lang.nsh" diff --git a/development/Win32/packaging/installer/include/download.nsh b/development/Win32/packaging/installer/include/download.nsh new file mode 100644 index 0000000000..ddd78ae68a --- /dev/null +++ b/development/Win32/packaging/installer/include/download.nsh @@ -0,0 +1,25 @@ +/* + +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 diff --git a/development/Win32/packaging/installer/settings.nsh b/development/Win32/packaging/installer/settings.nsh index ec0d66efae..f72d34b335 100644 --- a/development/Win32/packaging/installer/settings.nsh +++ b/development/Win32/packaging/installer/settings.nsh @@ -29,36 +29,47 @@ Settings for LyX installer #-------------------------------- #Locations of components to download -!define DOWNLOAD_LATEX "http://superb-west.dl.sourceforge.net/sourceforge/miktex/basic-miktex-2.5.2580.exe" -!define DOWNLOAD_IMAGEMAGICK "http://superb-west.dl.sourceforge.net/sourceforge/imagemagick/ImageMagick-6.3.3-7-Q16-windows-dll.exe" -!define DOWNLOAD_GHOSTSCRIPT "http://superb-west.dl.sourceforge.net/sourceforge/ghostscript/gs854w32-gpl.exe" + +!define MIRROR_SF1 "http://superb-west.dl.sourceforge.net/sourceforge" +!define MIRROR_SF2 "http://mesh.dl.sourceforge.net/sourceforge" + +!macro SourceForgeMirror ID FILENAME + !define DOWNLOAD_${ID} "${MIRROR_SF1}/${FILENAME}" + !define DOWNLOADALT_${ID} "${MIRROR_SF2}/${FILENAME}" +!macroend + +!insertmacro SourceForgeMirror LATEX "miktex/basic-miktex-2.6.2704.exe" +!insertmacro SourceForgeMirror IMAGEMAGICK "imagemagick/ImageMagick-6.3.4-10-Q16-windows-dll.exe" +!insertmacro SourceForgeMirror GHOSTSCRIPT "ghostscript/gs857w32.exe" + !define DOWNLOAD_VIEWER "http://tug.ctan.org/tex-archive/nonfree/support/ghostscript/ghostgum/gsv48w32.exe" +!define DOWNLOADALT_VIEWER "http://ctan.basemirror.de/nonfree/support/ghostscript/ghostgum/gsv48w32.exe" !define DOWNLOAD_ASPELLDICTS "ftp://ftp.lyx.org/pub/lyx/contrib/aspell6-windows" -!define ALT_DOWNLOAD_ASPELLDICTS "http://www.lyx.org/~bpeng/aspell6-windows" +!define DOWNLOADALT_ASPELLDICTS "http://www.lyx.org/~bpeng/aspell6-windows" #-------------------------------- #Download size (in KB) -!define SIZE_DOWNLOAD_LATEX 47271 -!define SIZE_DOWNLOAD_IMAGEMAGICK 6947 -!define SIZE_DOWNLOAD_GHOSTSCRIPT 12669 +!define SIZE_DOWNLOAD_LATEX 53759 +!define SIZE_DOWNLOAD_IMAGEMAGICK 7111 +!define SIZE_DOWNLOAD_GHOSTSCRIPT 11916 !define SIZE_DOWNLOAD_VIEWER 1459 #-------------------------------- #Approximations of space required for components (in KB) !define SIZE_LATEX 120000 -!define SIZE_IMAGEMAGICK 17000 -!define SIZE_GHOSTSCRIPT 26000 +!define SIZE_IMAGEMAGICK 18000 +!define SIZE_GHOSTSCRIPT 30000 !define SIZE_VIEWER 4000 #-------------------------------- #Locations of setup files for components (for bundled setup) -!define INSTALL_LATEX "basic-miktex-2.5.2580.exe" -!define INSTALL_IMAGEMAGICK "ImageMagick-6.3.3-7-Q16-windows-dll.exe" -!define INSTALL_GHOSTSCRIPT "gs854w32-gpl.exe" +!define INSTALL_LATEX "basic-miktex-2.6.2704.exe" +!define INSTALL_IMAGEMAGICK "ImageMagick-6.3.4-8-Q16-windows-dll.exe" +!define INSTALL_GHOSTSCRIPT "gs857w32.exe" !define INSTALL_VIEWER "gsv48w32.exe" #-------------------------------- @@ -71,7 +82,7 @@ Settings for LyX installer !define APP_SERIES_KEY "15" !define APP_DIR_USERDATA "LyX1.5.x" !define APP_INFO "${APP_NAME} - The Document Processor" -!define APP_COPYRIGHT "LyX is Copyright © 1995 by Matthias Ettrich, 1995-2006 LyX Team" +!define APP_COPYRIGHT "LyX is Copyright © 1995 by Matthias Ettrich, 1995-2007 LyX Team" !define APP_RUN "bin\lyx.exe"