]> Creatis software - creaToolsTools.git/commitdiff
DFCH: Update of the script! working :)
authorDiego Caceres <Diego.Caceres@creatis.insa-lyon.fr>
Thu, 20 Oct 2011 09:28:31 +0000 (09:28 +0000)
committerDiego Caceres <Diego.Caceres@creatis.insa-lyon.fr>
Thu, 20 Oct 2011 09:28:31 +0000 (09:28 +0000)
Install_ThirdParty/scripts/install_thirdparty_all.bat

index c7f15b607780160db4900afad033185cc2dfdc7a..4e17ec0faf8c09848c7292aca3a831e67079a908 100644 (file)
@@ -1,15 +1,15 @@
 @echo off
+echo "Running script at: " TIME
 echo -----------------------------------
 echo ------Asking Architecture----------
 echo -----------------------------------
 if %PROCESSOR_ARCHITECTURE%==x86 (
-@echo on
-  set ProgramFilesPath=%ProgramFiles%
-@echo off
+  set ProgramFilesPath_x86=%ProgramFiles%
+  echo "Architecture found = x86"
 ) else (
-@echo on
-  set "ProgramFilesPath=%ProgramFiles(x86)%"
-@echo off
+  set "ProgramFilesPath_x64=%ProgramFiles%"
+  set "ProgramFilesPath_x86=%ProgramFiles(x86)%"
+  echo "Architecture found = x64"
 )
 
 echo ----End Asking Architecture--------
@@ -18,15 +18,18 @@ echo -----------------------------------
 echo ---Setting Enviroment Variables----
 echo -----------------------------------
 
-@echo on
 set thirdpartyGeneration=%1
 set buildType=%2
 
-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 zipPath="%ProgramFilesPath_x86%\7-Zip\7z.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 %vcvarsall% set zipPath="%ProgramFilesPath_x64%\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"
 
 set installpath=%thirdpartyGeneration%\thirdparty_install
 set binpath=%thirdpartyGeneration%\thirdparty_bin
@@ -48,19 +51,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 off
 echo ---End Setting Global Variables----
 echo -----------------------------------
-@echo on
-call %vcvarsall%
 
-@echo off
+
+call %vcvarsall%
 
 echo -----------------------------------
 echo -------Creating Folders------------
 echo -----------------------------------
-@echo on
+
+
+goto next
+
 rmdir %binpath% /s /q
 
 rmdir %thirdpartyGeneration% /s /q
@@ -70,13 +98,12 @@ mkdir thirdparty_source
 mkdir thirdparty_bin
 mkdir thirdparty_install
 
-@echo off
 echo ------End Creating Folders---------
 
 echo -----------------------------------
 echo ------Downloading Sources----------
 echo -----------------------------------
-@echo on
+
 cd %thirdpartyGeneration%\thirdparty_source\
 %wgetPath% %urlCreatisSource%/qt-4.7.3.zip
 %wgetPath% %urlCreatisSource%/wxWidgets-2.9.2.7z
@@ -86,7 +113,6 @@ cd %thirdpartyGeneration%\thirdparty_source\
 %wgetPath% %urlCreatisSource%/gdcm_11_Oct_2011.tar.gz
 %wgetPath% %urlCreatisSource%/xerces-c-3.1.1.zip
 
-@echo off
 echo ------End Downloading Sources------
 
 
@@ -94,87 +120,96 @@ echo -----------------------------------
 echo --------Qt Installation------------
 echo -----------------------------------
 echo ----------Extracting---------------
-@echo on
+
 cd %sourcepath%
 %zipPath% x %sourcepath%\qt-4.7.3.zip
 del %sourcepath%\qt-4.7.3.zip
-@echo off
+
 echo --------Renaming Folder------------
-@echo on
+
 rename qt-everywhere-opensource-src-4.7.3 %qt%
-@echo off
+
 echo ----------Installing---------------
-@echo on
-cd %qt%
+
+
+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:\
-@echo off
+
 echo ------End QT Installation----------
 
 echo -----------------------------------
 echo -----wxWidgets Installation--------
 echo -----------------------------------
 echo ----------Extracting---------------
