2 echo -----------------------------------
3 echo ------Asking Architecture----------
4 echo -----------------------------------
5 if %PROCESSOR_ARCHITECTURE%==x86 (
7 set ProgramFilesPath=%ProgramFiles%
11 set "ProgramFilesPath=%ProgramFiles(x86)%"
15 echo ----End Asking Architecture--------
17 echo -----------------------------------
18 echo ---Setting Enviroment Variables----
19 echo -----------------------------------
22 set thirdpartyGeneration=%1
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"
31 set installpath=%thirdpartyGeneration%\thirdparty_install
32 set binpath=%thirdpartyGeneration%\thirdparty_bin
33 set sourcepath=%thirdpartyGeneration%\thirdparty_source
35 set xercesc=xerces-c-3.1.1
36 set itk=InsightToolkit-3.20.0
41 echo ---End Setting Global Variables----
42 echo -----------------------------------
49 echo -----------------------------------
50 echo -------Creating Folders------------
51 echo -----------------------------------
55 rmdir %thirdpartyGeneration% /s /q
56 mkdir %thirdpartyGeneration%
57 cd %thirdpartyGeneration%
58 mkdir thirdparty_source
60 mkdir thirdparty_install
63 echo ------End Creating Folders---------
65 echo -----------------------------------
66 echo ------Downloading Sources----------
67 echo -----------------------------------
69 cd %thirdpartyGeneration%\thirdparty_source\
70 %wgetPath% %urlCreatisSource%/qt-4.7.3.zip
71 %wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z
72 %wgetPath% %urlCreatisSource%/boost_1_47_0.7z
73 %wgetPath% %urlCreatisSource%/vtk-5.8.0.tar.gz
74 %wgetPath% %urlCreatisSource%/InsightToolkit-3.20.0.zip
75 %wgetPath% %urlCreatisSource%/gdcm.tar.gz
76 %wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip
79 echo ------End Downloading Sources------
81 echo -----------------------------------
82 echo --------Qt Installation------------
83 echo -----------------------------------
84 echo ---Setting Enviroment Variables----
86 set QTDIR=%thirdpartyGeneration%\thirdparty_source\Qt\4.7.3\
88 echo ----------Extracting---------------
90 cd %thirdpartyGeneration%\thirdparty_source\
93 %zipPath% x %thirdpartyGeneration%\thirdparty_source\qt-4.7.3.zip
94 del %thirdpartyGeneration%\thirdparty_source\qt-4.7.3.zip
96 echo --------Renaming Folder------------
98 rename qt-everywhere-opensource-src-4.7.3 4.7.3
100 echo ----------Installing---------------
103 echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
107 echo ------End QT Installation----------
109 echo -----------------------------------
110 echo -----wxWidgets Installation--------
111 echo -----------------------------------
112 echo -------Setting Variables-----------
114 set WXDIR=%thirdpartyGeneration%\thirdparty_source\wxWidgets\2.9.2\
116 echo ----------Extracting---------------
118 cd %thirdpartyGeneration%\thirdparty_source
121 %zipPath% x %thirdpartyGeneration%\thirdparty_source\wxWidgets-2.9.2.7z
122 del %thirdpartyGeneration%\thirdparty_source\wxWidgets-2.9.2.7z
124 echo ----------Installing---------------
126 cd %thirdpartyGeneration%\thirdparty_source\wxWidgets\2.9.2\build\msw
127 nmake -f makefile.vc BUILD=%buildType% UNICODE=1 SHARED=1
130 echo ----End wxWidgets Installation-----
132 echo -----------------------------------
133 echo ------Boost Installation-----------
134 echo -----------------------------------
135 echo -------Setting Variables-----------
137 set BOOSTDIR=%thirdpartyGeneration%\thirdparty_source\Boost\1.47.0\
139 echo ----------Extracting---------------
141 cd %thirdpartyGeneration%\thirdparty_source\
144 %zipPath% x %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
145 del %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
147 echo --------Renaming Folder------------
149 rename boost_1_47_0 1.47.0
151 echo ----------Installing---------------
153 cd %thirdpartyGeneration%\thirdparty_source\Boost\1.47.0\
156 if %PROCESSOR_ARCHITECTURE%==x86 (
158 b2.exe --toolset=msvc-10.0 --build-type=complete stage
163 b2.exe --toolset=msvc-10.0 --build-type=complete architecture=x86 address-model=64 stage
169 echo -----End Boost Installation--------
171 echo -----------------------------------
172 echo -------ITK Installation------------
173 echo -----------------------------------
174 echo ----------Extracting---------------
176 cd %thirdpartyGeneration%\thirdparty_source
177 %zipPath% x InsightToolkit-3.20.0.zip
178 del InsightToolkit-3.20.0.zip
180 echo ----------Installing---------------
185 cmake -G"Visual Studio 10" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin
186 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
187 cmake -D USE_DEBUG_LIB:BOOL=%buildType% CMakeCache.txt
189 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
190 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
193 echo ------End ITK Installation---------
195 echo -----------------------------------
196 echo ------XERCES Installation----------
197 echo -----------------------------------
198 echo ----------Extracting---------------
200 cd %thirdpartyGeneration%\thirdparty_source
201 %zipPath% x xerces-c-3.1.1.zip
202 del xerces-c-3.1.1.zip
204 echo ----------Installing---------------
206 cd %sourcepath%\%xercesc%\projects\Win32\VC10\xerces-all
207 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=build
208 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
209 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
211 echo -----End XERCES Installation-------
213 echo -----------------------------------
214 echo -------VTK Installation------------
215 echo -----------------------------------
216 echo ----------Extracting---------------
218 cd %thirdpartyGeneration%\thirdparty_source\
219 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.6.1.patchCreatis.tar.gz
220 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.6.1.patchCreatis.tar
221 cd %thirdpartyGeneration%\thirdparty_source\VTK
222 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz
223 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
225 echo ----------Installing---------------
230 cmake -G"Visual Studio 10" -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin
231 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%vtk%\ CMakeCache.txt
232 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
234 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
235 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
238 echo ------End VTK Installation---------
240 echo -----------------------------------
241 echo -------GDCM Installation-----------
242 echo -----------------------------------
243 echo -------Setting Variables-----------
244 echo ----------Extracting---------------
246 cd %thirdpartyGeneration%\thirdparty_source
247 %zipPath% x gdcm.tar.gz
252 echo ----------Installing---------------
257 cmake -G"Visual Studio 10" -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin
258 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%gdcm%\ CMakeCache.txt
259 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
261 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
262 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
265 echo -----End GDCM Installation---------