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