]> Creatis software - creaToolsTools.git/blob - Install_ThirdParty/scripts/install_thirdparty_all.bat
DFCH Last update install.bat (GDCM is now working) :)
[creaToolsTools.git] / Install_ThirdParty / scripts / install_thirdparty_all.bat
1 @echo off
2 echo -----------------------------------
3 echo ------Asking Architecture----------
4 echo -----------------------------------
5 if %PROCESSOR_ARCHITECTURE%==x86 (
6 @echo on
7   set ProgramFilesPath=%ProgramFiles%
8 @echo off
9 ) else (
10 @echo on
11   set "ProgramFilesPath=%ProgramFiles(x86)%"
12 @echo off
13 )
14
15 echo ----End Asking Architecture--------
16
17 echo -----------------------------------
18 echo ---Setting Enviroment Variables----
19 echo -----------------------------------
20
21 @echo on
22 set thirdpartyGeneration=%1
23 set buildType=%2
24
25 set wgetPath=%cd%\..\..\windows\creaTools_win_installers\CreaTools_v2_0_0_win32_installer\bin\wget.exe
26 set zipPath="%ProgramFilesPath%\7-Zip\7z.exe"
27 set urlCreatisSource=http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source
28 set urlCreatisSource=http://www.creatis.insa-lyon.fr/~caceres/software
29 set vcvarsall="%ProgramFilesPath%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
30
31 set installpath=%thirdpartyGeneration%\thirdparty_install
32 set binpath=%thirdpartyGeneration%\thirdparty_bin
33 set sourcepath=%thirdpartyGeneration%\thirdparty_source
34
35 set xercesc=xerces-c-3.1.1
36 set itk=InsightToolkit-3.20.0
37 set gdcm=gdcm
38 set vtk=VTK
39
40 set QTDIR=%thirdpartyGeneration%\thirdparty_source\Qt\4.7.3\
41 set WXDIR=%thirdpartyGeneration%\thirdparty_source\wxWidgets\2.9.2\
42 set BOOSTDIR=%thirdpartyGeneration%\thirdparty_source\Boost\1.47.0\
43
44
45 @echo off
46 echo ---End Setting Global Variables----
47 echo -----------------------------------
48 @echo on
49 call %vcvarsall%
50
51 @echo off
52
53 echo -----------------------------------
54 echo -------Creating Folders------------
55 echo -----------------------------------
56 @echo on
57 rmdir %binpath% /s /q
58
59 rmdir %thirdpartyGeneration% /s /q
60 mkdir %thirdpartyGeneration%
61 cd  %thirdpartyGeneration%
62 mkdir thirdparty_source
63 mkdir thirdparty_bin
64 mkdir thirdparty_install
65
66 @echo off
67 echo ------End Creating Folders---------
68
69 echo -----------------------------------
70 echo ------Downloading Sources----------
71 echo -----------------------------------
72 @echo on
73 cd %thirdpartyGeneration%\thirdparty_source\
74 %wgetPath% %urlCreatisSource%/qt-4.7.3.zip
75 %wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z
76 %wgetPath% %urlCreatisSource%/boost_1_47_0.7z
77 %wgetPath% %urlCreatisSource%/vtk-5.8.0.tar.gz
78 %wgetPath% %urlCreatisSource%/InsightToolkit-3.20.0.zip
79 %wgetPath% %urlCreatisSource%/gdcm_11_Oct_2011.tar.gz
80 %wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip
81
82 @echo off
83 echo ------End Downloading Sources------
84
85
86 echo -----------------------------------
87 echo --------Qt Installation------------
88 echo -----------------------------------
89 echo ----------Extracting---------------
90 @echo on
91 cd %thirdpartyGeneration%\thirdparty_source\
92 mkdir Qt\
93 cd Qt\
94 %zipPath% x %thirdpartyGeneration%\thirdparty_source\qt-4.7.3.zip
95 del %thirdpartyGeneration%\thirdparty_source\qt-4.7.3.zip
96 @echo off
97 echo --------Renaming Folder------------
98 @echo on
99 rename qt-everywhere-opensource-src-4.7.3 4.7.3
100 @echo off
101 echo ----------Installing---------------
102 @echo on
103 cd 4.7.3
104 echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
105 nmake
106 cd C:\
107 @echo off
108 echo ------End QT Installation----------
109
110 echo -----------------------------------
111 echo -----wxWidgets Installation--------
112 echo -----------------------------------
113 echo ----------Extracting---------------
114 @echo on
115 cd %thirdpartyGeneration%\thirdparty_source
116 md wxWidgets\2.9.2
117 cd wxWidgets\2.9.2
118 %zipPath% x %thirdpartyGeneration%\thirdparty_source\wxWidgets-2.9.2.7z
119 del %thirdpartyGeneration%\thirdparty_source\wxWidgets-2.9.2.7z
120 @echo off
121 echo ----------Installing---------------
122 @echo on
123 cd %thirdpartyGeneration%\thirdparty_source\wxWidgets\2.9.2\build\msw
124 nmake -f makefile.vc BUILD=%buildType% UNICODE=1 SHARED=1
125 cd C:\
126 @echo off
127 echo ----End wxWidgets Installation-----
128
129 echo -----------------------------------
130 echo ------Boost Installation-----------
131 echo -----------------------------------
132 echo ----------Extracting---------------
133 @echo on
134 cd %thirdpartyGeneration%\thirdparty_source\
135 md Boost\
136 cd Boost\
137 %zipPath% x %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
138 del %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
139 @echo off
140 echo --------Renaming Folder------------
141 @echo on
142 rename boost_1_47_0 1.47.0
143 @echo off
144 echo ----------Installing---------------
145 @echo on
146 cd %thirdpartyGeneration%\thirdparty_source\Boost\1.47.0\
147 call bootstrap.bat
148 @echo off
149 if %PROCESSOR_ARCHITECTURE%==x86 (
150 @echo on
151   b2.exe --toolset=msvc-10.0 --build-type=complete stage
152 @echo off
153 ) else (
154 @echo on
155 cd stage
156   b2.exe --toolset=msvc-10.0 --build-type=complete architecture=x86 address-model=64 stage
157 @echo off
158 )
159 @echo on
160 cd C:\
161 @echo off
162 echo -----End Boost Installation--------
163
164 echo -----------------------------------
165 echo -------ITK Installation------------
166 echo -----------------------------------
167 echo ----------Extracting---------------
168 @echo on
169 cd %thirdpartyGeneration%\thirdparty_source
170 %zipPath% x InsightToolkit-3.20.0.zip
171 del InsightToolkit-3.20.0.zip
172 @echo off
173 echo ----------Installing---------------
174 @echo on
175 cd  %binpath%
176 mkdir %itk%Bin
177 cd %itk%Bin
178 cmake -G"Visual Studio 10" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin 
179 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
180 cmake -D USE_DEBUG_LIB:BOOL=%buildType% CMakeCache.txt
181 cmake CMakeCache.txt
182 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
183 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
184 cd c:\
185 @echo off
186 echo ------End ITK Installation---------
187
188 echo -----------------------------------
189 echo ------XERCES Installation----------
190 echo -----------------------------------
191 echo ----------Extracting---------------
192 @echo on
193 cd %thirdpartyGeneration%\thirdparty_source
194 %zipPath% x xerces-c-3.1.1.zip
195 del xerces-c-3.1.1.zip
196 @echo off
197 echo ----------Installing---------------
198 @echo on
199 cd  %sourcepath%\%xercesc%\projects\Win32\VC10\xerces-all
200 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=build
201 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
202 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
203 @echo off
204 echo -----End XERCES Installation-------
205
206
207
208 echo -----------------------------------
209 echo -------VTK Installation------------
210 echo -----------------------------------
211 echo ----------Extracting---------------
212 @echo on
213 cd %thirdpartyGeneration%\thirdparty_source\
214 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz
215 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
216 cd %thirdpartyGeneration%\thirdparty_source\VTK
217 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz
218 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
219 @echo off
220 echo ----------Installing---------------
221 @echo on
222 cd  %binpath%
223 mkdir %vtk%Bin
224 cd %vtk%Bin
225 cmake -G"Visual Studio 10"  -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin 
226 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%vtk%\ CMakeCache.txt
227 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
228 cmake CMakeCache.txt
229 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
230 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
231 cd c:\
232 @echo off
233 echo ------End VTK Installation---------
234
235 echo -----------------------------------
236 echo -------GDCM Installation-----------
237 echo -----------------------------------
238 echo ----------Extracting---------------
239 @echo on
240 cd %thirdpartyGeneration%\thirdparty_source
241 %zipPath% x gdcm_11_Oct_2011.tar.gz
242 %zipPath% x gdcm_11_Oct_2011.tar
243 del gdcm_11_Oct_2011.tar.gz
244 del gdcm_11_Oct_2011.tar
245 @echo off
246 echo ----------Installing---------------
247 @echo on
248
249 cd  %binpath%
250 mkdir %gdcm%Bin
251
252 cd %gdcm%Bin
253 cmake -G"Visual Studio 10"  -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin
254 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%gdcm%\ CMakeCache.txt
255 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
256 cmake CMakeCache.txt
257 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
258 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
259 cd c:\
260 @echo off
261 echo -----End GDCM Installation---------
262 @echo on
263 cd c:\
264 pause