]> Creatis software - creaToolsTools.git/blobdiff - Install_ThirdParty/scripts/install_thirdparty_all.bat
DFCH: Some bugs Solved!!
[creaToolsTools.git] / Install_ThirdParty / scripts / install_thirdparty_all.bat
index 4e17ec0faf8c09848c7292aca3a831e67079a908..2217d22c95e22827f145f85876803d4fc76ba04f 100644 (file)
@@ -1,5 +1,7 @@
 @echo off
-echo "Running script at: " TIME
+echo -----------------------------------
+echo ------Installing Libraries---------
+echo -----------------------------------
 echo -----------------------------------
 echo ------Asking Architecture----------
 echo -----------------------------------
@@ -15,21 +17,44 @@ if %PROCESSOR_ARCHITECTURE%==x86 (
 echo ----End Asking Architecture--------
 
 echo -----------------------------------
-echo ---Setting Enviroment Variables----
+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="%ProgramFilesPath_x86%\MiKTeX 2.9\miktex\bin\texworks.exe"
 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% (
+  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% (
+  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
@@ -51,44 +76,44 @@ set ITKSRCDIR=%sourcepath%\%itk%
 set VTKSRCDIR=%sourcepath%\%VTK%
 set GDCMSRCDIR=%sourcepath%\%gdcm%
 
-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 -----------------------------------
+echo Environment variables Configuration
+echo -----------------------------------
+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 -----------------------------------
 echo ---End Setting Global Variables----
 echo -----------------------------------
 
 
 call %vcvarsall%
-
 echo -----------------------------------
 echo -------Creating Folders------------
 echo -----------------------------------
 
-
-goto next
-
 rmdir %binpath% /s /q
 
 rmdir %thirdpartyGeneration% /s /q
@@ -98,6 +123,7 @@ mkdir thirdparty_source
 mkdir thirdparty_bin
 mkdir thirdparty_install
 
+
 echo ------End Creating Folders---------
 
 echo -----------------------------------
@@ -112,10 +138,9 @@ cd %thirdpartyGeneration%\thirdparty_source\
 %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 -----------------------------------
@@ -134,12 +159,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:\
@@ -182,18 +202,7 @@ echo ----------Installing---------------
 
 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
-
-)
-
+b2.exe --toolset=msvc-10.0 --build-type=complete stage
 cd C:\
 
 echo -----End Boost Installation--------
@@ -209,9 +218,8 @@ del InsightToolkit-3.20.0.zip
 
 echo ----------Installing---------------
 
-:next
 cd  %binpath%
-mkdir %itk%Bin
+echo 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
@@ -241,8 +249,6 @@ msbuild /p:Configuration=%buildType% INSTALL.vcxproj
 
 echo -----End XERCES Installation-------
 
-
-
 echo -----------------------------------
 echo -------VTK Installation------------
 echo -----------------------------------
@@ -257,6 +263,7 @@ del %thirdpartyGeneration%\thirdparty_source\VTK-5.8.0.tar
 
 echo ----------Installing---------------
 
+
 cd  %binpath%
 mkdir %vtk%Bin
 cd %vtk%Bin
@@ -267,7 +274,6 @@ 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 -----------------------------------
@@ -298,6 +304,18 @@ cd c:\
 
 echo -----End GDCM Installation---------
 
+echo -----------------------------------
+echo -------TTH Installation------------
+echo -----------------------------------
+echo ----------Extracting---------------
+cd %sourcepath%
+%zipPath% x tth_exe.zip
+rename tth_exe tth
+del tth_exe.zip
+echo ------End TTH Installation---------
 cd c:\
-echo "Ending script at: " TIME
-@echo on
\ No newline at end of file
+echo -----------------------------------
+echo ---End of Installing Libraries-----
+echo -----------------------------------
+
+exit /B
\ No newline at end of file