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
74 echo -----------------------------------
75 echo Environment variables Configuration
76 echo -----------------------------------
77 echo ThirdpartyGeneration=%thirdpartyGeneration%
78 echo BuildType=%buildType%
80 echo urlCreatis=%urlCreatisSource%
82 echo Visual Studio=%vcvarsall%
83 echo InstallPath=%installpath%
84 echo BinPath=%binpath%
85 echo SourcePath=%sourcepath%
87 echo -----------------------------------
88 echo ------Downloading Sources----------
89 echo -----------------------------------
93 REM%wgetPath% "http://sourceforge.net/projects/itk/files/itk/3.20/%ITKFNAME%/download"
94 REM%wgetPath% "http://sourceforge.net/projects/wxwindows/files/%WXVERSION%/%WXFNAME%/download"
95 REM%wgetPath% "http://sourceforge.net/projects/boost/files/boost/1.49.0/%BOOSTFNAME%/download"
97 if %EEDdownloadQT%==FALSE GOTO SKIPDOWNLOADQT
98 %wgetPath% "http://releases.qt-project.org/qt4/source/%QTFNAME%"
99 %wgetPath% "http://releases.qt-project.org/jom/%JOMFNAME%"
100 echo -----------------------------------
101 echo --------------Qt-------------------
102 echo -----------------------------------
105 %zipPath% x %sourcepath%\%QTFNAME%
106 del %sourcepath%\%QTFNAME%
107 echo -----------------------------------
108 echo --------------JOM------------------
109 echo -----------------------------------
111 %zipPath% x %sourcepath%\%JOMFNAME% -o*
112 del %sourcepath%\%JOMFNAME%
115 if %EEDdownloadITK%==FALSE GOTO SKIPDOWNLOADITK
116 %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"
117 echo -----------------------------------
118 echo -------------ITK-------------------
119 echo -----------------------------------
121 %zipPath% x %ITKFNAME%
125 if %EEDdownloadWXWINDOWS%==FALSE GOTO SKIPDOWNLOADWXWINDOWS
126 %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"
127 echo -----------------------------------
128 echo -----------wxWidgets---------------
129 echo -----------------------------------
130 echo ----------Extracting---------------
132 %zipPath% x %sourcepath%\%WXFNAME%
133 del %sourcepath%\%WXFNAME%
134 :SKIPDOWNLOADWXWINDOWS
136 if %EEDdownloadBOOST%==FALSE GOTO SKIPDOWNLOADBOOST
137 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"
138 %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"
139 echo -----------------------------------
140 echo ------------Boost------------------
141 echo -----------------------------------
143 %zipPath% x %sourcepath%\%BOOSTFNAME%
144 del %sourcepath%\%BOOSTFNAME%
147 if %EEDdownloadXERCES%==FALSE GOTO SKIPDOWNLOADXERCES
148 %wgetPath% "http://mirror.ibcp.fr/pub/apache//xerces/c/3/sources/%XERCESFNAME%"
149 echo -----------------------------------
150 echo -------------XERCES----------------
151 echo -----------------------------------
153 %zipPath% x %XERCESFNAME%
157 if %EEDdownloadVTK%==FALSE GOTO SKIPDOWNLOADVTK
158 %wgetPath% "http://www.vtk.org/files/release/5.10/%VTKFNAME%"
159 echo -----------------------------------
160 echo -------------VTK-------------------
161 echo -----------------------------------
163 %zipPath% x %sourcepath%\%VTKFNAME%
164 del %sourcepath%\%VTKFNAME%
167 if %EEDdownloadGDCM%==FALSE GOTO SKIPDOWNLOADGDCM
168 %wgetPath% "%urlCreatisSource%/%GDCMFNAME%.gz"
169 echo -----------------------------------
170 echo ------------GDCM ------------------
171 echo -----------------------------------
173 %zipPath% x %GDCMFNAME%.gz
174 %zipPath% x %GDCMFNAME%
179 if %EEDdownloadTTH%==FALSE GOTO SKIPDOWNLOADTTH
180 %wgetPath% "http://hutchinson.belmont.ma.us/tth/tth-noncom/%TTHFNAME%"
181 echo -----------------------------------
182 echo --------------TTH------------------
183 echo -----------------------------------
185 %zipPath% x %TTHFNAME%
191 echo -----------------------------------
192 echo --------Renaming Folders-----------
193 echo -----------------------------------
195 rename qt-everywhere-opensource-src-4.8.2 qt
196 rename wxWidgets-%WXVERSION% wxWidgets
197 REM rename boost_1_49_0 boost
198 rename boost_1_52_0 boost
199 rename InsightToolkit-3.20.1 itk
203 rename xerces-c-3.1.1 xerces
205 echo -----End of Download Libraries-----
206 echo -----------------------------------
207 echo -----------------------------------