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