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
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 -----------------------------------
105 echo -----------------------------------
106 echo -------Creating Folders------------
107 echo -----------------------------------
111 rmdir %binpath% /s /q
113 rmdir %thirdpartyGeneration% /s /q
114 mkdir %thirdpartyGeneration%
115 cd %thirdpartyGeneration%
116 mkdir thirdparty_source
118 mkdir thirdparty_install
121 echo ------End Creating Folders---------
123 echo -----------------------------------
124 echo ------Downloading Sources----------
125 echo -----------------------------------
127 cd %thirdpartyGeneration%\thirdparty_source\
128 %wgetPath% %urlCreatisSource%/qt-4.7.3.zip
129 %wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z
130 %wgetPath% %urlCreatisSource%/boost_1_47_0.7z
131 %wgetPath% %urlCreatisSource%/vtk-5.8.0.tar.gz
132 %wgetPath% %urlCreatisSource%/InsightToolkit-3.20.0.zip
133 %wgetPath% %urlCreatisSource%/gdcm_11_Oct_2011.tar.gz
134 %wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip
135 %wgetPath% %urlCreatisSource%/tth_exe.zip
136 echo ------End Downloading Sources------
138 echo -----------------------------------
139 echo --------Qt Installation------------
140 echo -----------------------------------
141 echo ----------Extracting---------------
144 %zipPath% x %sourcepath%\qt-4.7.3.zip
145 del %sourcepath%\qt-4.7.3.zip
147 echo --------Renaming Folder------------
149 rename qt-everywhere-opensource-src-4.7.3 %qt%
151 echo ----------Installing---------------
157 if %PROCESSOR_ARCHITECTURE%==x86 (
158 echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
160 echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
166 echo ------End QT Installation----------
168 echo -----------------------------------
169 echo -----wxWidgets Installation--------
170 echo -----------------------------------
171 echo ----------Extracting---------------
176 %zipPath% x %sourcepath%\wxWidgets-2.9.2.7z
177 del %sourcepath%\wxWidgets-2.9.2.7z
179 echo ----------Installing---------------
181 cd %sourcepath%\%wxWidgets%\build\msw
182 nmake -f makefile.vc BUILD=%buildType% UNICODE=1 SHARED=1
185 echo ----End wxWidgets Installation-----
187 echo -----------------------------------
188 echo ------Boost Installation-----------
189 echo -----------------------------------
190 echo ----------Extracting---------------
193 %zipPath% x %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
194 del %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
196 echo --------Renaming Folder------------
198 rename boost_1_47_0 %boost%
200 echo ----------Installing---------------
202 cd %sourcepath%\%boost%
205 if %PROCESSOR_ARCHITECTURE%==x86 (
207 b2.exe --toolset=msvc-10.0 --build-type=complete stage
212 b2.exe --toolset=msvc-10.0 --build-type=complete architecture=x86 address-model=64 stage
218 echo -----End Boost Installation--------
220 echo -----------------------------------
221 echo -------ITK Installation------------
222 echo -----------------------------------
223 echo ----------Extracting---------------
226 %zipPath% x InsightToolkit-3.20.0.zip
227 del InsightToolkit-3.20.0.zip
229 echo ----------Installing---------------
234 cmake -G"Visual Studio 10" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin
235 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
236 cmake -D USE_DEBUG_LIB:BOOL=%buildType% CMakeCache.txt
238 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
239 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
242 echo ------End ITK Installation---------
244 echo -----------------------------------
245 echo ------XERCES Installation----------
246 echo -----------------------------------
247 echo ----------Extracting---------------
250 %zipPath% x xerces-c-3.1.1.zip
251 del xerces-c-3.1.1.zip
253 echo ----------Installing---------------
255 cd %sourcepath%\%xercesc%\projects\Win32\VC10\xerces-all
256 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=build
257 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
258 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
260 echo -----End XERCES Installation-------
264 echo -----------------------------------
265 echo -------VTK Installation------------
266 echo -----------------------------------
267 echo ----------Extracting---------------
270 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz
271 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
272 cd %thirdpartyGeneration%\thirdparty_source\VTK
273 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz
274 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
276 echo ----------Installing---------------
281 cmake -G"Visual Studio 10" -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin
282 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%vtk%\ CMakeCache.txt
283 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
285 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
286 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
289 echo ------End VTK Installation---------
291 echo -----------------------------------
292 echo -------GDCM Installation-----------
293 echo -----------------------------------
294 echo ----------Extracting---------------
297 %zipPath% x gdcm_11_Oct_2011.tar.gz
298 %zipPath% x gdcm_11_Oct_2011.tar
299 del gdcm_11_Oct_2011.tar.gz
300 del gdcm_11_Oct_2011.tar
302 echo ----------Installing---------------
309 cmake -G"Visual Studio 10" -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin
310 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%gdcm%\ CMakeCache.txt
311 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
313 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
314 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
317 echo -----End GDCM Installation---------
319 echo -----------------------------------
320 echo -------TTH Installation------------
321 echo -----------------------------------
322 echo ----------Extracting---------------
323 %zipPath% x tth_exe.zip
326 echo ------End TTH Installation---------