@echo off
-echo "Running script at: " TIME
echo -----------------------------------
echo ------Asking Architecture----------
echo -----------------------------------
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
set VTKSRCDIR=%sourcepath%\%VTK%
set GDCMSRCDIR=%sourcepath%\%gdcm%
+echo -----------------------------------
+echo Environment variables Configuration
+echo -----------------------------------
echo %thirdpartyGeneration%
echo %buildType%
echo %wgetPath%
echo %VTKSRCDIR%
echo %GDCMSRCDIR%
-
echo ---End Setting Global Variables----
echo -----------------------------------
echo -----------------------------------
-goto next
rmdir %binpath% /s /q
mkdir thirdparty_bin
mkdir thirdparty_install
+
echo ------End Creating Folders---------
echo -----------------------------------
%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 -----------------------------------
echo ----------Installing---------------
-:next
cd %binpath%
mkdir %itk%Bin
cd %itk%Bin
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