-@echo on
+
 cd %sourcepath%
 md %wxWidgets%
 cd %wxWidgets%
 %zipPath% x %sourcepath%\wxWidgets-2.9.2.7z
 del %sourcepath%\wxWidgets-2.9.2.7z
-@echo off
+
 echo ----------Installing---------------
-@echo on
+
 cd %sourcepath%\%wxWidgets%\build\msw
 nmake -f makefile.vc BUILD=%buildType% UNICODE=1 SHARED=1
 cd C:\
-@echo off
+
 echo ----End wxWidgets Installation-----
 
 echo -----------------------------------
 echo ------Boost Installation-----------
 echo -----------------------------------
 echo ----------Extracting---------------
-@echo on
+
 cd %sourcepath%
 %zipPath% x %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
 del %thirdpartyGeneration%\thirdparty_source\boost_1_47_0.7z
-@echo off
+
 echo --------Renaming Folder------------
-@echo on
+
 rename boost_1_47_0 %boost%
-@echo off
+
 echo ----------Installing---------------
-@echo on
+
 cd %sourcepath%\%boost%
 call bootstrap.bat
-@echo off
+
 if %PROCESSOR_ARCHITECTURE%==x86 (
-@echo on
+
   b2.exe --toolset=msvc-10.0 --build-type=complete stage
-@echo off
+
 ) else (
-@echo on
+
 cd stage
   b2.exe --toolset=msvc-10.0 --build-type=complete architecture=x86 address-model=64 stage
-@echo off
+
 )
-@echo on
+
 cd C:\
-@echo off
+
 echo -----End Boost Installation--------
 
 echo -----------------------------------
 echo -------ITK Installation------------
 echo -----------------------------------
 echo ----------Extracting---------------
-@echo on
+
 cd %sourcepath%
 %zipPath% x InsightToolkit-3.20.0.zip
 del InsightToolkit-3.20.0.zip
-@echo off
+
 echo ----------Installing---------------
-@echo on
+
+:next
 cd  %binpath%
 mkdir %itk%Bin
 cd %itk%Bin
@@ -185,25 +220,25 @@ cmake CMakeCache.txt
 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
 cd c:\
-@echo off
+
 echo ------End ITK Installation---------
 
 echo -----------------------------------
 echo ------XERCES Installation----------
 echo -----------------------------------
 echo ----------Extracting---------------
-@echo on
+
 cd %sourcepath%
 %zipPath% x xerces-c-3.1.1.zip
 del xerces-c-3.1.1.zip
-@echo off
+
 echo ----------Installing---------------
-@echo on
+
 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=%buildType%
 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
-@echo off
+
 echo -----End XERCES Installation-------
 
 
@@ -212,16 +247,16 @@ echo -----------------------------------
 echo -------VTK Installation------------
 echo -----------------------------------
 echo ----------Extracting---------------
-@echo on
+
 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 off
+
 echo ----------Installing---------------
-@echo on
+
 cd  %binpath%
 mkdir %vtk%Bin
 cd %vtk%Bin
@@ -232,22 +267,22 @@ cmake CMakeCache.txt
 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
 cd c:\
-@echo off
+
 echo ------End VTK Installation---------
 
 echo -----------------------------------
 echo -------GDCM Installation-----------
 echo -----------------------------------
 echo ----------Extracting---------------
-@echo on
+
 cd %sourcepath%
 %zipPath% x gdcm_11_Oct_2011.tar.gz
 %zipPath% x gdcm_11_Oct_2011.tar
 del gdcm_11_Oct_2011.tar.gz
 del gdcm_11_Oct_2011.tar
-@echo off
+
 echo ----------Installing---------------
-@echo on
+
 
 cd  %binpath%
 mkdir %gdcm%Bin
@@ -260,7 +295,9 @@ cmake CMakeCache.txt
 FOR /R %%a IN (*.sln) DO msbuild %%a /p:Configuration=%buildType%
 msbuild /p:Configuration=%buildType% INSTALL.vcxproj
 cd c:\
-@echo off
+
 echo -----End GDCM Installation---------
-@echo on
+
 cd c:\
+echo "Ending script at: " TIME
+@echo on
\ No newline at end of file