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=C:\Users\diego\Desktop\crea_Developer_Tools-3.0.0-win32\crea_Developer_Tools-3.0.0\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
37 rem ---End Setting Global Variables----
38 rem -----------------------------------
42 rem -----------------------------------
43 rem -------Creating Folders------------
44 rem -----------------------------------
47 rmdir %thirdpartyGeneration% /s /q
48 mkdir %thirdpartyGeneration%
49 cd %thirdpartyGeneration%
50 mkdir thirdparty_source
52 mkdir thirdparty_install
53 rem ------End Creating Folders---------
55 rem -----------------------------------
56 rem ------Downloading Sources----------
57 rem -----------------------------------
58 cd %thirdpartyGeneration%\thirdparty_source\
59 %wgetPath% %urlCreatisSource%/qt-4.7.3.zip
60 %wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z
61 %wgetPath% %urlCreatisSource%/boost_1_47_0.7z
62 %wgetPath% %urlCreatisSource%/vtk-5.6.1.zip
63 %wgetPath% %urlCreatisSource%/InsightToolkit-3.20.0.zip
64 %wgetPath% %urlCreatisSource%/gdcm_05_Mai_2011.tar.gz
65 %wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip
66 rem ------End Downloading Sources------
68 rem -----------------------------------
69 rem --------Qt Installation------------
70 rem -----------------------------------
71 rem ---Setting Enviroment Variables----
72 set QTDIR=%thirdpartyGeneration%\thirdparty_source\Qt\4.7.3\
73 rem ----------Extracting---------------
74 cd %thirdpartyGeneration%\thirdparty_source\
77 %zipPath% x %thirdpartyGeneration%\thirdparty_source\qt-4.7.3.zip
78 del %thirdpartyGeneration%\thirdparty_source\qt-4.7.3.zip
80 rem --------Renaming Folder------------
81 rename qt-everywhere-opensource-src-4.7.3 4.7.3
82 rem ----------Installing---------------
84 echo y | configure -debug-and-release -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
87 rem ------End QT Installation----------
89 rem -----------------------------------
90 rem -----wxWidgets Installation--------
91 rem -----------------------------------
92 rem -------Setting Variables-----------
93 set WXDIR=%thirdpartyGeneration%\thirdparty_source\wxWidgets\2.9.2\
94 rem ----------Extracting---------------
95 cd %thirdpartyGeneration%\thirdparty_source
98 %zipPath% x %thirdpartyGeneration%\thirdparty_source\wxWidgets-2.9.2.7z
99 del %thirdpartyGeneration%\thirdparty_source\wxWidgets-2.9.2.7z
100 rem ----------Installing---------------
101 cd %thirdpartyGeneration%\thirdparty_source\wxWidgets\2.9.2\build\msw
102 nmake -f makefile.vc BUILD=debug UNICODE=1 SHARED=1
103 nmake -f makefile.vc BUILD=release 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\
125 b2 -j 2 --build-dir=%thirdpartyGeneration%\thirdparty_source\Boost\1.47.0\boost-build toolset=msvc --build-type=msvc install --prefix=%thirdpartyGeneration%\thirdparty_source\Boost\1.47.0\boost-build
127 rem -----End Boost Installation--------
129 rem -----------------------------------
130 rem -------VTK Installation------------
131 rem -----------------------------------
132 rem ----------Extracting---------------
133 mkdir %thirdpartyGeneration%\thirdparty_source\VTK
134 cd %thirdpartyGeneration%\thirdparty_source\VTK
135 %zipPath% x %thirdpartyGeneration%\thirdparty_source\vtk-5.6.1.zip
136 del %thirdpartyGeneration%\thirdparty_source\vtk-5.6.1.zip
137 rem ----------Installing---------------
141 cmake -G"Visual Studio 10" -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin
142 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%vtk%\ CMakeCache.txt
143 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
145 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
146 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
148 rem ------End VTK Installation---------
150 rem -----------------------------------
151 rem -------ITK Installation------------
152 rem -----------------------------------
153 rem ----------Extracting---------------
154 cd %thirdpartyGeneration%\thirdparty_source
155 %zipPath% x InsightToolkit-3.20.0.zip
156 del InsightToolkit-3.20.0.zip
157 rem ----------Installing---------------
161 cmake -G"Visual Studio 10" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin
162 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
163 cmake -D USE_DEBUG_LIB:BOOL=%buildType% CMakeCache.txt
165 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
166 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
168 rem ------End ITK Installation---------
170 rem -----------------------------------
171 rem -------GDCM Installation-----------
172 rem -----------------------------------
173 rem -------Setting Variables-----------
174 rem ----------Extracting---------------
175 cd %thirdpartyGeneration%\thirdparty_source
176 %zipPath% x gdcm_05_Mai_2011.tar.gz
177 %zipPath% x gdcm_05_Mai_2011.tar
178 del gdcm_05_Mai_2011.tar.gz
179 del gdcm_05_Mai_2011.tar
180 rem ----------Installing---------------
184 cmake -G"Visual Studio 10" -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin
185 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%gdcm%\ CMakeCache.txt
186 cmake -D VTK_DIR:PATH=%vtk% -D GDCM_VTK:BOOL=ON -D GDCM_NAME_SPACE:STRING=gdcm13 CMakeCache.txt
188 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
189 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
191 rem -----End GDCM Installation---------
193 rem -----------------------------------
194 rem ------XERCES Installation----------
195 rem -----------------------------------
196 rem ----------Extracting---------------
197 cd %thirdpartyGeneration%\thirdparty_source
198 %zipPath% x xerces-c-3.1.1.zip
199 del xerces-c-3.1.1.zip
200 rem ----------Installing---------------
201 cd %sourcepath%\%xercesc%\projects\Win32\VC10\xerces-all
202 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=build
203 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=release
204 REM msbuild /p:Configuration=%buildType% INSTALL.vcxproj
205 rem -----End XERCES Installation-------