]> Creatis software - creaToolsTools.git/blobdiff - Install_ThirdParty/scripts/install_thirdparty_all.bat
Bug #1908
[creaToolsTools.git] / Install_ThirdParty / scripts / install_thirdparty_all.bat
index e574efd837b68d2674f166a7142523977f959ded..e37a3e354c962e5a9738676a69ad271fde5195bf 100644 (file)
@@ -1,26 +1,3 @@
-REM ---------------------------------------------------------------------
-REM
-REM Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
-REM                        pour la Santé)
-REM Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
-REM
-REM  This software is governed by the CeCILL-B license under French law and 
-REM  abiding by the rules of distribution of free software. You can  use, 
-REM  modify and/ or redistribute the software under the terms of the CeCILL-B 
-REM  license as circulated by CEA, CNRS and INRIA at the following URL 
-REM  http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html 
-REM  or in the file LICENSE.txt.
-REM
-REM  As a counterpart to the access to the source code and  rights to copy,
-REM  modify and redistribute granted by the license, users are provided only
-REM  with a limited warranty  and the software's author,  the holder of the
-REM  economic rights,  and the successive licensors  have only  limited
-REM  liability. 
-REM
-REM  The fact that you are presently reading this means that you have had
-REM  knowledge of the CeCILL-B license and that you accept its terms.
-REM ------------------------------------------------------------------------  
-
 @echo off
 echo -----------------------------------
 echo ------Installing Libraries---------
@@ -105,9 +82,11 @@ echo -----------------------------------
 
 
 if %x86Comp%==ON (
+       set addressmodel=32
        call %vcvarsall%
        echo "Compilation forced x86"
 ) else (
+       set addressmodel=64
        if %PROCESSOR_ARCHITECTURE%==x86 (
                call %vcvarsall%
        ) else (
@@ -115,18 +94,19 @@ if %x86Comp%==ON (
        )
 )
 
+if %EEDinstallQT%==FALSE GOTO SKIPINSTALLQT
 echo -----------------------------------
 echo --------Qt Installation------------
 echo -----------------------------------
 cd %QTDIR%
 set QMAKESPEC=win32-msvc2010
-
 echo y | configure -%buildType% -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp >> %LogFolder%\qtInstall.log 2>&1
-
 %JOMDIR%\jom.exe -j %NUMBER_OF_PROCESSORS% >> %LogFolder%\qtInstall.log 2>&1
-
 cd C:\
+:SKIPINSTALLQT
+
 
+if %EEDinstallWXWIDGETS%==FALSE GOTO SKIPINSTALLWXWIDGETS
 echo -----------------------------------
 echo -----wxWidgets Installation--------
 echo -----------------------------------
@@ -141,37 +121,51 @@ if %x86Comp%==ON (
        )
 )
 cd C:\
+:SKIPINSTALLWXWIDGETS
 
+
+if %EEDinstallBOOST%==FALSE GOTO SKIPINSTALLBOOST
 echo -----------------------------------
 echo ------Boost Installation-----------
 echo -----------------------------------
-
 mkdir %binpath%\%boost%Bin 
 mkdir %installpath%\%boost%
-
 cd %sourcepath%\%boost%
-
 call bootstrap.bat >> %LogFolder%\boostInstall.log 2>&1
 
-if %x86Comp%==ON (
-       bjam.exe -j %NUMBER_OF_PROCESSORS% --prefix=%installpath%\%boost% --toolset=msvc-10.0 --build-type=complete --build-dir=%binpath%\%boost%Bin --link=shared --runtime-link=shared install >> %LogFolder%\boostInstall.log 2>&1
-) else (
-       if %PROCESSOR_ARCHITECTURE%==x86 (
-               bjam.exe -j %NUMBER_OF_PROCESSORS% --prefix=%installpath%\%boost% --toolset=msvc-10.0 --build-type=complete --build-dir=%binpath%\%boost%Bin --link=shared --runtime-link=shared install >> %LogFolder%\boostInstall.log 2>&1
-       ) else (
-               bjam.exe -j %NUMBER_OF_PROCESSORS% --prefix=%installpath%\%boost% --toolset=msvc-10.0 architecture=x86 address-model=64 --build-type=complete --build-dir=%binpath%\%boost%Bin --link=shared --runtime-link=shared install >> %LogFolder%\boostInstall.log 2>&1
-       )
-)
+bjam.exe -j %NUMBER_OF_PROCESSORS% --address-model=%addressmodel% --prefix=%installpath%\%boost% --build-dir=%binpath%\%boost%Bin toolset=msvc-10.0 variant=%buildType% link=shared runtime-link=shared install >> %LogFolder%\boostInstall.log 2>&1
+bjam.exe -j %NUMBER_OF_PROCESSORS% --address-model=%addressmodel% --prefix=%installpath%\%boost% --build-dir=%binpath%\%boost%Bin toolset=msvc-10.0 variant=%buildType% link=shared runtime-link=shared install >> %LogFolder%\boostInstall.log 2>&1
+
+
+::if %x86Comp%==ON (
+::     echo -install_thirdparty_all-EED1a 
+::     bjam.exe -j %NUMBER_OF_PROCESSORS% --prefix=%installpath%\%boost% --toolset=msvc-10.0 --build-type=complete --build-dir=%binpath%\%boost%Bin --link=shared --runtime-link=shared install >> %LogFolder%\boostInstall.log 2>&1
+::     echo -install_thirdparty_all-EED1b
+::) else (
+::     if %PROCESSOR_ARCHITECTURE%==x86 (
+::             echo -install_thirdparty_all-EED2a
+::             bjam.exe -j %NUMBER_OF_PROCESSORS% --prefix=%installpath%\%boost% --toolset=msvc-10.0 --build-type=complete --build-dir=%binpath%\%boost%Bin --link=shared --runtime-link=shared install >> %LogFolder%\boostInstall.log 2>&1
+::             echo -install_thirdparty_all-EED2b
+::     ) else (
+::             echo -install_thirdparty_all-EED3a
+::             bjam.exe -j %NUMBER_OF_PROCESSORS% --address-model=64 --prefix=%installpath%\%boost% --build-dir=%binpath%\%boost%Bin toolset=msvc-10.0 variant=%buildType% link=shared runtime-link=shared install >> %LogFolder%\boostInstall.log 2>&1
+::             echo -install_thirdparty_all-EED3b
+::             bjam.exe -j %NUMBER_OF_PROCESSORS% --address-model=64 --prefix=%installpath%\%boost% --build-dir=%binpath%\%boost%Bin toolset=msvc-10.0 variant=%buildType% link=shared runtime-link=shared install >> %LogFolder%\boostInstall.log 2>&1
+::             echo -install_thirdparty_all-EED3c
+::     )
+::)
+
 cd C:\
