2 echo -----------------------------------
3 echo ------Asking Architecture----------
4 echo -----------------------------------
5 if %PROCESSOR_ARCHITECTURE%==x86 (
6 set ProgramFilesPath_x86=%ProgramFiles%
7 echo "Architecture found = x86"
9 set "ProgramFilesPath_x64=%ProgramFiles%"
10 set "ProgramFilesPath_x86=%ProgramFiles(x86)%"
11 echo "Architecture found = x64"
14 echo ----End Asking Architecture--------
16 echo -----------------------------------
17 echo ---Setting Environment Variables----
18 echo -----------------------------------
20 set thirdpartyGeneration=%1
23 set urlCreatisSource=http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source
24 set urlCreatisSource=http://www.creatis.insa-lyon.fr/~caceres/software
26 set zipPath="%ProgramFilesPath_x86%\7-Zip\7z.exe"
27 set "miktex=%ProgramFiles(x86)%\MiKTeX 2.9"
28 set vcvarsall="%ProgramFilesPath_x86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
29 set wgetPath=%cd%\..\..\windows\creaTools_win_installers\CreaTools_v2_0_0_win32_installer\bin\wget.exe
31 if not exist %zipPath% set zipPath="%ProgramFilesPath_x64%\7-Zip\7z.exe"
32 if not exist %zipPath% (
33 echo ERROR!!! 7Zip has not been found in the system
36 if not exist %vcvarsall% set zipPath="%ProgramFilesPath_x64%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
37 if not exist %vcvarsall% (
38 echo ERROR!!! Visual Studio has not been found in the system
41 if "%miktex%"=="\MiKTeX 2.9" set "miktex=%ProgramFiles%\MiKTeX 2.9"
42 if "%miktex%"=="\MiKTeX 2.9" (
43 echo ERROR!!! MiKTex has not been found in the system
46 if not exist %wgetPath% (
47 echo ERROR!!! wget has not been found in the system
52 set installpath=%thirdpartyGeneration%\thirdparty_install
53 set binpath=%thirdpartyGeneration%\thirdparty_bin
54 set sourcepath=%thirdpartyGeneration%\thirdparty_source
57 set wxWidgets=wxWidgets-2.9.2
58 set boost=Boost-1.47.0
59 set xercesc=xerces-c-3.1.1
60 set itk=InsightToolkit-3.20.0
64 set QTDIR=%sourcepath%\%qt%
65 set WXDIR=%sourcepath%\%wxWidgets%
66 set BOOSTDIR=%sourcepath%\%boost%
67 set XERCESDIR=%sourcepath%\%xercesc%
68 set ITKSRCDIR=%sourcepath%\%itk%
69 set VTKSRCDIR=%sourcepath%\%VTK%
70 set GDCMSRCDIR=%sourcepath%\%gdcm%
72 echo -----------------------------------
73 echo Environment variables Configuration
74 echo -----------------------------------
75 echo %thirdpartyGeneration%
78 echo %urlCreatisSource%
99 echo ---End Setting Global Variables----
100 echo -----------------------------------
104 echo -----------------------------------
105 echo -------Creating Folders------------
106 echo -----------------------------------
110 rmdir %binpath% /s /q
112 rmdir %thirdpartyGeneration% /s /q
113 mkdir %thirdpartyGeneration%
114 cd %thirdpartyGeneration%
115 mkdir thirdparty_source
117 mkdir thirdparty_install
120 echo ------End Creating Folders---------
122 echo -----------------------------------
123 echo ------Downloading Sources----------
124 echo -----------------------------------
126 cd %thirdpartyGeneration%\thirdparty_source\
127 %wgetPath% %urlCreatisSource%/qt-4.7.3.zip
128 %wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z
129 %wgetPath% %urlCreatisSource%/boost_1_47_0.7z
130 %wgetPath% %urlCreatisSource%/vtk-5.8.0.tar.gz
131 %wgetPath% %urlCreatisSource%/InsightToolkit-3.20.0.zip
132 %wgetPath% %urlCreatisSource%/gdcm_11_Oct_2011.tar.gz
133 %wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip
134 %wgetPath% %urlCreatisSource%/tth_exe.zip
135 echo ------End Downloading Sources------
137 echo -----------------------------------
138 echo --------Qt Installation------------
139 echo -----------------------------------
140 echo ----------Extracting---------------
143 %zipPath% x %sourcepath%\qt-4.7.3.zip
144 del %sourcepath%\qt-4.7.3.zip
146 echo --------Renaming Folder------------
148 rename qt-everywhere-opensource-src-4.7.3 %qt%
150 echo ----------Installing---------------
156 if %PROCESSOR_ARCHITECTURE%==x86 (
157 echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
159 echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
165 echo ------End QT Installation----------
167 echo -----------------------------------
168 echo -----wxWidgets Installation--------
169 echo -----------------------------------
170 echo ----------Extracting---------------
175 %zipPath% x %sourcepath%\wxWidgets-2.9.2.7z
176 del %sourcepath%\wxWidgets-2.9.2.7z
178 echo ----------Installing---------------
180 cd %sourcepath%\%wxWidgets%\build\msw
181 nmake -f makefile.vc BUILD=%buildType% UNICODE=1 SHARED=1
184 echo ----End wxWidgets Installation-----
186 echo -----------------------------------
187 echo ------Boost Installation-----------
188 echo -----------------------------------
189 echo ----------Extracting---------------
192 %zipPath% x %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
193 del %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
195 echo --------Renaming Folder------------
197 rename boost_1_47_0 %boost%
199 echo ----------Installing---------------
201 cd %sourcepath%\%boost%
204 if %PROCESSOR_ARCHITECTURE%==x86 (
206 b2.exe --toolset=msvc-10.0 --build-type=complete stage
211 b2.exe --toolset=msvc-10.0 --build-type=complete architecture=x86 address-model=64 stage
217 echo -----End Boost Installation--------
219 echo -----------------------------------
220 echo -------ITK Installation------------
221 echo -----------------------------------
222 echo ----------Extracting---------------
225 %zipPath% x InsightToolkit-3.20.0.zip
226 del InsightToolkit-3.20.0.zip
228 echo ----------Installing---------------
233 cmake -G"Visual Studio 10" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin
234 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
235 cmake -D USE_DEBUG_LIB:BOOL=%buildType% CMakeCache.txt
237 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
238 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
241 echo ------End ITK Installation---------
243 echo -----------------------------------
244 echo ------XERCES Installation----------
245 echo -----------------------------------
246 echo ----------Extracting---------------
249 %zipPath% x xerces-c-3.1.1.zip
250 del xerces-c-3.1.1.zip
252 echo ----------Installing---------------
254 cd %sourcepath%\%xercesc%\projects\Win32\VC10\xerces-all
255 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=build
256 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
257 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
259 echo -----End XERCES Installation-------
261 echo -----------------------------------
262 echo -------VTK Installation------------
263 echo -----------------------------------
264 echo ----------Extracting---------------
267 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz
268 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
269 cd %thirdpartyGeneration%\thirdparty_source\VTK
270 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz
271 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
273 echo ----------Installing---------------
279 cmake -G"Visual Studio 10" -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin
280 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%vtk%\ CMakeCache.txt
281 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
283 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
284 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
286 echo ------End VTK Installation---------
288 echo -----------------------------------
289 echo -------GDCM Installation-----------
290 echo -----------------------------------
291 echo ----------Extracting---------------
294 %zipPath% x gdcm_11_Oct_2011.tar.gz
295 %zipPath% x gdcm_11_Oct_2011.tar
296 del gdcm_11_Oct_2011.tar.gz
297 del gdcm_11_Oct_2011.tar
299 echo ----------Installing---------------
306 cmake -G"Visual Studio 10" -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin
307 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%gdcm%\ CMakeCache.txt
308 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
310 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
311 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
314 echo -----End GDCM Installation---------
316 echo -----------------------------------
317 echo -------TTH Installation------------
318 echo -----------------------------------
319 echo ----------Extracting---------------
321 %zipPath% x tth_exe.zip
324 echo ------End TTH Installation---------