1 rem -----------------------------------
2 rem ------Asking Architecture----------
3 rem -----------------------------------
5 if %PROCESSOR_ARCHITECTURE%==x86 (
7 set ProgramFilesPath=%ProgramFiles%
11 set "ProgramFilesPath=%ProgramFiles(x86)%"
15 rem ----End Asking Architecture--------
17 rem -----------------------------------
18 rem ---Setting Enviroment Variables----
19 rem -----------------------------------
20 set thirdpartyGeneration=%1
23 set wgetPath=%cd%\..\..\windows\creaTools_win_installers\CreaTools_v2_0_0_win32_installer\bin\wget.exe
24 set zipPath="%ProgramFilesPath%\7-Zip\7z.exe"
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 vcvarsall="%ProgramFilesPath%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
29 set installpath=%thirdpartyGeneration%\thirdparty_install
30 set binpath=%thirdpartyGeneration%\thirdparty_bin
31 set sourcepath=%thirdpartyGeneration%\thirdparty_source
33 set xercesc=xerces-c-3.1.1
34 set itk=InsightToolkit-3.20.0
38 rem ---End Setting Global Variables----
39 rem -----------------------------------
43 rem -----------------------------------
44 rem -------Creating Folders------------
45 rem -----------------------------------
48 rmdir %thirdpartyGeneration% /s /q
49 mkdir %thirdpartyGeneration%
50 cd %thirdpartyGeneration%
51 mkdir thirdparty_source
53 mkdir thirdparty_install
54 rem ------End Creating Folders---------
56 rem -----------------------------------
57 rem ------Downloading Sources----------
58 rem -----------------------------------
59 cd %thirdpartyGeneration%\thirdparty_source\
60 %wgetPath% %urlCreatisSource%/qt-4.7.3.zip
61 %wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z
62 %wgetPath% %urlCreatisSource%/boost_1_47_0.7z
63 %wgetPath% %urlCreatisSource%/vtk-5.6.1.zip
64 %wgetPath% %urlCreatisSource%/InsightToolkit-3.20.0.zip
65 %wgetPath% %urlCreatisSource%/gdcm_05_Mai_2011.tar.gz
66 %wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip
67 rem ------End Downloading Sources------
69 rem -----------------------------------
70 rem --------Qt Installation------------
71 rem -----------------------------------
72 rem ---Setting Enviroment Variables----
73 set QTDIR=%thirdpartyGeneration%\thirdparty_source\Qt\4.7.3\
74 rem ----------Extracting---------------
75 cd %thirdpartyGeneration%\thirdparty_source\
78 %zipPath% x %thirdpartyGeneration%\thirdparty_source\qt-4.7.3.zip
79 del %thirdpartyGeneration%\thirdparty_source\qt-4.7.3.zip
81 rem --------Renaming Folder------------
82 rename qt-everywhere-opensource-src-4.7.3 4.7.3
83 rem ----------Installing---------------
85 echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
88 rem ------End QT Installation----------
90 rem -----------------------------------
91 rem -----wxWidgets Installation--------
92 rem -----------------------------------
93 rem -------Setting Variables-----------
94 set WXDIR=%thirdpartyGeneration%\thirdparty_source\wxWidgets\2.9.2\
95 rem ----------Extracting---------------
96 cd %thirdpartyGeneration%\thirdparty_source
99 %zipPath% x %thirdpartyGeneration%\thirdparty_source\wxWidgets-2.9.2.7z
100 del %thirdpartyGeneration%\thirdparty_source\wxWidgets-2.9.2.7z
101 rem ----------Installing---------------
102 cd %thirdpartyGeneration%\thirdparty_source\wxWidgets\2.9.2\build\msw
103 nmake -f makefile.vc BUILD=%buildType% UNICODE=1 SHARED=1
105 rem ----End wxWidgets Installation-----
107 rem -----------------------------------
108 rem ------Boost Installation-----------
109 rem -----------------------------------
110 rem -------Setting Variables-----------
111 set BOOSTDIR=%thirdpartyGeneration%\thirdparty_source\Boost\1.47.0\
112 rem ----------Extracting---------------
113 cd %thirdpartyGeneration%\thirdparty_source\
116 %zipPath% x %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
117 del %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
118 rem --------Renaming Folder------------
119 rename boost_1_47_0 1.47.0
120 rem ----------Installing---------------
121 cd %thirdpartyGeneration%\thirdparty_source\Boost\1.47.0\
124 if %PROCESSOR_ARCHITECTURE%==x86 (
126 b2.exe --toolset=msvc-10.0 --build-type=complete stage
131 b2.exe --toolset=msvc-10.0 --build-type=complete architecture=x86 address-model=64 stage
136 rem -----End Boost Installation--------
138 rem -----------------------------------
139 rem -------VTK Installation------------
140 rem -----------------------------------
141 rem ----------Extracting---------------
142 mkdir %thirdpartyGeneration%\thirdparty_source\VTK
143 cd %thirdpartyGeneration%\thirdparty_source\VTK
144 %zipPath% x %thirdpartyGeneration%\thirdparty_source\vtk-5.6.1.zip
145 del %thirdpartyGeneration%\thirdparty_source\vtk-5.6.1.zip
146 rem ----------Installing---------------
150 cmake -G"Visual Studio 10" -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin
151 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%vtk%\ CMakeCache.txt
152 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
154 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
155 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
157 rem ------End VTK Installation---------
159 rem -----------------------------------
160 rem -------GDCM Installation-----------
161 rem -----------------------------------
162 rem -------Setting Variables-----------
163 rem ----------Extracting---------------
164 cd %thirdpartyGeneration%\thirdparty_source
165 %zipPath% x gdcm_05_Mai_2011.tar.gz
166 %zipPath% x gdcm_05_Mai_2011.tar
167 del gdcm_05_Mai_2011.tar.gz
168 del gdcm_05_Mai_2011.tar
169 rem ----------Installing---------------
173 cmake -G"Visual Studio 10" -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin
174 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%gdcm%\ CMakeCache.txt
175 cmake -D VTK_DIR:PATH=%binpath%\%vtk%Bin -D GDCM_VTK:BOOL=ON -D GDCM_NAME_SPACE:STRING=gdcm13 CMakeCache.txt
177 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
178 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
180 rem -----End GDCM Installation---------
182 rem -----------------------------------
183 rem -------ITK Installation------------
184 rem -----------------------------------
185 rem ----------Extracting---------------
186 cd %thirdpartyGeneration%\thirdparty_source
187 %zipPath% x InsightToolkit-3.20.0.zip
188 del InsightToolkit-3.20.0.zip
189 rem ----------Installing---------------
193 cmake -G"Visual Studio 10" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin
194 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
195 cmake -D USE_DEBUG_LIB:BOOL=%buildType% CMakeCache.txt
197 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
198 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
200 rem ------End ITK Installation---------
202 rem -----------------------------------
203 rem ------XERCES Installation----------
204 rem -----------------------------------
205 rem ----------Extracting---------------
206 cd %thirdpartyGeneration%\thirdparty_source
207 %zipPath% x xerces-c-3.1.1.zip
208 del xerces-c-3.1.1.zip
209 rem ----------Installing---------------
210 cd %sourcepath%\%xercesc%\projects\Win32\VC10\xerces-all
211 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=build
212 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
213 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
214 rem -----End XERCES Installation-------