]> Creatis software - creaToolsTools.git/commitdiff
DFCH: install_thirdparty_all.bat script works 100% :) :)
authorDiego Caceres <Diego.Caceres@creatis.insa-lyon.fr>
Tue, 25 Oct 2011 14:51:34 +0000 (14:51 +0000)
committerDiego Caceres <Diego.Caceres@creatis.insa-lyon.fr>
Tue, 25 Oct 2011 14:51:34 +0000 (14:51 +0000)
Install_ThirdParty/scripts/install_thirdparty_all.bat

index 4e17ec0faf8c09848c7292aca3a831e67079a908..ca4fd01fdf1b7004c88b5de4810935a84fe34861 100644 (file)
@@ -1,5 +1,4 @@
 @echo off
-echo "Running script at: " TIME
 echo -----------------------------------
 echo ------Asking Architecture----------
 echo -----------------------------------
@@ -15,31 +14,50 @@ 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=%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% (
+  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-4.7.3
-set wxWidgets=wxWidgets-2.9.2
-set boost=Boost-1.47.0
-set xercesc=xerces-c-3.1.1
-set itk=InsightToolkit-3.20.0
+set qt=Qt
+set wxWidgets=wxWidgets
+set boost=Boost
+set xercesc=xerces
+set itk=ITK
 set gdcm=gdcm
 set vtk=VTK
 
@@ -51,6 +69,9 @@ set ITKSRCDIR=%sourcepath%\%itk%
 set VTKSRCDIR=%sourcepath%\%VTK%
 set GDCMSRCDIR=%sourcepath%\%gdcm%
 
+echo -----------------------------------
+echo Environment variables Configuration
+echo -----------------------------------
 echo %thirdpartyGeneration%
 echo %buildType%
 echo %wgetPath%
@@ -75,7 +96,6 @@ echo %ITKSRCDIR%
 echo %VTKSRCDIR%
 echo %GDCMSRCDIR%
 
-
 echo ---End Setting Global Variables----
 echo -----------------------------------
 
@@ -87,7 +107,6 @@ echo -------Creating Folders------------
 echo -----------------------------------
 
 
-goto next
 
 rmdir %binpath% /s /q
 
@@ -98,6 +117,7 @@ mkdir thirdparty_source
 mkdir thirdparty_bin
 mkdir thirdparty_install
 
+
 echo ------End Creating Folders---------
 
 echo -----------------------------------
@@ -112,10 +132,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 -----------------------------------
@@ -209,7 +228,6 @@ del InsightToolkit-3.20.0.zip
 
 echo ----------Installing---------------
 
-:next
 cd  %binpath%
 mkdir %itk%Bin
 cd %itk%Bin
@@ -298,6 +316,14 @@ cd c:\
 
 echo -----End GDCM Installation---------
 
+echo -----------------------------------
+echo -------TTH Installation------------
+echo -----------------------------------
+echo ----------Extracting---------------
+%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