]> Creatis software - creaToolsTools.git/blobdiff - Install_ThirdParty/scripts/install_thirdparty_all.bat
2017 SQLite Debug in version CreaTools win64 RELEASE
[creaToolsTools.git] / Install_ThirdParty / scripts / install_thirdparty_all.bat
index 620450d816fd26b8e2a3bb11cc86b7a80c463a56..5cffb178cf2b227ac68d572b6cc09985eb2bc297 100644 (file)
-rem -----------------------------------
-rem ------Asking Architecture----------
-rem -----------------------------------
 @echo off
-if %PROCESSOR_ARCHITECTURE%==x86 (
-@echo on
-  set ProgramFilesPath=%ProgramFiles%
-@echo off
-) else (
-@echo on
-  set ProgramFilesPath="%ProgramFiles(x86)%"
-@echo off
-)
-@echo on
-rem ----End Asking Architecture--------
+echo -----------------------------------
+echo ------Installing Libraries---------
+echo -----------------------------------
+
+echo -----------------------------------
+echo ---Setting Environment Variables---
+echo -----------------------------------
 
-rem -----------------------------------
-rem ---Setting Enviroment Variables----
-rem -----------------------------------
 set thirdpartyGeneration=%1
 set buildType=%2
+::The following line is to force x86 or x64 compilation
+set x86Comp=%3
+
+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"
+) else (
+  set "ProgramFilesPath_x64=%ProgramFiles%"
+  set "ProgramFilesPath_x86=%ProgramFiles(x86)%"
+  echo "Architecture found = x64"
+)
+
+set vcvarsall="%ProgramFilesPath_x86%\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
+)
+
+set qt=qt
+set jom=jom
+set wxWidgets=wxWidgets
+set boost=boost
+set xercesc=xerces
+set itk=itk
+set gdcm=gdcm13
+set vtk=vtk
+set sqlite=sqlite
+
+set QTDIR=%sourcepath%\%qt%
+set JOMDIR=%sourcepath%\%jom%
+set WXDIR=%sourcepath%\%wxWidgets%
+set BOOSTDIR=%sourcepath%\%boost%
+set XERCESDIR=%sourcepath%\%xercesc%
+set ITKSRCDIR=%sourcepath%\%itk%
+set VTKSRCDIR=%sourcepath%\%VTK%
+set GDCMSRCDIR=%sourcepath%\%gdcm%
+set SQLITESRCDIR=%sourcepath%\%sqlite%
+set LogFolder=%thirdpartyGeneration%\installLog
+
+echo -----------------------------------
+echo Environment variables Configuration
+echo -----------------------------------
+echo ThirdpartyGeneration=%thirdpartyGeneration%
+echo BuildType=%buildType%
+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 SQLITEDIR=%SQLITESRCDIR%
+
+echo -----------------------------------
+echo ---End Setting Global Variables----
+echo -----------------------------------
+
 
