2 echo -----------------------------------
3 echo ------Installing Libraries---------
4 echo -----------------------------------
5 echo -----------------------------------
6 echo ------Asking Architecture----------
7 echo -----------------------------------
8 if %PROCESSOR_ARCHITECTURE%==x86 (
9 set ProgramFilesPath_x86=%ProgramFiles%
10 echo "Architecture found = x86"
12 set "ProgramFilesPath_x64=%ProgramFiles%"
13 set "ProgramFilesPath_x86=%ProgramFiles(x86)%"
14 echo "Architecture found = x64"
17 echo ----End Asking Architecture--------
19 echo -----------------------------------
20 echo ---Setting Environment Variables---
21 echo -----------------------------------
23 set thirdpartyGeneration=%1
26 set urlCreatisSource=http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source
27 set urlCreatisSource=http://www.creatis.insa-lyon.fr/~caceres/software
29 set zipPath="%ProgramFilesPath_x86%\7-Zip\7z.exe"
30 set miktex="%ProgramFilesPath_x86%\MiKTeX 2.9\miktex\bin\texworks.exe"
31 set vcvarsall="%ProgramFilesPath_x86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
32 set wgetPath=%cd%\..\..\windows\creaTools_win_installers\CreaTools_v2_0_0_win32_installer\bin\wget.exe
34 if not exist %zipPath% set zipPath="%ProgramFilesPath_x64%\7-Zip\7z.exe"
35 if not exist %zipPath% (
36 echo ERROR!!! 7Zip has not been found in the system
39 if not exist %vcvarsall% set vcvarsall="%ProgramFilesPath_x64%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
40 if not exist %vcvarsall% (
41 echo ERROR!!! Visual Studio has not been found in the system
45 if not exist %miktex% (
46 set miktex="%ProgramFilesPath_x64%\MiKTeX 2.9\miktex\bin\texworks.exe"
47 if not exist %miktex% (
48 echo ERROR!!! MiKTex has not been found in the system
53 if not exist %wgetPath% (
54 echo ERROR!!! wget has not been found in the system
59 set installpath=%thirdpartyGeneration%\thirdparty_install
60 set binpath=%thirdpartyGeneration%\thirdparty_bin
61 set sourcepath=%thirdpartyGeneration%\thirdparty_source
64 set wxWidgets=wxWidgets-2.9.2
65 set boost=Boost-1.46.1
66 set xercesc=xerces-c-3.1.1
67 set itk=InsightToolkit-3.20.0
71 set QTDIR=%sourcepath%\%qt%
72 set WXDIR=%sourcepath%\%wxWidgets%
73 set BOOSTDIR=%sourcepath%\%boost%
74 set XERCESDIR=%sourcepath%\%xercesc%
75 set ITKSRCDIR=%sourcepath%\%itk%
76 set VTKSRCDIR=%sourcepath%\%VTK%
77 set GDCMSRCDIR=%sourcepath%\%gdcm%
79 echo -----------------------------------
80 echo Environment variables Configuration
81 echo -----------------------------------
82 echo ThirdpartyGeneration=%thirdpartyGeneration%
83 echo BuildType=%buildType%
86 echo urlCreatis=%urlCreatisSource%
88 echo Visual Studio=%vcvarsall%
89 echo InstallPath=%installpath%
90 echo BinPath=%binpath%
91 echo SourcePath=%sourcepath%
95 echo Xercesc=%xercesc%
101 echo BOOSTDIR=%BOOSTDIR%
102 echo XERCESDIR=%XERCESDIR%
103 echo ITKSRCDIR=%ITKSRCDIR%
104 echo VTKSRCDIR=%VTKSRCDIR%
105 echo GDCMDIR=%GDCMSRCDIR%
108 echo -----------------------------------
109 echo ---End Setting Global Variables----
110 echo -----------------------------------
114 echo -----------------------------------
115 echo -------Creating Folders------------
116 echo -----------------------------------
118 rmdir %binpath% /s /q
120 rmdir %thirdpartyGeneration% /s /q
121 mkdir %thirdpartyGeneration%
122 cd %thirdpartyGeneration%
123 mkdir thirdparty_source
125 mkdir thirdparty_install
128 echo ------End Creating Folders---------
130 echo -----------------------------------
131 echo ------Downloading Sources----------
132 echo -----------------------------------
134 cd %thirdpartyGeneration%\thirdparty_source\
135 %wgetPath% %urlCreatisSource%/qt-4.7.3.zip
136 %wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z
137 %wgetPath% %urlCreatisSource%/boost_1_47_0.7z
138 %wgetPath% %urlCreatisSource%/vtk-5.8.0.tar.gz
139 %wgetPath% %urlCreatisSource%/InsightToolkit-3.20.0.zip
140 %wgetPath% %urlCreatisSource%/gdcm_11_Oct_2011.tar.gz
141 %wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip
142 %wgetPath% %urlCreatisSource%/tth_exe.zip
143 echo ------End Downloading Sources------
145 echo -----------------------------------
146 echo --------Qt Installation------------
147 echo -----------------------------------
148 echo ----------Extracting---------------
151 %zipPath% x %sourcepath%\qt-4.7.3.zip
152 del %sourcepath%\qt-4.7.3.zip
154 echo --------Renaming Folder------------
156 rename qt-everywhere-opensource-src-4.7.3 %qt%
158 echo ----------Installing---------------
163 echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
168 echo ------End QT Installation----------
170 echo -----------------------------------
171 echo -----wxWidgets Installation--------
172 echo -----------------------------------
173 echo ----------Extracting---------------
178 %zipPath% x %sourcepath%\wxWidgets-2.9.2.7z
179 del %sourcepath%\wxWidgets-2.9.2.7z
181 echo ----------Installing---------------
183 cd %sourcepath%\%wxWidgets%\build\msw
184 nmake -f makefile.vc BUILD=%buildType% UNICODE=0 SHARED=1
187 echo ----End wxWidgets Installation-----
189 echo -----------------------------------
190 echo ------Boost Installation-----------
191 echo -----------------------------------
192 echo ----------Extracting---------------
195 %zipPath% x %thirdpartyGeneration%\thirdparty_source\boost_1_46_1.7z
196 del %thirdpartyGeneration%\thirdparty_source\boost_1_46_1.7z
198 echo --------Renaming Folder------------
200 rename boost_1_46_1 %boost%
202 echo ----------Installing---------------
204 mkdir %binpath%\%boost%Bin
205 mkdir %installpath%\%boost%
207 cd %sourcepath%\%boost%
210 bjam.exe --toolset=msvc-10.0 --build-type=complete --build-dir=%binpath%\%boost%Bin --link=shared --runtime-link=shared --prefix=%installpath%\%boost% install
213 echo -----End Boost Installation--------
215 echo -----------------------------------
216 echo -------VTK Installation------------
217 echo -----------------------------------
218 echo ----------Extracting---------------
221 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz
222 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
223 cd %thirdpartyGeneration%\thirdparty_source\VTK
224 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz
225 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
227 echo ----------Installing---------------
233 cmake -G"Visual Studio 10" -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin
234 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%vtk%\ CMakeCache.txt
235 cmake -D BUILD_EXAMPLES:BOOL=OFF -D BUILD_TESTING:BOOL=OFF -D BUILD_SHARED_LIBS:BOOL=ON -D VTK_USE_QT:BOOL=ON CMakeCache.txt
237 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
238 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
240 echo ------End VTK Installation---------
242 echo -----------------------------------
243 echo -------ITK Installation------------
244 echo -----------------------------------
245 echo ----------Extracting---------------
248 %zipPath% x InsightToolkit-3.20.0.zip
249 del InsightToolkit-3.20.0.zip
251 echo ----------Installing---------------
256 cmake -G"Visual Studio 10" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin
257 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%itk%\ CMakeCache.txt
258 cmake -D BUILD_EXAMPLES:BOOL=OFF -D BUILD_TESTING:BOOL=OFF -D BUILD_SHARED_LIBS:BOOL=ON -D ITK_USE_REVIEW:BOOL=ON CMakeCache.txt
260 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
261 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
264 echo ------End ITK Installation---------
266 echo -----------------------------------
267 echo ------XERCES Installation----------
268 echo -----------------------------------
269 echo ----------Extracting---------------
272 %zipPath% x xerces-c-3.1.1.zip
273 del xerces-c-3.1.1.zip
275 echo ----------Installing---------------
277 cd %sourcepath%\%xercesc%\projects\Win32\VC10\xerces-all
278 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=build
279 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
280 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
282 echo -----End XERCES Installation-------
286 echo -----------------------------------
287 echo -------GDCM Installation-----------
288 echo -----------------------------------
289 echo ----------Extracting---------------
292 %zipPath% x gdcm_11_Oct_2011.tar.gz
293 %zipPath% x gdcm_11_Oct_2011.tar
294 del gdcm_11_Oct_2011.tar.gz
295 del gdcm_11_Oct_2011.tar
297 echo ----------Installing---------------
304 cmake -G"Visual Studio 10" -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin
305 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%gdcm%\ CMakeCache.txt
306 cmake -D VTK_DIR:PATH=%installpath%\%vtk%\ -D GDCM_VTK:BOOL=ON -D BUILD_TESTING:BOOL=OFF -D GDCM_NAME_SPACE:STRING=gdcm13 CMakeCache.txt
308 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
309 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
312 echo -----End GDCM Installation---------
314 echo -----------------------------------
315 echo -------TTH Installation------------
316 echo -----------------------------------
317 echo ----------Extracting---------------
319 %zipPath% x tth_exe.zip
322 echo ------End TTH Installation---------
324 echo -----------------------------------
325 echo ---End of Installing Libraries-----
326 echo -----------------------------------