From a5ed2eb4bdee7cac91998acf1dd7a15ef399cc0b Mon Sep 17 00:00:00 2001 From: Eduardo Davila Date: Mon, 27 Aug 2018 13:32:47 +0200 Subject: [PATCH] #3224 creaToolsTools Feature New Normal - vtk8itk4wx3-mingw64 --- Linux/installscript | 23 +++++++---- Linux/scripts/LocalFunctions.sh | 4 +- .../scripts/ThirdParty-install-Base-Stuff.sh | 4 +- Linux/scripts/ThirdParty-install-Base-rpm.sh | 38 +++++++++---------- Linux/scripts/ThirdParty-install-ITK.sh | 8 ++++ Linux/scripts/ThirdParty-install-VTK.sh | 12 +++--- Linux/scripts/ThirdParty-install-WT.sh | 24 ++++++------ Linux/scripts/ThirdParty-install-gdcm.sh | 32 ++++++++-------- 8 files changed, 86 insertions(+), 59 deletions(-) diff --git a/Linux/installscript b/Linux/installscript index 2631d2b..a27e07a 100755 --- a/Linux/installscript +++ b/Linux/installscript @@ -23,7 +23,10 @@ #!/bin/bash -e -scriptDirName=$(dirname $(readlink -f $0) ) +#EED 2018-08-26 + +#scriptDirName=$(dirname $(readlink -f $0) ) +scriptDirName=$(pwd) ######################################################################### ############ Local Functions ####################################### @@ -38,12 +41,14 @@ configureFile="scripts/CreaTools-configure.sh" # default configuration parameters OperatingSystem=`getDistrib` corenumber=`getncore` +echo "hola1" generationdir=$HOME/Creatis/creaTools installPrefixThird= installPrefix= docgeneration=OFF sourcesFrom=GIT + loginUserName=$USER loginGroupName=`groups | awk '{print $1}'` buildType=Release @@ -248,9 +253,11 @@ fi # vtk if [ `checkVal $command all 3rd 3rd-vtk` == true ] ; then - bigDisplay "INSTALL VTK" - source scripts/ThirdParty-install-VTK.sh - cd $scriptDirName +# if ! [ $OperatingSystem = "MacOS" ] ; then + bigDisplay "INSTALL VTK" + source scripts/ThirdParty-install-VTK.sh + cd $scriptDirName +# fi fi # gdcm @@ -262,9 +269,11 @@ fi # itk if [ `checkVal $command all 3rd 3rd-itk` == true ] ; then - bigDisplay "INSTALL $ITKVersion" - bash scripts/ThirdParty-install-ITK.sh - cd $scriptDirName + if ! [ $OperatingSystem = "MacOS" ] ; then + bigDisplay "INSTALL $ITKVersion" + bash scripts/ThirdParty-install-ITK.sh + cd $scriptDirName + fi fi # wt diff --git a/Linux/scripts/LocalFunctions.sh b/Linux/scripts/LocalFunctions.sh index 084c2a1..662fbae 100644 --- a/Linux/scripts/LocalFunctions.sh +++ b/Linux/scripts/LocalFunctions.sh @@ -121,7 +121,9 @@ function getDownloadCommand { ########################################### function getncore { if [ `uname` == Darwin ] ; then # MacOS - system_profiler | grep Processor | awk '$1=="Number" {print $4}' +#EED 2018-08-26 +# system_profiler | grep Processor | awk '$1=="Number" {print $4}' + sysctl hw.physicalcpu hw.logicalcpu | grep logicalcpu | awk '{print $2}' else cat /proc/cpuinfo | grep processor | wc -l fi diff --git a/Linux/scripts/ThirdParty-install-Base-Stuff.sh b/Linux/scripts/ThirdParty-install-Base-Stuff.sh index 088e02b..7caf9ca 100644 --- a/Linux/scripts/ThirdParty-install-Base-Stuff.sh +++ b/Linux/scripts/ThirdParty-install-Base-Stuff.sh @@ -36,7 +36,9 @@ echo "OperatingSystem = $OperatingSystem" echo "Please enter the root passwd to add necessary packages:"; if [ "Ubuntu" == $OperatingSystem ] ; then sudo bash ThirdParty-install-Base-rpm.sh $OperatingSystem - else + elif [ "MacOS" == $OperatingSystem ] ; then + sudo bash ThirdParty-install-Base-rpm.sh $OperatingSystem + else su -c "bash ThirdParty-install-Base-rpm.sh $OperatingSystem" fi fi diff --git a/Linux/scripts/ThirdParty-install-Base-rpm.sh b/Linux/scripts/ThirdParty-install-Base-rpm.sh index 2b3072a..25ddfa4 100644 --- a/Linux/scripts/ThirdParty-install-Base-rpm.sh +++ b/Linux/scripts/ThirdParty-install-Base-rpm.sh @@ -145,27 +145,27 @@ then apt-get --yes install libosmesa6-dev #Mesa6 apt-get --yes install uuid-dev # uuid para la instalacion de itk apt-get --yes install libxaw7-dev # X11 - ;; + ;; MacOS) port selfupdate - port install cmake -y - port install doxygen -y - port install graphviz -y - # port install tetex -y (replaced by texlive) # cf EED : http://www.creatis.insa-lyon.fr/site/fr/CreatoolsInstallInstructionsv2.0.1MacOsv10.5.6-Developpers - port install texlive -y - port install latex2html -y - port install wxGTK -y - port install boost -y - ln -s libboost_signals-xgcc40-mt-1_38.dylib libboost_signals.dylib /opt/local/lib # cf EED : http://www.creatis.insa-lyon.fr/site - ln -s libboost_signals-xgcc40-mt-1_38.dylib libboost_signals.dylib /opt/local/lib # cf EED - ln -s libboost_filesystem-xgcc40-mt-1_38.dylib libboost_filesystem.dylib /opt/local/lib # cf EE - ln -s libboost_system-xgcc40-mt-1_38.dylib libboost_system.dylib /opt/local/lib # cf EE - port install sqlite3 -y - port install qt4-mac -y - ln -s qmake-mac qmake /opt/local/bin # cf EED - port install mesa -y - port install fcgi -y ## It's working ? - port install fcgi-devel -y ## It's working ? + port -N install wget -y + port -N install cmake -y + port -N install doxygen -y + port -N install graphviz -y + # port -N install tetex -y (replaced by texlive) # cf EED : http://www.creatis.insa-lyon.fr/site/fr/CreatoolsInstallInstructionsv2.0.1MacOsv10.5.6-Developpers + port -N install texlive -y + port -N install latex2html -y + port -N install wxWidgets-3.0 -y + port -N install boost -y +# ln -s libboost_signals-xgcc40-mt-1_38.dylib libboost_signals.dylib /opt/local/lib # cf EED : http://www.creatis.insa-lyon.fr/site +# ln -s libboost_signals-xgcc40-mt-1_38.dylib libboost_signals.dylib /opt/local/lib # cf EED +# ln -s libboost_filesystem-xgcc40-mt-1_38.dylib libboost_filesystem.dylib /opt/local/lib # cf EE +# ln -s libboost_system-xgcc40-mt-1_38.dylib libboost_system.dylib /opt/local/lib # cf EE + port -N install sqlite3 -y +# port install qt4-mac -y +# ln -s qmake-mac qmake /opt/local/bin # cf EED +# port install mesa -y + port -N install fcgi -y ## It's working ? ;; *) echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem " diff --git a/Linux/scripts/ThirdParty-install-ITK.sh b/Linux/scripts/ThirdParty-install-ITK.sh index a08a8ec..3fb0447 100644 --- a/Linux/scripts/ThirdParty-install-ITK.sh +++ b/Linux/scripts/ThirdParty-install-ITK.sh @@ -68,6 +68,14 @@ source $PWD/scripts/CreaTools-configure.sh # echo $start_point echo "------" + if [ $OperatingSystem = "MacOS" ] + then + # Itk is all ready installed with the macport mechanism + exit 0 + fi + + + #EED 2017-03-24 source $PWD/scripts/LocalFunctions.sh diff --git a/Linux/scripts/ThirdParty-install-VTK.sh b/Linux/scripts/ThirdParty-install-VTK.sh index 4c9db74..ced69e1 100644 --- a/Linux/scripts/ThirdParty-install-VTK.sh +++ b/Linux/scripts/ThirdParty-install-VTK.sh @@ -64,6 +64,8 @@ source $PWD/scripts/CreaTools-configure.sh echo "------" + + #EED 2017-03-24 source $PWD/scripts/LocalFunctions.sh if [ `getDistrib` == "CentOS" ] && [ `getKernelVersion` < "2.6.34" ] @@ -112,11 +114,11 @@ fi echo "we download new stuff" if [ $OperatingSystem = "MacOS" ] then - -## EED 2013-10-29 -## curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/VTK-5.6.1.patchCreatis.tar.gz -## # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-( -## tar -xvf VTK-5.6.1.patchCreatis.tar.gz + +# EED 2013-10-29 +# curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/VTK-5.6.1.patchCreatis.tar.gz +# # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-( +# tar -xvf VTK-5.6.1.patchCreatis.tar.gz curl -O http://www.vtk.org/files/release/5.10/vtk-5.10.1.zip unzip vtk-5.10.1.zip diff --git a/Linux/scripts/ThirdParty-install-WT.sh b/Linux/scripts/ThirdParty-install-WT.sh index 8feeec6..ea5fc67 100644 --- a/Linux/scripts/ThirdParty-install-WT.sh +++ b/Linux/scripts/ThirdParty-install-WT.sh @@ -99,21 +99,22 @@ fi cd $sourcesDir echo "we download new stuff" - if [ $OperatingSystem = "MacOS" ] - then - - curl -O http://www.creatis.insa-lyon.fr/~davila/creatools_back_site/crea_ThirdParty_Libraries/source/wt-3.3.4.tar.gz - tar -xvzf wt-3.3.4.tar.gz - # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-( - else -# wget http://www.creatis.insa-lyon.fr/~davila/creatools_back_site/crea_ThirdParty_Libraries/source/wt-3.3.4.tar.gz -# tar -xvzf wt-3.3.4.tar.gz + +## if [ $OperatingSystem = "MacOS" ] +## then +## # curl -O http://www.creatis.insa-lyon.fr/~davila/creatools_back_site/crea_ThirdParty_Libraries/source/wt-3.3.4.tar.gz +## # tar -xvzf wt-3.3.4.tar.gz +## curl -O http://www.creatis.insa-lyon.fr/~davila/creatools_back_site/crea_ThirdParty_Libraries/source/wt-4.0.4-rc1.tar.gz +## tar -xvzf wt-4.0.4-rc1.tar.gz +## # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-( +## else +## # wget http://www.creatis.insa-lyon.fr/~davila/creatools_back_site/crea_ThirdParty_Libraries/source/wt-3.3.4.tar.gz +## # tar -xvzf wt-3.3.4.tar.gz +## fi wget http://www.creatis.insa-lyon.fr/~davila/creatools_back_site/crea_ThirdParty_Libraries/source/wt-4.0.4-rc1.tar.gz tar -xvzf wt-4.0.4-rc1.tar.gz - fi - #if [ $buildType = "Debug" ] #then @@ -153,5 +154,6 @@ then make -j $corenumber su -c 'make install' + sudo make install cd .. fi diff --git a/Linux/scripts/ThirdParty-install-gdcm.sh b/Linux/scripts/ThirdParty-install-gdcm.sh index 5183c5f..d42809e 100644 --- a/Linux/scripts/ThirdParty-install-gdcm.sh +++ b/Linux/scripts/ThirdParty-install-gdcm.sh @@ -106,25 +106,27 @@ fi cd $sourcesDir echo "we download new stuff" - if [ $OperatingSystem = "MacOS" ] - then - curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_05_Mai_2011.tar.gz - # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-( - tar -xvf gdcm_05_Mai_2011.tar.gz - else -##19mai2015 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_05_Mai_2011.tar.gz - -##VTK-5 -# wget http://www.creatis.insa-lyon.fr/~davila/creatools_back_site/crea_ThirdParty_Libraries/source/gdcm_05_Mai_2011.tar.gz -# tar -xvzf gdcm_05_Mai_2011.tar.gz - -# wget http://www.creatis.insa-lyon.fr/~davila/creatools_back_site/crea_ThirdParty_Libraries/source/gdcm_10_Mars_2017-vtk7.tar.gz -# tar -xvzf gdcm13_2018_05_28_vtk8.tar.gz + +## if [ $OperatingSystem = "MacOS" ] +## then +## curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_05_Mai_2011.tar.gz +## # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-( +## tar -xvf gdcm_05_Mai_2011.tar.gz +## else +## ##19mai2015 wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/gdcm_05_Mai_2011.tar.gz +## +## ##VTK-5 +## # wget http://www.creatis.insa-lyon.fr/~davila/creatools_back_site/crea_ThirdParty_Libraries/source/gdcm_05_Mai_2011.tar.gz +## # tar -xvzf gdcm_05_Mai_2011.tar.gz +## +## # wget http://www.creatis.insa-lyon.fr/~davila/creatools_back_site/crea_ThirdParty_Libraries/source/gdcm_10_Mars_2017-vtk7.tar.gz +## # tar -xvzf gdcm13_2018_05_28_vtk8.tar.gz +## fi wget http://www.creatis.insa-lyon.fr/~davila/creatools_back_site/crea_ThirdParty_Libraries/source/gdcm13_2018_05_28_vtk8.zip unzip gdcm13_2018_05_28_vtk8.zip + mv gdcm13_2018_05_28_vtk8 gdcm - fi if [ $buildType = "Debug" ] then -- 2.45.1