-set wgetPath=%cd%\..\..\windows\creaTools_win_installers\CreaTools_v2_0_0_win32_installer\bin\wget.exe
-set zipPath="%ProgramFilesPath%\7-Zip\7z.exe"
-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 vcvarsall="%ProgramFilesPath%\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
-rem ---End Setting Global Variables----
-rem -----------------------------------
-
-call %vcvarsall%
-
-rem -----------------------------------
-rem -------Creating Folders------------
-rem -----------------------------------
-rmdir %binpath% /s /q
-
-rmdir %thirdpartyGeneration% /s /q
-mkdir %thirdpartyGeneration%
-cd  %thirdpartyGeneration%
-mkdir thirdparty_source
-mkdir thirdparty_bin
-mkdir thirdparty_install
-rem ------End Creating Folders---------
-
-rem -----------------------------------
-rem ------Downloading Sources----------
-rem -----------------------------------
-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.6.1.zip
-%wgetPath% %urlCreatisSource%/InsightToolkit-3.20.0.zip
-%wgetPath% %urlCreatisSource%/gdcm_05_Mai_2011.tar.gz
-%wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip
-rem ------End Downloading Sources------
-
-rem -----------------------------------
-rem --------Qt Installation------------
-rem -----------------------------------
-rem ---Setting Enviroment Variables----
-set QTDIR=%thirdpartyGeneration%\thirdparty_source\Qt\4.7.3\
-rem ----------Extracting---------------
-cd %thirdpartyGeneration%\thirdparty_source\
-mkdir Qt\
-cd Qt\
-%zipPath% x %thirdpartyGeneration%\thirdparty_source\qt-4.7.3.zip
-del %thirdpartyGeneration%\thirdparty_source\qt-4.7.3.zip
-
-rem --------Renaming Folder------------
-rename qt-everywhere-opensource-src-4.7.3 4.7.3
-rem ----------Installing---------------
-cd 4.7.3
-echo y | configure -debug-and-release -opensource -shared -qt-sql-sqlite -phonon -phonon-backend -platform win32-msvc2010 -mp
-nmake
+if %x86Comp%==ON (
+       set addressmodel=32
+       call %vcvarsall%
+       echo "Compilation forced x86"
+) else (
+       set addressmodel=64
+       if %PROCESSOR_ARCHITECTURE%==x86 (
+               call %vcvarsall%
+       ) else (
+               call %vcvarsall% amd64
+       )
+)
+
+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:\
-rem ------End QT Installation----------
-
-rem -----------------------------------
-rem -----wxWidgets Installation--------
-rem -----------------------------------
-rem -------Setting Variables-----------
-set WXDIR=%thirdpartyGeneration%\thirdparty_source\wxWidgets\2.9.2\
-rem ----------Extracting---------------
-cd %thirdpartyGeneration%\thirdparty_source
-md wxWidgets\2.9.2
-cd wxWidgets\2.9.2
-%zipPath% x %thirdpartyGeneration%\thirdparty_source\wxWidgets-2.9.2.7z
-del %thirdpartyGeneration%\thirdparty_source\wxWidgets-2.9.2.7z
-rem ----------Installing---------------
-cd %thirdpartyGeneration%\thirdparty_source\wxWidgets\2.9.2\build\msw
-nmake -f makefile.vc BUILD=debug UNICODE=1 SHARED=1
-nmake -f makefile.vc BUILD=release UNICODE=1 SHARED=1
+:SKIPINSTALLQT
+
+
+if %EEDinstallWXWIDGETS%==FALSE GOTO SKIPINSTALLWXWIDGETS
+echo -----------------------------------
+echo -----wxWidgets Installation--------
+echo -----------------------------------
+cd %WXDIR%\build\msw
+if %x86Comp%==ON (
+       nmake -f makefile.vc BUILD=%buildType% UNICODE=0 SHARED=1 USE_OPENGL=1 >> %LogFolder%\wxInstall.log 2>&1
+) else (
+       if %PROCESSOR_ARCHITECTURE%==x86 (
+               nmake -f makefile.vc BUILD=%buildType% UNICODE=0 SHARED=1 USE_OPENGL=1 >> %LogFolder%\wxInstall.log 2>&1
+       ) else (
+               nmake -f makefile.vc TARGET_CPU=AMD64 BUILD=%buildType% UNICODE=0 SHARED=1 USE_OPENGL=1 >> %LogFolder%\wxInstall.log 2>&1
+       )
+)
 cd C:\
-rem ----End wxWidgets Installation-----
-
-rem -----------------------------------
-rem ------Boost Installation-----------
-rem -----------------------------------
-rem -------Setting Variables-----------
-set BOOSTDIR=%thirdpartyGeneration%\thirdparty_source\Boost\1.47.0\
-rem ----------Extracting---------------
-cd %thirdpartyGeneration%\thirdparty_source\
-md Boost\
-cd Boost\
-%zipPath% x %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
-del %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z 
-rem --------Renaming Folder------------
-rename boost_1_47_0 1.47.0
-rem ----------Installing---------------
-cd %thirdpartyGeneration%\thirdparty_source\Boost\1.47.0\
-md boost-build
-cd tools\build\v2
-call bootstrap.bat
-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
+: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
+
+REM 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
+REM 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
+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:\
-rem -----End Boost Installation--------
-
-rem -----------------------------------
-rem -------VTK Installation------------
-rem -----------------------------------
-rem ----------Extracting---------------
-mkdir %thirdpartyGeneration%\thirdparty_source\VTK
-cd %thirdpartyGeneration%\thirdparty_source\VTK
-%zipPath% x %thirdpartyGeneration%\thirdparty_source\vtk-5.6.1.zip
-del %thirdpartyGeneration%\thirdparty_source\vtk-5.6.1.zip
-rem ----------Installing---------------
+:SKIPINSTALLBOOST
+
+
+if %EEEDinstallVTK%==FALSE GOTO SKIPINSTALLVTK
+echo -----------------------------------
+echo -------VTK Installation------------
+echo -----------------------------------
 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:\
