2 echo -----------------------------------
3 echo --------Download Libraries---------
4 echo -----------------------------------
6 echo -----------------------------------
7 echo ---Setting Environment Variables---
8 echo -----------------------------------
10 set thirdpartyGeneration=%1
13 set urlCreatisSource=http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source
14 set urlCreatisSource=http://www.creatis.insa-lyon.fr/~caceres/software
16 if %PROCESSOR_ARCHITECTURE%==x86 (
17 set ProgramFilesPath_x86=%ProgramFiles%
18 echo "Architecture found = x86"
20 set "ProgramFilesPath_x64=%ProgramFiles%"
21 set "ProgramFilesPath_x86=%ProgramFiles(x86)%"
22 echo "Architecture found = x64"
25 set zipPath="%ProgramFilesPath_x86%\7-Zip\7z.exe"
26 set miktex="%ProgramFilesPath_x86%\MiKTeX 2.9\miktex\bin\texworks.exe"
27 set vcvarsall="%ProgramFilesPath_x86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
28 set wgetPath="%ProgramFilesPath_x86%\GnuWin32\bin\wget.exe"
30 if not exist %zipPath% set zipPath="%ProgramFilesPath_x64%\7-Zip\7z.exe"
31 if not exist %zipPath% (
32 echo ERROR!!! 7Zip has not been found in the system
35 if not exist %vcvarsall% set vcvarsall="%ProgramFilesPath_x64%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
36 if not exist %vcvarsall% (
37 echo ERROR!!! Visual Studio has not been found in the system
41 if not exist %miktex% (
42 set miktex="%ProgramFilesPath_x64%\MiKTeX 2.9\miktex\bin\texworks.exe"
43 if not exist %miktex% (
44 echo ERROR!!! MiKTex has not been found in the system
49 if not exist %wgetPath% (
50 echo ERROR!!! wget has not been found in the system
54 set installpath=%thirdpartyGeneration%\thirdparty_install\%buildType%
55 set binpath=%thirdpartyGeneration%\thirdparty_bin\%buildType%
56 set sourcepath=%thirdpartyGeneration%\thirdparty_source\%buildType%
58 set QTFNAME=qt-everywhere-opensource-src-4.8.2.zip
59 set WXFNAME=wxWidgets-2.9.3.7z
60 set BOOSTFNAME=boost_1_49_0.7z
61 set XERCESFNAME=xerces-c-3.1.1.zip
62 set ITKFNAME=InsightToolkit-3.20.1.zip
63 set VTKFNAME=vtk-5.10.0.zip
64 set GDCMFNAME=gdcm_11_Oct_2011.tar.gz
65 set TTHFNAME=tth_exe.zip
68 echo -----------------------------------
69 echo Environment variables Configuration
70 echo -----------------------------------
71 echo ThirdpartyGeneration=%thirdpartyGeneration%
72 echo BuildType=%buildType%
75 echo urlCreatis=%urlCreatisSource%
77 echo Visual Studio=%vcvarsall%
78 echo InstallPath=%installpath%
79 echo BinPath=%binpath%
80 echo SourcePath=%sourcepath%
82 echo -----------------------------------
83 echo -------Removing Folders------------
84 echo -----------------------------------
86 rmdir /S /Q %thirdpartyGeneration%
88 echo -----------------------------------
89 echo -------Creating Folders------------
90 echo -----------------------------------
92 mkdir %thirdpartyGeneration%
93 cd %thirdpartyGeneration%
98 echo -----------------------------------
99 echo ------Downloading Sources----------
100 echo -----------------------------------
104 %wgetPath% "http://releases.qt-project.org/qt4/source/%QTFNAME%"
105 %wgetPath% "http://sourceforge.net/projects/wxwindows/files/2.9.3/%WXFNAME%/download"
106 %wgetPath% "http://sourceforge.net/projects/boost/files/boost/1.49.0/%BOOSTFNAME%/download"
107 %wgetPath% "http://mirror.ibcp.fr/pub/apache//xerces/c/3/sources/%XERCESFNAME%"
108 %wgetPath% "http://sourceforge.net/projects/itk/files/itk/3.20/%ITKFNAME%/download"
109 %wgetPath% "http://www.vtk.org/files/release/5.10/%VTKFNAME%"
110 %wgetPath% "%urlCreatisSource%/%GDCMFNAME%"
111 %wgetPath% "http://hutchinson.belmont.ma.us/tth/tth-noncom/%TTHFNAME%"
112 %wgetPath% "ftp://ftp.qt.nokia.com/jom/%JOMFNAME%"
114 echo -----------------------------------
115 echo --------------Qt-------------------
116 echo -----------------------------------
120 %zipPath% x %sourcepath%\%QTFNAME%
121 del %sourcepath%\%QTFNAME%
123 echo -----------------------------------
124 echo --------------JOM------------------
125 echo -----------------------------------
128 %zipPath% x %sourcepath%\%JOMFNAME% -o*
129 del %sourcepath%\%JOMFNAME%
131 echo -----------------------------------
132 echo -----------wxWidgets---------------
133 echo -----------------------------------
134 echo ----------Extracting---------------
137 %zipPath% x %sourcepath%\%WXFNAME% -o*
138 del %sourcepath%\%WXFNAME%
140 echo -----------------------------------
141 echo ------------Boost------------------
142 echo -----------------------------------
145 %zipPath% x %sourcepath%\%BOOSTFNAME%
146 del %sourcepath%\%BOOSTFNAME%
148 echo -----------------------------------
149 echo -------------VTK-------------------
150 echo -----------------------------------
153 %zipPath% x %sourcepath%\%VTKFNAME%
154 del %sourcepath%\%VTKFNAME%
156 echo -----------------------------------
157 echo -------------ITK-------------------
158 echo -----------------------------------
161 %zipPath% x %ITKFNAME%
164 echo -----------------------------------
165 echo -------------XERCES----------------
166 echo -----------------------------------
169 %zipPath% x %XERCESFNAME%
172 echo -----------------------------------
173 echo ------------GDCM ------------------
174 echo -----------------------------------
177 %zipPath% x gdcm_11_Oct_2011.tar.gz
178 %zipPath% x gdcm_11_Oct_2011.tar
179 del gdcm_11_Oct_2011.tar.gz
180 del gdcm_11_Oct_2011.tar
182 echo -----------------------------------
183 echo --------------TTH------------------
184 echo -----------------------------------
187 %zipPath% x %TTHFNAME%
190 echo ------End TTH Installation---------
192 echo -----------------------------------
194 echo -----------------------------------
195 echo --------Renaming Folders-----------
196 echo -----------------------------------
198 rename qt-everywhere-opensource-src-4.8.2 qt
199 rename wxWidgets-2.9.3 wxWidgets
200 rename boost_1_49_0 boost
201 rename InsightToolkit-3.20.1 itk
205 rename xerces-c-3.1.1 xerces
207 echo -----End of Download Libraries-----
208 echo -----------------------------------