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="%ProgramFilesPath_x86%\MiKTeX 2.9\miktex\bin\texworks.exe"
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
42 if not exist %miktex% (
43 set miktex="%ProgramFilesPath_x64%\MiKTeX 2.9\miktex\bin\texworks.exe"
44 if not exist %miktex% (
45 echo ERROR!!! MiKTex has not been found in the system
50 if not exist %wgetPath% (
51 echo ERROR!!! wget has not been found in the system
56 set installpath=%thirdpartyGeneration%\thirdparty_install
57 set binpath=%thirdpartyGeneration%\thirdparty_bin
58 set sourcepath=%thirdpartyGeneration%\thirdparty_source
61 set wxWidgets=wxWidgets-2.9.2
62 set boost=Boost-1.47.0
63 set xercesc=xerces-c-3.1.1
64 set itk=InsightToolkit-3.20.0
68 set QTDIR=%sourcepath%\%qt%
69 set WXDIR=%sourcepath%\%wxWidgets%
70 set BOOSTDIR=%sourcepath%\%boost%
71 set XERCESDIR=%sourcepath%\%xercesc%
72 set ITKSRCDIR=%sourcepath%\%itk%
73 set VTKSRCDIR=%sourcepath%\%VTK%
74 set GDCMSRCDIR=%sourcepath%\%gdcm%
76 echo -----------------------------------
77 echo Environment variables Configuration
78 echo -----------------------------------
79 echo ThirdpartyGeneration=%thirdpartyGeneration%
80 echo BuildType=%buildType%
83 echo urlCreatis=%urlCreatisSource%
85 echo Visual Studio=%vcvarsall%
86 echo InstallPath=%installpath%
87 echo BinPath=%binpath%
88 echo SourcePath=%sourcepath%
92 echo Xercesc=%xercesc%
98 echo BOOSTDIR=%BOOSTDIR%
99 echo XERCESDIR=%XERCESDIR%
100 echo ITKSRCDIR=%ITKSRCDIR%
101 echo VTKSRCDIR=%VTKSRCDIR%
102 echo GDCMDIR=%GDCMSRCDIR%
104 echo ---End Setting Global Variables----
105 echo -----------------------------------
109 echo -----------------------------------
110 echo -------Creating Folders------------
111 echo -----------------------------------
113 rmdir %binpath% /s /q
115 rmdir %thirdpartyGeneration% /s /q
116 mkdir %thirdpartyGeneration%
117 cd %thirdpartyGeneration%
118 mkdir thirdparty_source
120 mkdir thirdparty_install
123 echo ------End Creating Folders---------
125 echo -----------------------------------
126 echo ------Downloading Sources----------
127 echo -----------------------------------
129 cd %thirdpartyGeneration%\thirdparty_source\
130 %wgetPath% %urlCreatisSource%/qt-4.7.3.zip
131 %wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z
132 %wgetPath% %urlCreatisSource%/boost_1_47_0.7z
133 %wgetPath% %urlCreatisSource%/vtk-5.8.0.tar.gz
134 %wgetPath% %urlCreatisSource%/InsightToolkit-3.20.0.zip
135 %wgetPath% %urlCreatisSource%/gdcm_11_Oct_2011.tar.gz
136 %wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip
137 %wgetPath% %urlCreatisSource%/tth_exe.zip
138 echo ------End Downloading Sources------
140 echo -----------------------------------
141 echo --------Qt Installation------------
142 echo -----------------------------------
143 echo ----------Extracting---------------
146 %zipPath% x %sourcepath%\qt-4.7.3.zip
147 del %sourcepath%\qt-4.7.3.zip
149 echo --------Renaming Folder------------
151 rename qt-everywhere-opensource-src-4.7.3 %qt%
153 echo ----------Installing---------------
158 echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
163 echo ------End QT Installation----------
165 echo -----------------------------------
166 echo -----wxWidgets Installation--------
167 echo -----------------------------------
168 echo ----------Extracting---------------
173 %zipPath% x %sourcepath%\wxWidgets-2.9.2.7z
174 del %sourcepath%\wxWidgets-2.9.2.7z
176 echo ----------Installing---------------
178 cd %sourcepath%\%wxWidgets%\build\msw
179 nmake -f makefile.vc BUILD=%buildType% UNICODE=1 SHARED=1
182 echo ----End wxWidgets Installation-----
184 echo -----------------------------------
185 echo ------Boost Installation-----------
186 echo -----------------------------------
187 echo ----------Extracting---------------
190 %zipPath% x %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
191 del %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
193 echo --------Renaming Folder------------
195 rename boost_1_47_0 %boost%
197 echo ----------Installing---------------
199 cd %sourcepath%\%boost%
201 b2.exe --toolset=msvc-10.0 --build-type=complete stage
204 echo -----End Boost Installation--------
206 echo -----------------------------------
207 echo -------ITK Installation------------
208 echo -----------------------------------
209 echo ----------Extracting---------------
212 %zipPath% x InsightToolkit-3.20.0.zip
213 del InsightToolkit-3.20.0.zip
215 echo ----------Installing---------------
220 cmake -G"Visual Studio 10" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin
221 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
222 cmake -D USE_DEBUG_LIB:BOOL=%buildType% CMakeCache.txt
224 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
225 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
228 echo ------End ITK Installation---------
230 echo -----------------------------------
231 echo ------XERCES Installation----------
232 echo -----------------------------------
233 echo ----------Extracting---------------
236 %zipPath% x xerces-c-3.1.1.zip
237 del xerces-c-3.1.1.zip
239 echo ----------Installing---------------
241 cd %sourcepath%\%xercesc%\projects\Win32\VC10\xerces-all
242 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=build
243 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
244 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
246 echo -----End XERCES Installation-------
248 echo -----------------------------------
249 echo -------VTK Installation------------
250 echo -----------------------------------
251 echo ----------Extracting---------------
254 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz
255 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
256 cd %thirdpartyGeneration%\thirdparty_source\VTK
257 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz
258 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
260 echo ----------Installing---------------
266 cmake -G"Visual Studio 10" -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin
267 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%vtk%\ CMakeCache.txt
268 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
270 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
271 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
273 echo ------End VTK Installation---------
275 echo -----------------------------------
276 echo -------GDCM Installation-----------
277 echo -----------------------------------
278 echo ----------Extracting---------------
281 %zipPath% x gdcm_11_Oct_2011.tar.gz
282 %zipPath% x gdcm_11_Oct_2011.tar
283 del gdcm_11_Oct_2011.tar.gz
284 del gdcm_11_Oct_2011.tar
286 echo ----------Installing---------------
293 cmake -G"Visual Studio 10" -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin
294 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%gdcm%\ CMakeCache.txt
295 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
297 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
298 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
301 echo -----End GDCM Installation---------
303 echo -----------------------------------
304 echo -------TTH Installation------------
305 echo -----------------------------------
306 echo ----------Extracting---------------
308 %zipPath% x tth_exe.zip
311 echo ------End TTH Installation---------