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:\Creatis\Download\crea_Developer_Tools-3.0.0-win32\crea_Developer_Tools-3.0.0\wget.exe
24 set zipPath="%ProgramFilesPath%\7-Zip\7z.exe"
28 echo %ProgramFilesPath%
32 set urlCreatisSource=http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source
33 set urlCreatisSource=http://www.creatis.insa-lyon.fr/~caceres/software
34 set vcvarsall="%ProgramFilesPath%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
36 set installpath=%thirdpartyGeneration%\thirdparty_install
37 set binpath=%thirdpartyGeneration%\thirdparty_bin
38 set sourcepath=%thirdpartyGeneration%\thirdparty_source
40 set xercesc=xerces-c-3.1.1
41 set itk=InsightToolkit-3.20.0
44 rem ---End Setting Global Variables----
45 rem -----------------------------------
49 rem -----------------------------------
50 rem -------Creating Folders------------
51 rem -----------------------------------
54 rmdir %thirdpartyGeneration% /s /q
55 mkdir %thirdpartyGeneration%
56 cd %thirdpartyGeneration%
57 mkdir thirdparty_source
59 mkdir thirdparty_install
60 rem ------End Creating Folders---------
62 rem -----------------------------------
63 rem ------Downloading Sources----------
64 rem -----------------------------------
65 cd %thirdpartyGeneration%\thirdparty_source\
66 %wgetPath% %urlCreatisSource%/qt-4.7.3.zip
67 %wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z
68 %wgetPath% %urlCreatisSource%/boost_1_47_0.7z
69 %wgetPath% %urlCreatisSource%/vtk-5.6.1.zip
70 %wgetPath% %urlCreatisSource%/InsightToolkit-3.20.0.zip
71 %wgetPath% %urlCreatisSource%/gdcm_05_Mai_2011.tar.gz
72 %wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip
73 rem ------End Downloading Sources------
75 rem -----------------------------------
76 rem --------Qt Installation------------
77 rem -----------------------------------
78 rem ---Setting Enviroment Variables----
79 set QTDIR=%thirdpartyGeneration%\thirdparty_source\Qt\4.7.3\
80 rem ----------Extracting---------------
81 cd %thirdpartyGeneration%\thirdparty_source\
84 %zipPath% x %thirdpartyGeneration%\thirdparty_source\qt-4.7.3.zip
85 del %thirdpartyGeneration%\thirdparty_source\qt-4.7.3.zip
87 rem --------Renaming Folder------------
88 rename qt-everywhere-opensource-src-4.7.3 4.7.3
89 rem ----------Installing---------------
91 echo y | configure -debug-and-release -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
94 rem ------End QT Installation----------
96 rem -----------------------------------
97 rem -----wxWidgets Installation--------
98 rem -----------------------------------
99 rem -------Setting Variables-----------
100 set WXDIR=%thirdpartyGeneration%\thirdparty_source\wxWidgets\2.9.2\
101 rem ----------Extracting---------------
102 cd %thirdpartyGeneration%\thirdparty_source
105 %zipPath% x %thirdpartyGeneration%\thirdparty_source\wxWidgets-2.9.2.7z
106 del %thirdpartyGeneration%\thirdparty_source\wxWidgets-2.9.2.7z
107 rem ----------Installing---------------
108 cd %thirdpartyGeneration%\thirdparty_source\wxWidgets\2.9.2\build\msw
109 nmake -f makefile.vc BUILD=debug UNICODE=1 SHARED=1
110 nmake -f makefile.vc BUILD=release UNICODE=1 SHARED=1
112 rem ----End wxWidgets Installation-----
114 rem -----------------------------------
115 rem ------Boost Installation-----------
116 rem -----------------------------------
117 rem -------Setting Variables-----------
118 set BOOSTDIR=%thirdpartyGeneration%\thirdparty_source\Boost\1.47.0\
119 rem ----------Extracting---------------
120 cd %thirdpartyGeneration%\thirdparty_source\
123 %zipPath% x %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
124 del %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
125 rem --------Renaming Folder------------
126 rename boost_1_47_0 1.47.0
127 rem ----------Installing---------------
128 cd %thirdpartyGeneration%\thirdparty_source\Boost\1.47.0\
132 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
134 rem -----End Boost Installation--------
136 rem -----------------------------------
137 rem -------VTK Installation------------
138 rem -----------------------------------
139 rem ----------Extracting---------------
140 mkdir %thirdpartyGeneration%\thirdparty_source\VTK
141 cd %thirdpartyGeneration%\thirdparty_source\VTK
142 %zipPath% x %thirdpartyGeneration%\thirdparty_source\vtk-5.6.1.zip
143 del %thirdpartyGeneration%\thirdparty_source\vtk-5.6.1.zip
144 rem ----------Installing---------------
148 cmake -G"Visual Studio 10" -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin
149 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%vtk%\ CMakeCache.txt
150 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
152 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
153 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
155 rem ------End VTK Installation---------
157 rem -----------------------------------
158 rem -------ITK Installation------------
159 rem -----------------------------------
160 rem ----------Extracting---------------
161 cd %thirdpartyGeneration%\thirdparty_source
162 %zipPath% x InsightToolkit-3.20.0.zip
163 del InsightToolkit-3.20.0.zip
164 rem ----------Installing---------------
168 cmake -G"Visual Studio 10" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin
169 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
170 cmake -D USE_DEBUG_LIB:BOOL=%buildType% CMakeCache.txt
172 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
173 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
175 rem ------End ITK Installation---------
177 rem -----------------------------------
178 rem -------GDCM Installation-----------
179 rem -----------------------------------
180 rem -------Setting Variables-----------
181 rem ----------Extracting---------------
182 cd %thirdpartyGeneration%\thirdparty_source
183 %zipPath% x gdcm_05_Mai_2011.tar.gz
184 %zipPath% x gdcm_05_Mai_2011.tar
185 del gdcm_05_Mai_2011.tar.gz
186 del gdcm_05_Mai_2011.tar
187 rem ----------Installing---------------
191 cmake -G"Visual Studio 10" -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin
192 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%gdcm%\ CMakeCache.txt
193 cmake -D VTK_DIR:PATH=%vtk% -D GDCM_VTK:BOOL=ON -D GDCM_NAME_SPACE:STRING=gdcm13 CMakeCache.txt
195 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
196 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
198 rem -----End GDCM Installation---------
200 rem -----------------------------------
201 rem ------XERCES Installation----------
202 rem -----------------------------------
203 rem ----------Extracting---------------
204 cd %thirdpartyGeneration%\thirdparty_source
205 %zipPath% x xerces-c-3.1.1.zip
206 del xerces-c-3.1.1.zip
207 rem ----------Installing---------------
208 cd %sourcepath%\%xercesc%\projects\Win32\VC10\xerces-all
209 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=build
210 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=release
211 REM msbuild /p:Configuration=%buildType% INSTALL.vcxproj
212 rem -----End XERCES Installation-------