#!/bin/bash -e
-scriptDirName=$(dirname $(readlink -f $0) )
+#EED 2018-08-26
+
+#scriptDirName=$(dirname $(readlink -f $0) )
+scriptDirName=$(pwd)
#########################################################################
############ Local Functions #######################################
# 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
# 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
# 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
###########################################
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
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
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 "
# 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
echo "------"
+
+
#EED 2017-03-24
source $PWD/scripts/LocalFunctions.sh
if [ `getDistrib` == "CentOS" ] && [ `getKernelVersion` < "2.6.34" ]
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
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
make -j $corenumber
su -c 'make install'
+ sudo make install
cd ..
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