From 304db6158b775c4b11e91c813a999329272d7481 Mon Sep 17 00:00:00 2001 From: Diego Caceres Date: Mon, 11 Jun 2012 18:23:33 +0000 Subject: [PATCH] DFCH: Adding download batch --- .../scripts/download_ThirdPartySW.bat | 210 ++++++++++++++++++ 1 file changed, 210 insertions(+) create mode 100644 Install_ThirdParty/scripts/download_ThirdPartySW.bat diff --git a/Install_ThirdParty/scripts/download_ThirdPartySW.bat b/Install_ThirdParty/scripts/download_ThirdPartySW.bat new file mode 100644 index 0000000..7c96b27 --- /dev/null +++ b/Install_ThirdParty/scripts/download_ThirdPartySW.bat @@ -0,0 +1,210 @@ +@echo off +echo ----------------------------------- +echo --------Download Libraries--------- +echo ----------------------------------- + +echo ----------------------------------- +echo ---Setting Environment Variables--- +echo ----------------------------------- + +set thirdpartyGeneration=%1 +set buildType=%2 + +set urlCreatisSource=http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source +set urlCreatisSource=http://www.creatis.insa-lyon.fr/~caceres/software + +if %PROCESSOR_ARCHITECTURE%==x86 ( + set ProgramFilesPath_x86=%ProgramFiles% + echo "Architecture found = x86" +) else ( + set "ProgramFilesPath_x64=%ProgramFiles%" + set "ProgramFilesPath_x86=%ProgramFiles(x86)%" + echo "Architecture found = x64" +) + +set zipPath="%ProgramFilesPath_x86%\7-Zip\7z.exe" +set miktex="%ProgramFilesPath_x86%\MiKTeX 2.9\miktex\bin\texworks.exe" +set vcvarsall="%ProgramFilesPath_x86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" +set wgetPath="%ProgramFilesPath_x86%\GnuWin32\bin\wget.exe" + +if not exist %zipPath% set zipPath="%ProgramFilesPath_x64%\7-Zip\7z.exe" +if not exist %zipPath% ( + echo ERROR!!! 7Zip has not been found in the system + exit +) +if not exist %vcvarsall% set vcvarsall="%ProgramFilesPath_x64%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" +if not exist %vcvarsall% ( + echo ERROR!!! Visual Studio has not been found in the system + exit +) + +if not exist %miktex% ( + set miktex="%ProgramFilesPath_x64%\MiKTeX 2.9\miktex\bin\texworks.exe" + if not exist %miktex% ( + echo ERROR!!! MiKTex has not been found in the system + exit + ) +) + +if not exist %wgetPath% ( + echo ERROR!!! wget has not been found in the system + exit +) + +set installpath=%thirdpartyGeneration%\thirdparty_install\%buildType% +set binpath=%thirdpartyGeneration%\thirdparty_bin\%buildType% +set sourcepath=%thirdpartyGeneration%\thirdparty_source\%buildType% + +set QTFNAME=qt-everywhere-opensource-src-4.8.2.zip +set WXFNAME=wxWidgets-2.9.3.7z +set BOOSTFNAME=boost_1_49_0.7z +set XERCESFNAME=xerces-c-3.1.1.zip +set ITKFNAME=InsightToolkit-3.20.1.zip +set VTKFNAME=vtk-5.10.0.zip +set GDCMFNAME=gdcm_11_Oct_2011.tar.gz +set TTHFNAME=tth_exe.zip +set JOMFNAME=jom.zip + +echo ----------------------------------- +echo Environment variables Configuration +echo ----------------------------------- +echo ThirdpartyGeneration=%thirdpartyGeneration% +echo BuildType=%buildType% +echo wget=%wgetPath% +echo MikTex=%miktex% +echo urlCreatis=%urlCreatisSource% +echo 7zip=%zipPath% +echo Visual Studio=%vcvarsall% +echo InstallPath=%installpath% +echo BinPath=%binpath% +echo SourcePath=%sourcepath% + +echo ----------------------------------- +echo -------Removing Folders------------ +echo ----------------------------------- + +rmdir /S /Q %thirdpartyGeneration% + +echo ----------------------------------- +echo -------Creating Folders------------ +echo ----------------------------------- + +mkdir %thirdpartyGeneration% +cd %thirdpartyGeneration% +mkdir %sourcepath% +mkdir %binpath% +mkdir %installpath% + +echo ----------------------------------- +echo ------Downloading Sources---------- +echo ----------------------------------- + +cd %sourcepath%\ + +%wgetPath% "http://releases.qt-project.org/qt4/source/%QTFNAME%" +%wgetPath% "http://sourceforge.net/projects/wxwindows/files/2.9.3/%WXFNAME%/download" +%wgetPath% "http://sourceforge.net/projects/boost/files/boost/1.49.0/%BOOSTFNAME%/download" +%wgetPath% "http://mirror.ibcp.fr/pub/apache//xerces/c/3/sources/%XERCESFNAME%" +%wgetPath% "http://sourceforge.net/projects/itk/files/itk/3.20/%ITKFNAME%/download" +%wgetPath% "http://www.vtk.org/files/release/5.10/%VTKFNAME%" +%wgetPath% "%urlCreatisSource%/%GDCMFNAME%" +%wgetPath% "http://hutchinson.belmont.ma.us/tth/tth-noncom/%TTHFNAME%" +%wgetPath% "ftp://ftp.qt.nokia.com/jom/%JOMFNAME%" + +echo ----------------------------------- +echo --------------Qt------------------- +echo ----------------------------------- +call %vcvarsall% + +cd %sourcepath% +%zipPath% x %sourcepath%\%QTFNAME% +del %sourcepath%\%QTFNAME% + +echo ----------------------------------- +echo --------------JOM------------------ +echo ----------------------------------- + +cd %sourcepath% +%zipPath% x %sourcepath%\%JOMFNAME% -o* +del %sourcepath%\%JOMFNAME% + +echo ----------------------------------- +echo -----------wxWidgets--------------- +echo ----------------------------------- +echo ----------Extracting--------------- + +cd %sourcepath% +%zipPath% x %sourcepath%\%WXFNAME% -o* + del %sourcepath%\%WXFNAME% + +echo ----------------------------------- +echo ------------Boost------------------ +echo ----------------------------------- + +cd %sourcepath% +%zipPath% x %sourcepath%\%BOOSTFNAME% +del %sourcepath%\%BOOSTFNAME% + +echo ----------------------------------- +echo -------------VTK------------------- +echo ----------------------------------- + +cd %sourcepath% +%zipPath% x %sourcepath%\%VTKFNAME% +del %sourcepath%\%VTKFNAME% + +echo ----------------------------------- +echo -------------ITK------------------- +echo ----------------------------------- + +cd %sourcepath% +%zipPath% x %ITKFNAME% +del %ITKFNAME% + +echo ----------------------------------- +echo -------------XERCES---------------- +echo ----------------------------------- + +cd %sourcepath% +%zipPath% x %XERCESFNAME% +del %XERCESFNAME% + +echo ----------------------------------- +echo ------------GDCM ------------------ +echo ----------------------------------- + +cd %sourcepath% +%zipPath% x gdcm_11_Oct_2011.tar.gz +%zipPath% x gdcm_11_Oct_2011.tar +del gdcm_11_Oct_2011.tar.gz +del gdcm_11_Oct_2011.tar + +echo ----------------------------------- +echo --------------TTH------------------ +echo ----------------------------------- + +cd %sourcepath% +%zipPath% x %TTHFNAME% +del %TTHFNAME% + +echo ------End TTH Installation--------- + +echo ----------------------------------- + +echo ----------------------------------- +echo --------Renaming Folders----------- +echo ----------------------------------- +cd %sourcepath% +rename qt-everywhere-opensource-src-4.8.2 qt +rename wxWidgets-2.9.3 wxWidgets +rename boost_1_49_0 boost +rename InsightToolkit-3.20.1 itk +rename VTK vtk +rename gdcm gdcm +rename tth_exe tth +rename xerces-c-3.1.1 xerces + +echo -----End of Download Libraries----- +echo ----------------------------------- + +exit /B \ No newline at end of file -- 2.45.0