set thirdpartyGeneration=%1 set buildType=%2 set QTDIR=C:\Qt\2010.05\qt set wgetPath=%~p0 set wgetPath=%wgetPath%\..\..\windows\creaTools_win_installers\CreaTools_v2_0_0_win32_installer\bin set zipPath="%ProgramFiles(x86)%\7-Zip" set urlCreatisSource=http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source set vcvarsall="%ProgramFiles(x86)%\Microsoft Visual Studio 10.0\VC"\vcvarsall.bat set installpath=%thirdpartyGeneration%\thirdparty_install set binpath=%thirdpartyGeneration%\thirdparty_bin set sourcepath=%thirdpartyGeneration%\thirdparty_source set xercesc=xerces-c-3.1.1 set itk=InsightToolkit-3.20.0 set gdcm=gdcm set vtk=VTK goto next rmdir %binpath% /s /q rmdir %thirdpartyGeneration% /s /q mkdir %thirdpartyGeneration% cd %thirdpartyGeneration% mkdir thirdparty_source mkdir thirdparty_bin mkdir thirdparty_install cd thirdparty_source rem ---------DOWNLOAD------------------ %wgetPath%\wget.exe %urlCreatisSource%/xerces-c-3.1.1.zip %wgetPath%\wget.exe %urlCreatisSource%/InsightToolkit-3.20.0.tar.gz %wgetPath%\wget.exe %urlCreatisSource%/gdcm_08_Dic_2009.tar.gz %wgetPath%\wget.exe %urlCreatisSource%/vtk-5.6.1.tar.gz %wgetPath%\wget.exe %urlCreatisSource%/wxWidgets-2.9.1.7z rem ---------Extracting------------------ %zipPath%\7z.exe x xerces-c-3.1.1.zip %zipPath%\7z.exe x InsightToolkit-3.20.0.tar.gz %zipPath%\7z.exe x InsightToolkit-3.20.0.tar %zipPath%\7z.exe x gdcm_08_Dic_2009.tar.gz %zipPath%\7z.exe x gdcm_08_Dic_2009.tar %zipPath%\7z.exe x vtk-5.6.1.tar.gz %zipPath%\7z.exe x vtk-5.6.1.tar mkdir wxWidgets cd wxWidgets %zipPath%\7z.exe x ..\wxWidgets-2.9.1.7z rem ------------- xercesc -------------------- cd %binpath% mkdir %xercesc%Bin cd %xercesc%Bin cmake -G"Visual Studio 10 2008 Win64" -H%sourcepath%\%xercesc% -B%binpath%\%xercesc%Bin cmake -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%xercesc%\ CMakeCache.txt rem ------------- itk -------------------- cd %binpath% mkdir %itk%Bin cd %itk%Bin cmake -G"Visual Studio 9 2008 Win64" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin 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 cmake -D USE_DEBUG_LIB:BOOL=%buildType% CMakeCache.txt cmake CMakeCache.txt call %vcvarsall% FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType% FOR /R %%a IN (*.sln) DO msbuild /p:Configuration=%buildType% INSTALL.vcproj :next rem ------------- vtk -------------------- cd %binpath% mkdir %vtk%Bin cd %vtk%Bin cmake -G"Visual Studio 10 Win64" -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%vtk%\ CMakeCache.txt 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 cmake CMakeCache.txt call %vcvarsall% FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType% FOR /R %%a IN (*.sln) DO msbuild /p:Configuration=%buildType% INSTALL.vcproj pause