X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Install_ThirdParty%2Fscripts%2Finstall_thirdparty_all.bat;h=86e905831e5f8fa5a0df23411053af3b38a7aa64;hb=be9323e35ba1081cc4d260388182ffbff3136869;hp=ca4fd01fdf1b7004c88b5de4810935a84fe34861;hpb=90d58dbfb6458016933a0e9f96150d5c93b3b661;p=creaToolsTools.git diff --git a/Install_ThirdParty/scripts/install_thirdparty_all.bat b/Install_ThirdParty/scripts/install_thirdparty_all.bat index ca4fd01..86e9058 100644 --- a/Install_ThirdParty/scripts/install_thirdparty_all.bat +++ b/Install_ThirdParty/scripts/install_thirdparty_all.bat @@ -1,7 +1,19 @@ @echo off echo ----------------------------------- -echo ------Asking Architecture---------- +echo ------Installing Libraries--------- echo ----------------------------------- + +echo ----------------------------------- +echo ---Setting Environment Variables--- +echo ----------------------------------- + +set thirdpartyGeneration=%1 +set buildType=%2 + +set installpath=%thirdpartyGeneration%\thirdparty_install\%buildType% +set binpath=%thirdpartyGeneration%\thirdparty_bin\%buildType% +set sourcepath=%thirdpartyGeneration%\thirdparty_source\%buildType% + if %PROCESSOR_ARCHITECTURE%==x86 ( set ProgramFilesPath_x86=%ProgramFiles% echo "Architecture found = x86" @@ -11,57 +23,24 @@ if %PROCESSOR_ARCHITECTURE%==x86 ( echo "Architecture found = x64" ) -echo ----End Asking Architecture-------- - -echo ----------------------------------- -echo ---Setting Environment Variables---- -echo ----------------------------------- - -set thirdpartyGeneration=%1 -set buildType=%2 - -set urlCreatisSource=http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source -set urlCreatisSource=http://www.creatis.insa-lyon.fr/~caceres/software - -set zipPath="%ProgramFilesPath_x86%\7-Zip\7z.exe" -set "miktex=%ProgramFiles(x86)%\MiKTeX 2.9" set vcvarsall="%ProgramFilesPath_x86%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" -set wgetPath=%cd%\..\..\windows\creaTools_win_installers\CreaTools_v2_0_0_win32_installer\bin\wget.exe - -if not exist %zipPath% set zipPath="%ProgramFilesPath_x64%\7-Zip\7z.exe" -if not exist %zipPath% ( - echo ERROR!!! 7Zip has not been found in the system - exit -) -if not exist %vcvarsall% set zipPath="%ProgramFilesPath_x64%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" +if not exist %vcvarsall% set vcvarsall="%ProgramFilesPath_x64%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" if not exist %vcvarsall% ( echo ERROR!!! Visual Studio has not been found in the system exit ) -if "%miktex%"=="\MiKTeX 2.9" set "miktex=%ProgramFiles%\MiKTeX 2.9" -if "%miktex%"=="\MiKTeX 2.9" ( - echo ERROR!!! MiKTex has not been found in the system - exit -) -if not exist %wgetPath% ( - echo ERROR!!! wget has not been found in the system - exit -) - -set installpath=%thirdpartyGeneration%\thirdparty_install -set binpath=%thirdpartyGeneration%\thirdparty_bin -set sourcepath=%thirdpartyGeneration%\thirdparty_source - -set qt=Qt +set qt=qt +set jom=jom set wxWidgets=wxWidgets -set boost=Boost +set boost=boost set xercesc=xerces -set itk=ITK +set itk=itk set gdcm=gdcm -set vtk=VTK +set vtk=vtk set QTDIR=%sourcepath%\%qt% +set JOMDIR=%sourcepath%\%jom% set WXDIR=%sourcepath%\%wxWidgets% set BOOSTDIR=%sourcepath%\%boost% set XERCESDIR=%sourcepath%\%xercesc% @@ -72,235 +51,114 @@ set GDCMSRCDIR=%sourcepath%\%gdcm% echo ----------------------------------- echo Environment variables Configuration echo ----------------------------------- -echo %thirdpartyGeneration% -echo %buildType% -echo %wgetPath% -echo %urlCreatisSource% -echo %zipPath% -echo %vcvarsall% -echo %installpath% -echo %binpath% -echo %sourcepath% -echo %qt% -echo %wxWidgets% -echo %boost% -echo %xercesc% -echo %itk% -echo %gdcm% -echo %vtk% -echo %QTDIR% -echo %WXDIR% -echo %BOOSTDIR% -echo %XERCESDIR% -echo %ITKSRCDIR% -echo %VTKSRCDIR% -echo %GDCMSRCDIR% +echo ThirdpartyGeneration=%thirdpartyGeneration% +echo BuildType=%buildType% +echo wget=%wgetPath% +echo MikTex=%miktex% +echo urlCreatis=%urlCreatisSource% +echo 7zip=%zipPath% +echo Visual Studio=%vcvarsall% +echo InstallPath=%installpath% +echo BinPath=%binpath% +echo SourcePath=%sourcepath% +echo QT=%qt% +echo WX=%wxWidgets% +echo BOOST=%boost% +echo Xercesc=%xercesc% +echo ITK=%itk% +echo GDCM=%gdcm% +echo VTK=%vtk% +echo QTDIR=%QTDIR% +echo WKDIR=%WXDIR% +echo BOOSTDIR=%BOOSTDIR% +echo XERCESDIR=%XERCESDIR% +echo ITKSRCDIR=%ITKSRCDIR% +echo VTKSRCDIR=%VTKSRCDIR% +echo GDCMDIR=%GDCMSRCDIR% +echo JOMDIR=%JOMDIR% +echo ----------------------------------- echo ---End Setting Global Variables---- echo ----------------------------------- call %vcvarsall% -echo ----------------------------------- -echo -------Creating Folders------------ -echo ----------------------------------- - - - -rmdir %binpath% /s /q - -rmdir %thirdpartyGeneration% /s /q -mkdir %thirdpartyGeneration% -cd %thirdpartyGeneration% -mkdir thirdparty_source -mkdir thirdparty_bin -mkdir thirdparty_install - - -echo ------End Creating Folders--------- - -echo ----------------------------------- -echo ------Downloading Sources---------- -echo ----------------------------------- - -cd %thirdpartyGeneration%\thirdparty_source\ -%wgetPath% %urlCreatisSource%/qt-4.7.3.zip -%wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z -%wgetPath% %urlCreatisSource%/boost_1_47_0.7z -%wgetPath% %urlCreatisSource%/vtk-5.8.0.tar.gz -%wgetPath% %urlCreatisSource%/InsightToolkit-3.20.0.zip -%wgetPath% %urlCreatisSource%/gdcm_11_Oct_2011.tar.gz -%wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip -%wgetPath% %urlCreatisSource%/tth_exe.zip -echo ------End Downloading Sources------ - echo ----------------------------------- echo --------Qt Installation------------ echo ----------------------------------- -echo ----------Extracting--------------- - -cd %sourcepath% -%zipPath% x %sourcepath%\qt-4.7.3.zip -del %sourcepath%\qt-4.7.3.zip - -echo --------Renaming Folder------------ - -rename qt-everywhere-opensource-src-4.7.3 %qt% - -echo ----------Installing--------------- - - cd %QTDIR% +set QMAKESPEC=win32-msvc2010 - -if %PROCESSOR_ARCHITECTURE%==x86 ( echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp -) else ( -echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp -) -nmake -cd C:\ +%JOMDIR%\jom.exe -j %NUMBER_OF_PROCESSORS% -echo ------End QT Installation---------- +cd C:\ echo ----------------------------------- echo -----wxWidgets Installation-------- echo ----------------------------------- -echo ----------Extracting--------------- - -cd %sourcepath% -md %wxWidgets% -cd %wxWidgets% -%zipPath% x %sourcepath%\wxWidgets-2.9.2.7z -del %sourcepath%\wxWidgets-2.9.2.7z - -echo ----------Installing--------------- - -cd %sourcepath%\%wxWidgets%\build\msw -nmake -f makefile.vc BUILD=%buildType% UNICODE=1 SHARED=1 +cd %WXDIR%\build\msw +nmake -f makefile.vc BUILD=%buildType% UNICODE=0 SHARED=1 cd C:\ -echo ----End wxWidgets Installation----- - echo ----------------------------------- echo ------Boost Installation----------- echo ----------------------------------- -echo ----------Extracting--------------- -cd %sourcepath% -%zipPath% x %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z -del %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z - -echo --------Renaming Folder------------ - -rename boost_1_47_0 %boost% - -echo ----------Installing--------------- +mkdir %binpath%\%boost%Bin +mkdir %installpath%\%boost% cd %sourcepath%\%boost% -call bootstrap.bat -if %PROCESSOR_ARCHITECTURE%==x86 ( - - b2.exe --toolset=msvc-10.0 --build-type=complete stage - -) else ( - -cd stage - b2.exe --toolset=msvc-10.0 --build-type=complete architecture=x86 address-model=64 stage +call bootstrap.bat +bjam.exe -j %NUMBER_OF_PROCESSORS% --toolset=msvc-10.0 --build-type=complete --build-dir=%binpath%\%boost%Bin --link=shared --runtime-link=shared --prefix=%installpath%\%boost% install +cd C:\ -) -cd C:\ +echo ----------------------------------- +echo -------VTK Installation------------ +echo ----------------------------------- -echo -----End Boost Installation-------- +cd %binpath% +mkdir %vtk%Bin +cd %vtk%Bin +cmake -G"Visual Studio 10" -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 +FOR /R %%a IN (*.sln) DO msbuild %%a /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% +msbuild /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% INSTALL.vcxproj +cd c:\ echo ----------------------------------- echo -------ITK Installation------------ echo ----------------------------------- echo ----------Extracting--------------- -cd %sourcepath% -%zipPath% x InsightToolkit-3.20.0.zip -del InsightToolkit-3.20.0.zip - -echo ----------Installing--------------- - cd %binpath% mkdir %itk%Bin cd %itk%Bin -cmake -G"Visual Studio 10" -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 -G"Visual Studio 10" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin +cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%itk%\ CMakeCache.txt +cmake -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 CMakeCache.txt -FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType% -msbuild /p:Configuration=%buildType% INSTALL.vcxproj +FOR /R %%a IN (*.sln) DO msbuild %%a /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% +msbuild /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% INSTALL.vcxproj cd c:\ -echo ------End ITK Installation--------- - echo ----------------------------------- echo ------XERCES Installation---------- echo ----------------------------------- -echo ----------Extracting--------------- - -cd %sourcepath% -%zipPath% x xerces-c-3.1.1.zip -del xerces-c-3.1.1.zip - -echo ----------Installing--------------- - cd %sourcepath%\%xercesc%\projects\Win32\VC10\xerces-all -FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=build -FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType% -msbuild /p:Configuration=%buildType% INSTALL.vcxproj - -echo -----End XERCES Installation------- - - - -echo ----------------------------------- -echo -------VTK Installation------------ -echo ----------------------------------- -echo ----------Extracting--------------- - -cd %sourcepath% -%zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz -%zipPath% x %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar -cd %thirdpartyGeneration%\thirdparty_source\VTK -del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar.gz -del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar - -echo ----------Installing--------------- - -cd %binpath% -mkdir %vtk%Bin -cd %vtk%Bin -cmake -G"Visual Studio 10" -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 -FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType% -msbuild /p:Configuration=%buildType% INSTALL.vcxproj -cd c:\ - -echo ------End VTK Installation--------- +FOR /R %%a IN (*.sln) DO msbuild %%a /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% +FOR /R %%a IN (*.sln) DO msbuild %%a /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% +msbuild /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% INSTALL.vcxproj echo ----------------------------------- echo -------GDCM Installation----------- echo ----------------------------------- -echo ----------Extracting--------------- - -cd %sourcepath% -%zipPath% x gdcm_11_Oct_2011.tar.gz -%zipPath% x gdcm_11_Oct_2011.tar -del gdcm_11_Oct_2011.tar.gz -del gdcm_11_Oct_2011.tar - -echo ----------Installing--------------- - cd %binpath% mkdir %gdcm%Bin @@ -308,22 +166,14 @@ mkdir %gdcm%Bin cd %gdcm%Bin cmake -G"Visual Studio 10" -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%gdcm%\ CMakeCache.txt -cmake -D VTK_DIR:PATH=%binpath%\%vtk%Bin -D GDCM_VTK:BOOL=ON -D BUILD_TESTING:BOOL=OFF -D GDCM_NAME_SPACE:STRING=gdcm13 CMakeCache.txt +cmake -D VTK_DIR:PATH=%installpath%\%vtk%\ -D GDCM_VTK:BOOL=ON -D BUILD_TESTING:BOOL=OFF -D GDCM_NAME_SPACE:STRING=gdcm13 CMakeCache.txt cmake CMakeCache.txt -FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType% -msbuild /p:Configuration=%buildType% INSTALL.vcxproj +FOR /R %%a IN (*.sln) DO msbuild %%a /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% +msbuild /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% INSTALL.vcxproj cd c:\ -echo -----End GDCM Installation--------- - echo ----------------------------------- -echo -------TTH Installation------------ +echo ---End of Installing Libraries----- echo ----------------------------------- -echo ----------Extracting--------------- -%zipPath% x tth_exe.zip -rename tth_exe tth -del tth_exe.zip -echo ------End TTH Installation--------- -cd c:\ -@echo on \ No newline at end of file +exit /B \ No newline at end of file