-rem ------End VTK Installation---------
-
-rem -----------------------------------
-rem -------ITK Installation------------
-rem -----------------------------------
-rem ----------Extracting---------------
-cd %thirdpartyGeneration%\thirdparty_source
-%zipPath% x InsightToolkit-3.20.0.zip
-del InsightToolkit-3.20.0.zip
-rem ----------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 CMakeCache.txt
-FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
-msbuild /p:Configuration=%buildType% INSTALL.vcxproj
+if %x86Comp%==ON (
+       cmake -G"Visual Studio 10"  -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin >> %LogFolder%\vtkInstall.log 2>&1
+) else (
+       if %PROCESSOR_ARCHITECTURE%==x86 (
+               cmake -G"Visual Studio 10"  -H%sourcepath%\%vtk% -B%binpath%\%vtk%Bin >> %LogFolder%\vtkInstall.log 2>&1
+       ) else (
+               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:\
-rem ------End ITK Installation---------
-
-rem -----------------------------------
-rem -------GDCM Installation-----------
-rem -----------------------------------
-rem -------Setting Variables-----------
-rem ----------Extracting---------------
-cd %thirdpartyGeneration%\thirdparty_source
-%zipPath% x gdcm_05_Mai_2011.tar.gz
-%zipPath% x gdcm_05_Mai_2011.tar
-del gdcm_05_Mai_2011.tar.gz
-del gdcm_05_Mai_2011.tar
-rem ----------Installing---------------
+:SKIPINSTALLVTK
+
+
+if %EEDinstallGDCM%==FALSE GOTO SKIPINSTALLGDCM
+echo -----------------------------------
+echo -------GDCM Installation-----------
+echo -----------------------------------
 cd  %binpath%
 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=%vtk% -D GDCM_VTK:BOOL=ON -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
+if %x86Comp%==ON (
+       cmake -G"Visual Studio 10"  -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin >> %LogFolder%\GDCMInstall.log 2>&1
+) else (
+       if %PROCESSOR_ARCHITECTURE%==x86 (
+               cmake -G"Visual Studio 10"  -H%sourcepath%\%gdcm% -B%binpath%\%gdcm%Bin >> %LogFolder%\GDCMInstall.log 2>&1
+       ) else (
+               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 (
+       if %PROCESSOR_ARCHITECTURE%==x86 (
+               cmake -G"Visual Studio 10" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin >> %LogFolder%\ITKInstall.log 2>&1
+       ) else (
+               cmake -G"Visual Studio 10 Win64" -H%sourcepath%\%itk% -B%binpath%\%itk%Bin >> %LogFolder%\ITKInstall.log 2>&1
+       )
+)
+cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%itk%\ CMakeCache.txt >> %LogFolder%\ITKInstall.log 2>&1
+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 >> %LogFolder%\ITKInstall.log 2>&1
+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:\
-rem -----End GDCM Installation---------
-
-rem -----------------------------------
-rem ------XERCES Installation----------
-rem -----------------------------------
-rem ----------Extracting---------------
-cd %thirdpartyGeneration%\thirdparty_source
-%zipPath% x xerces-c-3.1.1.zip
-del xerces-c-3.1.1.zip
-rem ----------Installing---------------
+:SKIPINSTALLITK
+
+
+if %EEDinstallXERCES%==FALSE GOTO SKIPINSTALLXERCES
+echo -----------------------------------
+echo ------XERCES Installation----------
+echo -----------------------------------
 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=release
-REM msbuild /p:Configuration=%buildType% INSTALL.vcxproj
-rem -----End XERCES Installation-------
+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 -------- SQLite Installation------------
+echo ----------------------------------------
+
+if %EEDinstallSQLite%==FALSE GOTO SKIPINSTALLSQLite
+echo -----------------------------------
+echo -------SQLite Installation------------
+echo -----------------------------------
+cd  %binpath%
+mkdir %SQLite%Bin
+cd %SQLite%Bin
+if %x86Comp%==ON (
+       cmake -G"Visual Studio 10"  -H%sourcepath%\%SQLite% -B%binpath%\%SQLite%Bin >> %LogFolder%\SQLiteInstall.log 2>&1
+) else (
+       if %PROCESSOR_ARCHITECTURE%==x86 (
+               cmake -G"Visual Studio 10"  -H%sourcepath%\%SQLite% -B%binpath%\%SQLite%Bin >> %LogFolder%\SQLiteInstall.log 2>&1
+       ) else (
+               cmake -G"Visual Studio 10 Win64"  -H%sourcepath%\%SQLite% -B%binpath%\%SQLite%Bin >> %LogFolder%\SQLiteInstall.log 2>&1
+       )
+)
+cmake -D USE_DEBUG_LIB:BOOL=%buildType% -D CMAKE_INSTALL_PREFIX:PATH=%installpath%\%SQLite%\ CMakeCache.txt >> %LogFolder%\SQLiteInstall.log 2>&1
+cmake CMakeCache.txt >> %LogFolder%\SQLiteInstall.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%\SQLiteInstall.log 2>&1
+msbuild /m:%NUMBER_OF_PROCESSORS% /p:UseEnv=true;BuildInParallel=true;Configuration=%buildType% INSTALL.vcxproj >> %LogFolder%\SQLiteInstall.log 2>&1
 cd c:\
-pause
+:SKIPINSTALLSQLite
+
+
+
+echo -----------------------------------
+echo ---End of Installing Libraries-----
+echo -----------------------------------
+
+exit
\ No newline at end of file