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