REM --------------------------------------------------------------------- REM REM Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image REM pour la Santé) REM Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton REM REM This software is governed by the CeCILL-B license under French law and REM abiding by the rules of distribution of free software. You can use, REM modify and/ or redistribute the software under the terms of the CeCILL-B REM license as circulated by CEA, CNRS and INRIA at the following URL REM http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html REM or in the file LICENSE.txt. REM REM As a counterpart to the access to the source code and rights to copy, REM modify and redistribute granted by the license, users are provided only REM with a limited warranty and the software's author, the holder of the REM economic rights, and the successive licensors have only limited REM liability. REM REM The fact that you are presently reading this means that you have had REM knowledge of the CeCILL-B license and that you accept its terms. REM ------------------------------------------------------------------------ @echo off echo ----------------------------------- echo --------Download Libraries--------- echo ----------------------------------- echo ----------------------------------- echo ---Setting Environment Variables--- echo ----------------------------------- set thirdpartyGeneration=%1 set buildType=%2 set wxStable=%3 :: 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 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 %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 LogFolder=%thirdpartyGeneration%\installLog set QTFNAME=qt-everywhere-opensource-src-4.8.2.zip if %wxStable%==ON ( set WXFNAME=wxWidgets-2.8.12.zip set WXVERSION=2.8.12 ) else ( set WXFNAME=wxWidgets-2.9.3.zip set WXVERSION=2.9.2 ) else 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 ::set GDCMFNAME=gdcm_05_Mai_2011.tar 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 urlCreatis=%urlCreatisSource% echo 7zip=%zipPath% echo Visual Studio=%vcvarsall% echo InstallPath=%installpath% echo BinPath=%binpath% echo SourcePath=%sourcepath% echo ----------------------------------- echo ------Downloading Sources---------- echo ----------------------------------- cd %sourcepath%\ %wgetPath% "http://releases.qt-project.org/qt4/source/%QTFNAME%" %wgetPath% "http://sourceforge.net/projects/wxwindows/files/%WXVERSION%/%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%.gz" %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% 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 ------------GDCM ------------------ echo ----------------------------------- cd %sourcepath% %zipPath% x %GDCMFNAME%.gz %zipPath% x %GDCMFNAME% del %GDCMFNAME%.gz del %GDCMFNAME% echo ----------------------------------- echo -------------ITK------------------- echo ----------------------------------- cd %sourcepath% %zipPath% x %ITKFNAME% del %ITKFNAME% echo ----------------------------------- echo -------------XERCES---------------- echo ----------------------------------- cd %sourcepath% %zipPath% x %XERCESFNAME% del %XERCESFNAME% 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-%WXVERSION% wxWidgets rename boost_1_49_0 boost rename InsightToolkit-3.20.1 itk rename VTK vtk rename gdcm gdcm13 rename tth_exe tth rename xerces-c-3.1.1 xerces echo -----End of Download Libraries----- echo ----------------------------------- echo ----------------------------------- exit /B