2 echo "Running script at: " TIME
3 echo -----------------------------------
4 echo ------Asking Architecture----------
5 echo -----------------------------------
6 if %PROCESSOR_ARCHITECTURE%==x86 (
7 set ProgramFilesPath_x86=%ProgramFiles%
8 echo "Architecture found = x86"
10 set "ProgramFilesPath_x64=%ProgramFiles%"
11 set "ProgramFilesPath_x86=%ProgramFiles(x86)%"
12 echo "Architecture found = x64"
15 echo ----End Asking Architecture--------
17 echo -----------------------------------
18 echo ---Setting Enviroment Variables----
19 echo -----------------------------------
21 set thirdpartyGeneration=%1
25 set urlCreatisSource=http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source
26 set urlCreatisSource=http://www.creatis.insa-lyon.fr/~caceres/software
27 set zipPath="%ProgramFilesPath_x86%\7-Zip\7z.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 %vcvarsall% set zipPath="%ProgramFilesPath_x64%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
34 set installpath=%thirdpartyGeneration%\thirdparty_install
35 set binpath=%thirdpartyGeneration%\thirdparty_bin
36 set sourcepath=%thirdpartyGeneration%\thirdparty_source
39 set wxWidgets=wxWidgets-2.9.2
40 set boost=Boost-1.47.0
41 set xercesc=xerces-c-3.1.1
42 set itk=InsightToolkit-3.20.0
46 set QTDIR=%sourcepath%\%qt%
47 set WXDIR=%sourcepath%\%wxWidgets%
48 set BOOSTDIR=%sourcepath%\%boost%
49 set XERCESDIR=%sourcepath%\%xercesc%
50 set ITKSRCDIR=%sourcepath%\%itk%
51 set VTKSRCDIR=%sourcepath%\%VTK%
52 set GDCMSRCDIR=%sourcepath%\%gdcm%
54 echo %thirdpartyGeneration%
57 echo %urlCreatisSource%
79 echo ---End Setting Global Variables----
80 echo -----------------------------------
85 echo -----------------------------------
86 echo -------Creating Folders------------
87 echo -----------------------------------
94 rmdir %thirdpartyGeneration% /s /q
95 mkdir %thirdpartyGeneration%
96 cd %thirdpartyGeneration%
97 mkdir thirdparty_source
99 mkdir thirdparty_install
101 echo ------End Creating Folders---------
103 echo -----------------------------------
104 echo ------Downloading Sources----------
105 echo -----------------------------------
107 cd %thirdpartyGeneration%\thirdparty_source\
108 %wgetPath% %urlCreatisSource%/qt-4.7.3.zip
109 %wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z
110 %wgetPath% %urlCreatisSource%/boost_1_47_0.7z
111 %wgetPath% %urlCreatisSource%/vtk-5.8.0.tar.gz
112 %wgetPath% %urlCreatisSource%/InsightToolkit-3.20.0.zip
113 %wgetPath% %urlCreatisSource%/gdcm_11_Oct_2011.tar.gz
114 %wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip
116 echo ------End Downloading Sources------
119 echo -----------------------------------
120 echo --------Qt Installation------------
121 echo -----------------------------------
122 echo ----------Extracting---------------
125 %zipPath% x %sourcepath%\qt-4.7.3.zip
126 del %sourcepath%\qt-4.7.3.zip
128 echo --------Renaming Folder------------
130 rename qt-everywhere-opensource-src-4.7.3 %qt%
132 echo ----------Installing---------------
138 if %PROCESSOR_ARCHITECTURE%==x86 (
139 echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
141 echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
147 echo ------End QT Installation----------
149 echo -----------------------------------
150 echo -----wxWidgets Installation--------
151 echo -----------------------------------
152 echo ----------Extracting---------------
157 %zipPath% x %sourcepath%\wxWidgets-2.9.2.7z
158 del %sourcepath%\wxWidgets-2.9.2.7z
160 echo ----------Installing---------------
162 cd %sourcepath%\%wxWidgets%\build\msw
163 nmake -f makefile.vc BUILD=%buildType% UNICODE=1 SHARED=1
166 echo ----End wxWidgets Installation-----
168 echo -----------------------------------
169 echo ------Boost Installation-----------
170 echo -----------------------------------
171 echo ----------Extracting---------------
174 %zipPath% x %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
175 del %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
177 echo --------Renaming Folder------------
179 rename boost_1_47_0 %boost%
181 echo ----------Installing---------------
183 cd %sourcepath%\%boost%
186 if %PROCESSOR_ARCHITECTURE%==x86 (
188 b2.exe --toolset=msvc-10.0 --build-type=complete stage
193 b2.exe --toolset=msvc-10.0 --build-type=complete architecture=x86 address-model=64 stage
199 echo -----End Boost Installation--------
201 echo -----------------------------------
202 echo -------ITK Installation------------
203 echo -----------------------------------
204 echo ----------Extracting---------------
207 %zipPath% x InsightToolkit-3.20.0.zip
208 del InsightToolkit-3.20.0.zip
210 echo ----------Installing---------------
216 cmake -G"Visual Studio 10" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin
217 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
218 cmake -D USE_DEBUG_LIB:BOOL=%buildType% CMakeCache.txt
220 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
221 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
224 echo ------End ITK Installation---------
226 echo -----------------------------------
227 echo ------XERCES Installation----------
228 echo -----------------------------------
229 echo ----------Extracting---------------
232 %zipPath% x xerces-c-3.1.1.zip
233 del xerces-c-3.1.1.zip
235 echo ----------Installing---------------
237 cd %sourcepath%\%xercesc%\projects\Win32\VC10\xerces-all
238 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=build
239 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
240 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
242 echo -----End XERCES Installation-------
246 echo -----------------------------------
247 echo -------VTK Installation------------
248 echo -----------------------------------
249 echo ----------Extracting---------------
252 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz
253 %zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
254 cd %thirdpartyGeneration%\thirdparty_source\VTK
255 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz
256 del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
258 echo ----------Installing---------------
263 cmake -G"Visual Studio 10" -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin
264 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%vtk%\ CMakeCache.txt
265 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
267 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
268 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
271 echo ------End VTK Installation---------
273 echo -----------------------------------
274 echo -------GDCM Installation-----------
275 echo -----------------------------------
276 echo ----------Extracting---------------
279 %zipPath% x gdcm_11_Oct_2011.tar.gz
280 %zipPath% x gdcm_11_Oct_2011.tar
281 del gdcm_11_Oct_2011.tar.gz
282 del gdcm_11_Oct_2011.tar
284 echo ----------Installing---------------
291 cmake -G"Visual Studio 10" -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin
292 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%gdcm%\ CMakeCache.txt
293 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
295 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
296 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
299 echo -----End GDCM Installation---------
302 echo "Ending script at: " TIME