2 echo -----------------------------------
3 echo --------Download Libraries---------
4 echo -----------------------------------
6 echo -----------------------------------
7 echo ---Setting Environment Variables---
8 echo -----------------------------------
10 set thirdpartyGeneration=%1
14 set urlCreatisSource=http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source
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
61 set WXFNAME=wxWidgets-2.8.12.zip
64 set WXFNAME=wxWidgets-2.9.3.zip
68 set BOOSTFNAME=boost_1_49_0.7z
69 set XERCESFNAME=xerces-c-3.1.1.zip
70 set ITKFNAME=InsightToolkit-3.20.1.zip
71 set VTKFNAME=vtk-5.10.0.zip
72 ::set GDCMFNAME=gdcm_11_Oct_2011.tar.gz
73 set GDCMFNAME=gdcm_05_Mai_2011.tar
74 set TTHFNAME=tth_exe.zip
77 echo -----------------------------------
78 echo Environment variables Configuration
79 echo -----------------------------------
80 echo ThirdpartyGeneration=%thirdpartyGeneration%
81 echo BuildType=%buildType%
84 echo urlCreatis=%urlCreatisSource%
86 echo Visual Studio=%vcvarsall%
87 echo InstallPath=%installpath%
88 echo BinPath=%binpath%
89 echo SourcePath=%sourcepath%
91 echo -----------------------------------
92 echo -------Removing Folders------------
93 echo -----------------------------------
95 rmdir /S /Q %thirdpartyGeneration%
97 echo -----------------------------------
98 echo -------Creating Folders------------
99 echo -----------------------------------
101 mkdir %thirdpartyGeneration%
102 cd %thirdpartyGeneration%
107 echo -----------------------------------
108 echo ------Downloading Sources----------
109 echo -----------------------------------
113 %wgetPath% "http://releases.qt-project.org/qt4/source/%QTFNAME%"
114 %wgetPath% "http://sourceforge.net/projects/wxwindows/files/%WXVERSION%/%WXFNAME%/download"
115 %wgetPath% "http://sourceforge.net/projects/boost/files/boost/1.49.0/%BOOSTFNAME%/download"
116 %wgetPath% "http://mirror.ibcp.fr/pub/apache//xerces/c/3/sources/%XERCESFNAME%"
117 %wgetPath% "http://sourceforge.net/projects/itk/files/itk/3.20/%ITKFNAME%/download"
118 %wgetPath% "http://www.vtk.org/files/release/5.10/%VTKFNAME%"
119 %wgetPath% "%urlCreatisSource%/%GDCMFNAME%.gz"
120 %wgetPath% "http://hutchinson.belmont.ma.us/tth/tth-noncom/%TTHFNAME%"
121 %wgetPath% "ftp://ftp.qt.nokia.com/jom/%JOMFNAME%"
123 echo -----------------------------------
124 echo --------------Qt-------------------
125 echo -----------------------------------
129 %zipPath% x %sourcepath%\%QTFNAME%
130 del %sourcepath%\%QTFNAME%
132 echo -----------------------------------
133 echo --------------JOM------------------
134 echo -----------------------------------
137 %zipPath% x %sourcepath%\%JOMFNAME% -o*
138 del %sourcepath%\%JOMFNAME%
140 echo -----------------------------------
141 echo -----------wxWidgets---------------
142 echo -----------------------------------
143 echo ----------Extracting---------------
146 %zipPath% x %sourcepath%\%WXFNAME%
147 del %sourcepath%\%WXFNAME%
149 echo -----------------------------------
150 echo ------------Boost------------------
151 echo -----------------------------------
154 %zipPath% x %sourcepath%\%BOOSTFNAME%
155 del %sourcepath%\%BOOSTFNAME%
157 echo -----------------------------------
158 echo -------------VTK-------------------
159 echo -----------------------------------
162 %zipPath% x %sourcepath%\%VTKFNAME%
163 del %sourcepath%\%VTKFNAME%
165 echo -----------------------------------
166 echo -------------ITK-------------------
167 echo -----------------------------------
170 %zipPath% x %ITKFNAME%
173 echo -----------------------------------
174 echo -------------XERCES----------------
175 echo -----------------------------------
178 %zipPath% x %XERCESFNAME%
181 echo -----------------------------------
182 echo ------------GDCM ------------------
183 echo -----------------------------------
186 %zipPath% x %GDCMFNAME%.gz
187 %zipPath% x %GDCMFNAME%
191 echo -----------------------------------
192 echo --------------TTH------------------
193 echo -----------------------------------
196 %zipPath% x %TTHFNAME%
199 echo ------End TTH Installation---------
201 echo -----------------------------------
203 echo -----------------------------------
204 echo --------Renaming Folders-----------
205 echo -----------------------------------
207 rename qt-everywhere-opensource-src-4.8.2 qt
208 rename wxWidgets-%WXVERSION% wxWidgets
209 rename boost_1_49_0 boost
210 rename InsightToolkit-3.20.1 itk
214 rename xerces-c-3.1.1 xerces
216 echo -----End of Download Libraries-----
217 echo -----------------------------------