1 rem ---Asking Architecture-------------
3 if %PROCESSOR_ARCHITECTURE%==x86 (
5 set ProgramFilesPath=%ProgramFiles%
9 set ProgramFilesPath=%ProgramFiles(x86)%
14 rem ----Setting Global Variables-------
15 set thirdpartyGeneration=%1
19 set wgetPath=%wgetPath%\..\..\windows\creaTools_win_installers\CreaTools_v2_0_0_win32_installer\bin
20 set zipPath="%ProgramFilesPath%\7-Zip\7z.exe"
21 set urlCreatisSource=http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source
22 set urlCreatisSource=http://www.creatis.insa-lyon.fr/~caceres/software
23 set vcvarsall="%ProgramFilesPath%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
25 set installpath=%thirdpartyGeneration%\thirdparty_install
26 set binpath=%thirdpartyGeneration%\thirdparty_bin
27 set sourcepath=%thirdpartyGeneration%\thirdparty_source
28 set xercesc=xerces-c-3.1.1
29 set itk=InsightToolkit-3.20.0
32 rem ---End Setting Global Variables----
38 rmdir %thirdpartyGeneration% /s /q
39 mkdir %thirdpartyGeneration%
40 cd %thirdpartyGeneration%
41 mkdir thirdparty_source
43 mkdir thirdparty_install
45 rem --------Qt Installation------------
46 rem -------Setting Variables-----------
47 set QTDIR=%thirdpartyGeneration%\thirdparty_source\Qt\4.7.3\
48 rem ----------Downloading--------------
49 cd %thirdpartyGeneration%\thirdparty_source\
52 %wgetPath% %urlCreatisSource%/qt-4.7.3.zip
53 rem ----------Extracting---------------
54 %zipPath% x qt-4.7.3.zip
56 rem --------Renaming Folder------------
57 rename qt-everywhere-opensource-src-4.7.3 4.7.3
58 rem ----------Installing---------------
60 echo y | configure -debug-and-release -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
63 rem ------End QT Installation----------
64 rem -----wxWidgets Installation--------
65 rem -------Setting Variables-----------
66 set WXDIR=%thirdpartyGeneration%\thirdparty_source\wxWidgets\2.9.2\
67 rem ----------Downloading--------------
68 cd %thirdpartyGeneration%\thirdparty_source
71 %wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z
72 rem ----------Extracting---------------
73 %zipPath% x wxWidgets-2.9.2.7z
74 del wxWidgets-2.9.2.7z
75 rem ----------Installing---------------
76 cd %thirdpartyGeneration%\thirdparty_source\wxWidgets\2.9.2\build\msw
77 nmake -f makefile.vc BUILD=debug UNICODE=1 SHARED=1
78 nmake -f makefile.vc BUILD=release UNICODE=1 SHARED=1
80 rem ----End wxWidgets Installation-----
81 rem ------Boost Installation-----------
82 rem -------Setting Variables-----------
83 set BOOSTDIR=%thirdpartyGeneration%\thirdparty_source\Boost\1.47.0\
84 rem ----------Downloading--------------
85 cd %thirdpartyGeneration%\thirdparty_source\
88 %wgetPath% %urlCreatisSource%/boost_1_47_0.7z
89 rem ----------Extracting---------------
90 %zipPath% x boost_1_47_0.7z
92 rem --------Renaming Folder------------
93 rename boost_1_47_0 1.47.0
94 rem ----------Installing---------------
95 cd %thirdpartyGeneration%\thirdparty_source\Boost\1.47.0\
99 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
101 rem -----End Boost Installation--------
103 rem -------GDCM Installation-----------
104 rem -------Setting Variables-----------
105 rem ----------Downloading--------------
106 cd %thirdpartyGeneration%\thirdparty_source
107 %wgetPath% %urlCreatisSource%/gdcm_05_Mai_2011.tar.gz
108 rem ----------Extracting---------------
109 %zipPath% x gdcm_05_Mai_2011.tar.gz
110 %zipPath% x gdcm_05_Mai_2011.tar
111 del gdcm_05_Mai_2011.tar.gz
112 del gdcm_05_Mai_2011.tar
113 rem ----------Installing---------------
117 cmake -G"Visual Studio 10" -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin
118 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%gdcm%\ CMakeCache.txt
119 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
121 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
122 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
124 rem -----End GDCM Installation---------
125 rem -------VTK Installation------------
126 rem ----------Downloading--------------
127 mkdir %thirdpartyGeneration%\thirdparty_source\VTK
128 cd %thirdpartyGeneration%\thirdparty_source\VTK
129 %wgetPath% %urlCreatisSource%/vtk-5.6.1.zip
130 rem ----------Extracting---------------
131 %zipPath% x vtk-5.6.1.zip
133 rem ----------Installing---------------
137 cmake -G"Visual Studio 10" -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin
138 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%vtk%\ CMakeCache.txt
139 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
141 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
142 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
144 rem ------End VTK Installation---------
145 rem -------ITK Installation------------
146 rem ----------Downloading--------------
147 cd %thirdpartyGeneration%\thirdparty_source
148 %wgetPath% %urlCreatisSource%/InsightToolkit-3.20.0.zip
149 rem ----------Extracting---------------
150 %zipPath% x InsightToolkit-3.20.0.zip
151 del InsightToolkit-3.20.0.zip
152 rem ----------Installing---------------
156 cmake -G"Visual Studio 10" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin
157 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
158 cmake -D USE_DEBUG_LIB:BOOL=%buildType% CMakeCache.txt
160 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
161 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
163 rem ------End ITK Installation---------
164 rem ------XERCES Installation----------
165 rem ----------Downloading--------------
166 cd %thirdpartyGeneration%\thirdparty_source
167 %wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip
168 rem ----------Extracting---------------
169 %zipPath% x xerces-c-3.1.1.zip
170 del xerces-c-3.1.1.zip
171 rem ----------Installing---------------
172 cd %sourcepath%\%xercesc%\projects\Win32\VC10\xerces-all
173 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
174 REM msbuild /p:Configuration=%buildType% INSTALL.vcxproj
176 rem -----End XERCES Installation-------