]> Creatis software - creaToolsTools.git/blobdiff - Install_ThirdParty/scripts/install_thirdparty_all.bat
DFCH: Script changes
[creaToolsTools.git] / Install_ThirdParty / scripts / install_thirdparty_all.bat
index bd8a5ee2c8c8b9033c668289a09501932542bce6..2773812540bd5b462a378661db408a754b5adab2 100644 (file)
@@ -1,5 +1,8 @@
 @echo off
 echo -----------------------------------
+echo ------Installing Libraries---------
+echo -----------------------------------
+echo -----------------------------------
 echo ------Asking Architecture----------
 echo -----------------------------------
 if %PROCESSOR_ARCHITECTURE%==x86 (
@@ -14,7 +17,7 @@ if %PROCESSOR_ARCHITECTURE%==x86 (
 echo ----End Asking Architecture--------
 
 echo -----------------------------------
-echo ---Setting Environment Variables----
+echo ---Setting Environment Variables---
 echo -----------------------------------
 
 set thirdpartyGeneration=%1
@@ -33,16 +36,20 @@ 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 not exist %miktex% set miktex="%ProgramFilesPath_x64%\MiKTeX 2.9\miktex\bin\texworks.exe"
+
 if not exist %miktex% (
+ set miktex="%ProgramFilesPath_x64%\MiKTeX 2.9\miktex\bin\texworks.exe"
+ if not exist %miktex% (
   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
@@ -54,8 +61,10 @@ set binpath=%thirdpartyGeneration%\thirdparty_bin
 set sourcepath=%thirdpartyGeneration%\thirdparty_source
 
 set qt=Qt-4.7.3
-set wxWidgets=wxWidgets-2.9.2
-set boost=Boost-1.47.0
+set buildWxWidgets28=1
+if %buildWxWidgets28%==1 set wxWidgets=wxWidgets-2.8.12
+if %buildWxWidgets28%==0 set wxWidgets=wxWidgets-2.9.2
+set boost=Boost-1.46.1
 set xercesc=xerces-c-3.1.1
 set itk=InsightToolkit-3.20.0
 set gdcm=gdcm
@@ -97,11 +106,13 @@ echo ITKSRCDIR=%ITKSRCDIR%
 echo VTKSRCDIR=%VTKSRCDIR%
 echo GDCMDIR=%GDCMSRCDIR%
 
+echo -----------------------------------
 echo ---End Setting Global Variables----
 echo -----------------------------------
 
 
 call %vcvarsall%
+
 echo -----------------------------------
 echo -------Creating Folders------------
 echo -----------------------------------
@@ -124,15 +135,18 @@ 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
+IF %buildWxWidgets28%==0 (
+  %wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z
+) ELSE (
+  %wgetPath% %urlCreatisSource%/wxWidgets-2.8.12.tar.gz
+)
+%wgetPath% %urlCreatisSource%/boost_1_46_1.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 -----------------------------------
@@ -151,12 +165,7 @@ echo ----------Installing---------------
 
 cd %QTDIR%
 
-
-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:\
@@ -169,15 +178,25 @@ echo -----------------------------------
 echo ----------Extracting---------------
 
 cd %sourcepath%
-md %wxWidgets%
-cd %wxWidgets%
-%zipPath% x %sourcepath%\wxWidgets-2.9.2.7z
-del %sourcepath%\wxWidgets-2.9.2.7z
-
+IF %buildWxWidgets28%==0 (
+  md %wxWidgets%
+  cd %wxWidgets%
+  %zipPath% x %sourcepath%\wxWidgets-2.9.2.7z
+  del %sourcepath%\wxWidgets-2.9.2.7z
+) ELSE (
+ %zipPath% x %sourcepath%\wxWidgets-2.8.12.tar.gz
+ %zipPath% x %sourcepath%\wxWidgets-2.8.12.tar
+ del %sourcepath%\wxWidgets-2.8.12.tar.gz
+ del %sourcepath%\wxWidgets-2.8.12.tar
+)
 echo ----------Installing---------------
 
 cd %sourcepath%\%wxWidgets%\build\msw
-nmake -f makefile.vc BUILD=%buildType% UNICODE=1 SHARED=1
+IF %buildWxWidgets28%==0 (
+  nmake -f makefile.vc BUILD=%buildType% USE_OPENGL=1 USE_GUI=1 UNICODE=0 SHARED=1
+) ELSE (
+  nmake -f makefile.vc BUILD=%buildType% UNICODE=0 SHARED=1
+)
 cd C:\
 
 echo ----End wxWidgets Installation-----
@@ -188,32 +207,52 @@ echo -----------------------------------
 echo ----------Extracting---------------
 
 cd %sourcepath%
-%zipPath% x %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
-del %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
+%zipPath% x %thirdpartyGeneration%\thirdparty_source\boost_1_46_1.7z
+del %thirdpartyGeneration%\thirdparty_source\boost_1_46_1.7z
 
 echo --------Renaming Folder------------
 
-rename boost_1_47_0 %boost%
+rename boost_1_46_1 %boost%
 
 echo ----------Installing---------------
 
+mkdir %binpath%\%boost%Bin 
+mkdir %installpath%\%boost%
+
 cd %sourcepath%\%boost%
-call bootstrap.bat
 
-if %PROCESSOR_ARCHITECTURE%==x86 (
+call bootstrap.bat
+bjam.exe --toolset=msvc-10.0 --build-type=complete --build-dir=%binpath%\%boost%Bin --link=shared --runtime-link=shared --prefix=%installpath%\%boost% install
+cd C:\
 
-  b2.exe --toolset=msvc-10.0 --build-type=complete stage
+echo -----End Boost Installation--------
 
-) else (
+echo -----------------------------------
+echo -------VTK Installation------------
+echo -----------------------------------
+echo ----------Extracting---------------
 
-cd stage
-  b2.exe --toolset=msvc-10.0 --build-type=complete architecture=x86 address-model=64 stage
+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 C:\
 
-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 /p:Configuration=%buildType%
+msbuild /p:Configuration=%buildType% INSTALL.vcxproj
+cd c:\
+echo ------End VTK Installation---------
 
 echo -----------------------------------
 echo -------ITK Installation------------
@@ -227,11 +266,11 @@ del InsightToolkit-3.20.0.zip
 echo ----------Installing---------------
 
 cd  %binpath%
-echo mkdir %itk%Bin
+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
@@ -257,33 +296,8 @@ 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---------
-
 echo -----------------------------------
 echo -------GDCM Installation-----------
 echo -----------------------------------
@@ -304,7 +318,7 @@ 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
@@ -322,4 +336,8 @@ rename tth_exe tth
 del tth_exe.zip
 echo ------End TTH Installation---------
 cd c:\
-@echo on
\ No newline at end of file
+echo -----------------------------------
+echo ---End of Installing Libraries-----
+echo -----------------------------------
+
+exit /B
\ No newline at end of file