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 zipPath="%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.47.0
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%
107 echo ---End Setting Global Variables----
108 echo -----------------------------------
112 echo -----------------------------------
113 echo -------Creating Folders------------
114 echo -----------------------------------
116 rmdir %binpath% /s /q
118 rmdir %thirdpartyGeneration% /s /q
119 mkdir %thirdpartyGeneration%
120 cd %thirdpartyGeneration%
121 mkdir thirdparty_source
123 mkdir thirdparty_install
126 echo ------End Creating Folders---------
128 echo -----------------------------------
129 echo ------Downloading Sources----------
130 echo -----------------------------------
132 cd %thirdpartyGeneration%\thirdparty_source\
133 %wgetPath% %urlCreatisSource%/qt-4.7.3.zip
134 %wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z
135 %wgetPath% %urlCreatisSource%/boost_1_47_0.7z
136 %wgetPath% %urlCreatisSource%/vtk-5.8.0.tar.gz
137 %wgetPath% %urlCreatisSource%/InsightToolkit-3.20.0.zip
138 %wgetPath% %urlCreatisSource%/gdcm_11_Oct_2011.tar.gz
139 %wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip
140 %wgetPath% %urlCreatisSource%/tth_exe.zip
141 echo ------End Downloading Sources------
143 echo -----------------------------------
144 echo --------Qt Installation------------
145 echo -----------------------------------
146 echo ----------Extracting---------------
149 %zipPath% x %sourcepath%\qt-4.7.3.zip
150 del %sourcepath%\qt-4.7.3.zip
152 echo --------Renaming Folder------------
154 rename qt-everywhere-opensource-src-4.7.3 %qt%
156 echo ----------Installing---------------
161 echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
166 echo ------End QT Installation----------
168 echo -----------------------------------
169 echo -----wxWidgets Installation--------
170 echo -----------------------------------
171 echo ----------Extracting---------------
176 %zipPath% x %sourcepath%\wxWidgets-2.9.2.7z
177 del %sourcepath%\wxWidgets-2.9.2.7z
179 echo ----------Installing---------------
181 cd %sourcepath%\%wxWidgets%\build\msw
182 nmake -f makefile.vc BUILD=%buildType% UNICODE=1 SHARED=1
185 echo ----End wxWidgets Installation-----
187 echo -----------------------------------
188 echo ------Boost Installation-----------
189 echo -----------------------------------
190 echo ----------Extracting---------------
193 %zipPath% x %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
194 del %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
196 echo --------Renaming Folder------------
198 rename boost_1_47_0 %boost%
200 echo ----------Installing---------------
202 cd %sourcepath%\%boost%
204 b2.exe --toolset=msvc-10.0 --build-type=complete stage
207 echo -----End Boost Installation--------
209 echo -----------------------------------
210 echo -------ITK Installation------------
211 echo -----------------------------------
212 echo ----------Extracting---------------
215 %zipPath% x InsightToolkit-3.20.0.zip
216 del InsightToolkit-3.20.0.zip
218 echo ----------Installing---------------
223 cmake -G"Visual Studio 10" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin
224 cmake -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%itk%\ -D BUILD_EXAMPLES:BOOL=OFF -D BUILD_TESTING:BOOL=OFF -D BUILD_SHARED_LIBS:BOOL=ON -D ITK_USE_REVIEW:BOOL=ON CMakeCache.txt
225 cmake -D USE_DEBUG_LIB:BOOL=%buildType% CMakeCache.txt
227 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
228 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
231 echo ------End ITK Installation---------
233 echo -----------------------------------
234 echo ------XERCES Installation----------
235 echo -----------------------------------
236 echo ----------Extracting---------------
239 %zipPath% x xerces-c-3.1.1.zip
240 del xerces-c-3.1.1.zip
242 echo ----------Installing---------------
244 cd %sourcepath%\%xercesc%\projects\Win32\VC10\xerces-all
245 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=build
246 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
247 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
249 echo -----End XERCES Installation-------
251 echo -----------------------------------
252 echo -------VTK Installation------------
253 echo -----------------------------------
254 echo ----------Extracting---------------
257 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz
258 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
259 cd %thirdpartyGeneration%\thirdparty_source\VTK
260 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz
261 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
263 echo ----------Installing---------------
269 cmake -G"Visual Studio 10" -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin
270 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%vtk%\ CMakeCache.txt
271 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
273 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
274 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
276 echo ------End VTK Installation---------
278 echo -----------------------------------
279 echo -------GDCM Installation-----------
280 echo -----------------------------------
281 echo ----------Extracting---------------
284 %zipPath% x gdcm_11_Oct_2011.tar.gz
285 %zipPath% x gdcm_11_Oct_2011.tar
286 del gdcm_11_Oct_2011.tar.gz
287 del gdcm_11_Oct_2011.tar
289 echo ----------Installing---------------
296 cmake -G"Visual Studio 10" -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin
297 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%gdcm%\ CMakeCache.txt
298 cmake -D VTK_DIR:PATH=%binpath%\%vtk%Bin -D GDCM_VTK:BOOL=ON -D BUILD_TESTING:BOOL=OFF -D GDCM_NAME_SPACE:STRING=gdcm13 CMakeCache.txt
300 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
301 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
304 echo -----End GDCM Installation---------
306 echo -----------------------------------
307 echo -------TTH Installation------------
308 echo -----------------------------------
309 echo ----------Extracting---------------
311 %zipPath% x tth_exe.zip
314 echo ------End TTH Installation---------
316 echo -----------------------------------
317 echo ---End of Installing Libraries-----
318 echo -----------------------------------