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
15 set urlCreatisSource=http://www.creatis.insa-lyon.fr/~caceres/software
17 if %PROCESSOR_ARCHITECTURE%==x86 (
18 set ProgramFilesPath_x86=%ProgramFiles%
19 echo "Architecture found = x86"
21 set "ProgramFilesPath_x64=%ProgramFiles%"
22 set "ProgramFilesPath_x86=%ProgramFiles(x86)%"
23 echo "Architecture found = x64"
26 set zipPath="%ProgramFilesPath_x86%\7-Zip\7z.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
36 if not exist %vcvarsall% set vcvarsall="%ProgramFilesPath_x64%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
37 if not exist %vcvarsall% (
38 echo ERROR!!! Visual Studio has not been found in the system
43 if not exist %wgetPath% (
44 echo ERROR!!! wget has not been found in the system
49 set installpath=%thirdpartyGeneration%\thirdparty_install\%buildType%
50 set binpath=%thirdpartyGeneration%\thirdparty_bin\%buildType%
51 set sourcepath=%thirdpartyGeneration%\thirdparty_source\%buildType%
52 set LogFolder=%thirdpartyGeneration%\installLog
54 set QTFNAME=qt-everywhere-opensource-src-4.8.2.zip
57 set WXFNAME=wxWidgets-2.8.12.zip
60 set WXFNAME=wxWidgets-2.9.4.zip
64 REM set BOOSTFNAME=boost_1_49_0.7z
65 set BOOSTFNAME=boost_1_52_0.7z
66 set XERCESFNAME=xerces-c-3.1.1.zip
67 set ITKFNAME=InsightToolkit-3.20.1.zip
68 set VTKFNAME=vtk-5.10.0.zip
69 set GDCMFNAME=gdcm_11_Oct_2011.tar
70 ::set GDCMFNAME=gdcm_05_Mai_2011.tar
71 set TTHFNAME=tth_exe.zip
73 set SQLITEFNAME=sqlite_v3.6.23.1.zip
75 echo -----------------------------------
76 echo Environment variables Configuration
77 echo -----------------------------------
78 echo ThirdpartyGeneration=%thirdpartyGeneration%
79 echo BuildType=%buildType%
81 echo urlCreatis=%urlCreatisSource%
83 echo Visual Studio=%vcvarsall%
84 echo InstallPath=%installpath%
85 echo BinPath=%binpath%
86 echo SourcePath=%sourcepath%
88 echo -----------------------------------
89 echo ------Downloading Sources----------
90 echo -----------------------------------
94 REM%wgetPath% "http://sourceforge.net/projects/itk/files/itk/3.20/%ITKFNAME%/download"
95 REM%wgetPath% "http://sourceforge.net/projects/wxwindows/files/%WXVERSION%/%WXFNAME%/download"
96 REM%wgetPath% "http://sourceforge.net/projects/boost/files/boost/1.49.0/%BOOSTFNAME%/download"
98 if %EEDdownloadQT%==FALSE GOTO SKIPDOWNLOADQT
99 %wgetPath% "http://releases.qt-project.org/qt4/source/%QTFNAME%"
100 %wgetPath% "http://releases.qt-project.org/jom/%JOMFNAME%"
101 echo -----------------------------------
102 echo --------------Qt-------------------
103 echo -----------------------------------
106 %zipPath% x %sourcepath%\%QTFNAME%
107 del %sourcepath%\%QTFNAME%
108 echo -----------------------------------
109 echo --------------JOM------------------
110 echo -----------------------------------
112 %zipPath% x %sourcepath%\%JOMFNAME% -o*
113 del %sourcepath%\%JOMFNAME%
116 if %EEDdownloadITK%==FALSE GOTO SKIPDOWNLOADITK
117 %wgetPath% "http://downloads.sourceforge.net/project/itk/itk/3.20/%ITKFNAME%?r=http%3A%2F%2Fwww.itk.org%2FITK%2Fresources%2Fsoftware.html&ts=1357254419&use_mirror=ufpr"
118 echo -----------------------------------
119 echo -------------ITK-------------------
120 echo -----------------------------------
122 %zipPath% x %ITKFNAME%
126 if %EEDdownloadWXWINDOWS%==FALSE GOTO SKIPDOWNLOADWXWINDOWS
127 %wgetPath% "http://downloads.sourceforge.net/project/wxwindows/%WXVERSION%/%WXFNAME%?r=http%3A%2F%2Fwww.wxwidgets.org%2Fdownloads%2F%23latest_dev&ts=1357255370&use_mirror=ufpr"
128 echo -----------------------------------
129 echo -----------wxWidgets---------------
130 echo -----------------------------------
131 echo ----------Extracting---------------
133 %zipPath% x %sourcepath%\%WXFNAME%
134 del %sourcepath%\%WXFNAME%
135 :SKIPDOWNLOADWXWINDOWS
137 if %EEDdownloadBOOST%==FALSE GOTO SKIPDOWNLOADBOOST
138 REM %wgetPath% "http://downloads.sourceforge.net/project/boost/boost/1.49.0/%BOOSTFNAME%?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fboost%2Ffiles%2Fboost%2F1.49.0%2F&ts=1357255694&use_mirror=hivelocity"
139 %wgetPath% "http://downloads.sourceforge.net/project/boost/boost/1.52.0/boost_1_52_0.7z?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fboost%2Ffiles%2Fboost%2F1.52.0%2Fboost_1_52_0.7z%2Fdownload&ts=1360058777&use_mirror=ignum"
140 echo -----------------------------------
141 echo ------------Boost------------------
142 echo -----------------------------------
144 %zipPath% x %sourcepath%\%BOOSTFNAME%
145 del %sourcepath%\%BOOSTFNAME%
148 if %EEDdownloadXERCES%==FALSE GOTO SKIPDOWNLOADXERCES
149 %wgetPath% "http://mirror.ibcp.fr/pub/apache//xerces/c/3/sources/%XERCESFNAME%"
150 echo -----------------------------------
151 echo -------------XERCES----------------
152 echo -----------------------------------
154 %zipPath% x %XERCESFNAME%
158 if %EEDdownloadVTK%==FALSE GOTO SKIPDOWNLOADVTK
159 %wgetPath% "http://www.vtk.org/files/release/5.10/%VTKFNAME%"
160 echo -----------------------------------
161 echo -------------VTK-------------------
162 echo -----------------------------------
164 %zipPath% x %sourcepath%\%VTKFNAME%
165 del %sourcepath%\%VTKFNAME%
168 if %EEDdownloadGDCM%==FALSE GOTO SKIPDOWNLOADGDCM
169 %wgetPath% "%urlCreatisSource%/%GDCMFNAME%.gz"
170 echo -----------------------------------
171 echo ------------GDCM ------------------
172 echo -----------------------------------
174 %zipPath% x %GDCMFNAME%.gz
175 %zipPath% x %GDCMFNAME%
180 if %EEDdownloadTTH%==FALSE GOTO SKIPDOWNLOADTTH
181 %wgetPath% "http://hutchinson.belmont.ma.us/tth/tth-noncom/%TTHFNAME%"
182 echo -----------------------------------
183 echo --------------TTH------------------
184 echo -----------------------------------
186 %zipPath% x %TTHFNAME%
190 if %EEDdownloadSQLite%==FALSE GOTO SKIPDOWNLOADSQLITE
191 %wgetPath% "http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/%SQLITEFNAME%"
192 echo ------------------------------------------------
193 echo --------------SQLite (creatis)------------------
194 echo ------------------------------------------------
196 %zipPath% x %SQLITEFNAME%
201 echo -----------------------------------
202 echo --------Renaming Folders-----------
203 echo -----------------------------------
205 rename qt-everywhere-opensource-src-4.8.2 qt
206 rename wxWidgets-%WXVERSION% wxWidgets
207 REM rename boost_1_49_0 boost
208 rename boost_1_52_0 boost
209 rename InsightToolkit-3.20.1 itk
213 rename xerces-c-3.1.1 xerces
214 rename sqlite_v3.6.23.1 sqlite
216 echo -----End of Download Libraries-----
217 echo -----------------------------------
218 echo -----------------------------------