+:SKIPINSTALLBOOST
+
 
+if %EEEDinstallVTK%==FALSE GOTO SKIPINSTALLVTK
 echo -----------------------------------
 echo -------VTK Installation------------
 echo -----------------------------------
-
 cd  %binpath%
 mkdir %vtk%Bin
 cd %vtk%Bin
-
 if %x86Comp%==ON (
        cmake -G"Visual Studio 10"  -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin >> %LogFolder%\vtkInstall.log 2>&1
 ) else (
@@ -181,25 +175,22 @@ if %x86Comp%==ON (
                cmake -G"Visual Studio 10 Win64"  -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin >> %LogFolder%\vtkInstall.log 2>&1
        )
 )
-
 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%vtk%\ CMakeCache.txt >> %LogFolder%\vtkInstall.log 2>&1
 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 >> %LogFolder%\vtkInstall.log 2>&1
 cmake CMakeCache.txt >> %LogFolder%\vtkInstall.log 2>&1
 FOR /R %%a IN (*.sln) DO msbuild %%a /m:%NUMBER_OF_PROCESSORS% /target:ALL_BUILD /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% >> %LogFolder%\vtkInstall.log 2>&1
 msbuild /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% INSTALL.vcxproj >> %LogFolder%\vtkInstall.log 2>&1
-
 cd c:\
+:SKIPINSTALLVTK
 
 
+if %EEDinstallGDCM%==FALSE GOTO SKIPINSTALLGDCM
 echo -----------------------------------
 echo -------GDCM Installation-----------
 echo -----------------------------------
-
 cd  %binpath%
 mkdir %gdcm%Bin
-
 cd %gdcm%Bin
-
 if %x86Comp%==ON (
        cmake -G"Visual Studio 10"  -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin >> %LogFolder%\GDCMInstall.log 2>&1
 ) else (
@@ -209,23 +200,22 @@ if %x86Comp%==ON (
                cmake -G"Visual Studio 10 Win64"  -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin >> %LogFolder%\GDCMInstall.log 2>&1
        )
 )
-
 cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%gdcm%\ CMakeCache.txt >> %LogFolder%\GDCMInstall.log 2>&1
 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 >> %LogFolder%\GDCMInstall.log 2>&1
 cmake CMakeCache.txt >> %LogFolder%\GDCMInstall.log 2>&1
 FOR /R %%a IN (*.sln) DO msbuild %%a /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% >> %LogFolder%\GDCMInstall.log 2>&1
 msbuild INSTALL.vcxproj /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% >> %LogFolder%\GDCMInstall.log 2>&1
-
 cd c:\
+:SKIPINSTALLGDCM
 
+
+if %EEDinstallITK%==FALSE GOTO SKIPINSTALLITK
 echo -----------------------------------
 echo -------ITK Installation------------
 echo -----------------------------------
-
 cd  %binpath%
 mkdir %itk%Bin
 cd %itk%Bin
-
 if %x86Comp%==ON (
        cmake -G"Visual Studio 10" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin >> %LogFolder%\ITKInstall.log 2>&1
 ) else (
@@ -240,9 +230,12 @@ cmake -D BUILD_EXAMPLES:BOOL=OFF -D BUILD_TESTING:BOOL=OFF -D BUILD_SHARED_LIBS:
 cmake CMakeCache.txt >> %LogFolder%\ITKInstall.log 2>&1
 FOR /R %%a IN (*.sln) DO msbuild %%a /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% >> %LogFolder%\ITKInstall.log 2>&1
 msbuild INSTALL.vcxproj /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% >> %LogFolder%\ITKInstall.log 2>&1
-
 cd c:\
+:SKIPINSTALLITK
 
+
+
+if %EEDinstallXERCES%==FALSE GOTO SKIPINSTALLXERCES
 echo -----------------------------------
 echo ------XERCES Installation----------
 echo -----------------------------------
@@ -250,6 +243,9 @@ cd  %sourcepath%\%xercesc%\projects\Win32\VC10\xerces-all
 FOR /R %%a IN (*.sln) DO msbuild %%a /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% >> %LogFolder%\XERCESInstall.log 2>&1
 FOR /R %%a IN (*.sln) DO msbuild %%a /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% >> %LogFolder%\XERCESInstall.log 2>&1
 msbuild INSTALL.vcxproj /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% >> %LogFolder%\XERCESInstall.log 2>&1
+cd c:\
+:SKIPINSTALLXERCES
+
 
 echo -----------------------------------
 echo ---End of Installing Libraries-----