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