X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Linux%2Fscripts%2FThirdParty-install-Base-Stuff.sh;h=7caf9ca714ec77f2d6b156441a88fd214833637d;hb=1195cf5621f8d7a36af22f32633d443e8d29221d;hp=7220629fc79321a38bb781955c3b79539048eb79;hpb=63bff5e113add61604110d7438d2c560e6954b4d;p=creaToolsTools.git diff --git a/Linux/scripts/ThirdParty-install-Base-Stuff.sh b/Linux/scripts/ThirdParty-install-Base-Stuff.sh index 7220629..7caf9ca 100644 --- a/Linux/scripts/ThirdParty-install-Base-Stuff.sh +++ b/Linux/scripts/ThirdParty-install-Base-Stuff.sh @@ -1,121 +1,45 @@ -#!/bin/bash - - if [ ! -f $PWD/scripts/CreaTools-configure.sh ] - then - echo - echo "..ERROR.." - echo "===================================================" - echo "REMEMBER !" - echo "" - echo "YOU NEED TO RUN 'Configure' (0) First !" - echo "===================================================" - echo - echo - exit 0 -fi - -source $PWD/scripts/CreaTools-configure.sh -scriptDir=$PWD -sourcesDir=$generationdir/thirdparty_sources -binDir=$generationdir/thirdparty_bin +# --------------------------------------------------------------------- +# +# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image +# pour la Santé) +# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton +# +# This software is governed by the CeCILL-B license under French law and +# abiding by the rules of distribution of free software. You can use, +# modify and/ or redistribute the software under the terms of the CeCILL-B +# license as circulated by CEA, CNRS and INRIA at the following URL +# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +# or in the file LICENSE.txt. +# +# As a counterpart to the access to the source code and rights to copy, +# modify and redistribute granted by the license, users are provided only +# with a limited warranty and the software's author, the holder of the +# economic rights, and the successive licensors have only limited +# liability. +# +# The fact that you are presently reading this means that you have had +# knowledge of the CeCILL-B license and that you accept its terms. +# ------------------------------------------------------------------------ -if [ ! -e $generationdir ] -then - mkdir $generationdir - chown $loginUserName $generationdir - chgrp $loginGroupName $generationdir -fi -if [ ! -e $sourcesDir ] -then - mkdir $sourcesDir - #was : (pb on MacOS?) - #chown $loginUserName:$loginGroupName $sourcesDir - chown $loginUserName $sourcesDir - chgrp $loginGroupName $sourcesDir -fi - -if [ ! -e $binDir ] -then - mkdir $binDir - chown $loginUserName $binDir - chgrp $loginGroupName $binDir -fi +#!/bin/bash -# the following stupid test is used at debug time; Please don't remove! -if [ true = true ] -#if [ true = false ] -then - # ///\TODO what about SuSE? Debian? Mandriva? Gentoo? - case "$OperatingSystem" in - Fedora) - yum install wget -y - yum install cmake -y - yum install cmake-gui -y - yum install doxygen -y - yum install graphviz -y - yum install texlive -y - yum install latex2html -y - yum install wxGTK-devel wxBase -y - yum install boost-devel -y - yum install sqlite-devel -y - yum install qt-devel -y - yum install mesa-libOSMesa-devel -y - yum install gcc -y - yum install gcc-c++ -y - yum install xerces-c-devel -y - yum install cvs -y - yum install qtwebkit-devel -y +OperatingSystem=$1 +echo "OperatingSystem = $OperatingSystem" + + if [ "`whoami`" == root ] ; then + echo "ThirdParty-install-Base-rpm.sh $OperatingSystem" + bash ThirdParty-install-Base-rpm.sh $OperatingSystem + else + # must log as root + echo "Please enter the root passwd to add necessary packages:"; + if [ "Ubuntu" == $OperatingSystem ] ; then + sudo bash ThirdParty-install-Base-rpm.sh $OperatingSystem + elif [ "MacOS" == $OperatingSystem ] ; then + sudo bash ThirdParty-install-Base-rpm.sh $OperatingSystem + else + su -c "bash ThirdParty-install-Base-rpm.sh $OperatingSystem" + fi + fi - ;; - Ubuntu) - apt-get --yes install build-essential # esta linea instala las librerias necesarias para compilar en ubuntu, g++ gcc etc etc etc. - apt-get --yes install cmake - apt-get --yes install cmake-gui - apt-get --yes install cmake-curses-gui - apt-get --yes install doxygen - apt-get --yes install graphviz - apt-get --yes install texlive - apt-get --yes install latex2html - apt-get --yes install libgtk2.0-dev #GTK - apt-get --yes install libwxgtk2.8-dev #Wx GTK - apt-get --yes install libwxbase2.8-dev #Wx solito - apt-get --yes install wx-common #wxrc - apt-get --yes install libboost-dev #Boost - apt-get --yes install libboost-all-dev #Boost - apt-get --yes install libqt4-dev #QT4 - ## CLAIRE - JGRR - apt-get --yes install qt4-qmake #QT4 qmake - apt-get --yes install libsqlite0-dev - apt-get --yes install libsqlite3-dev - 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 - ;; - *) - echo " '$OperatingSystem' : Unknown (for us...) Operating Sytem " - echo " Allowed values are (right now) Fedora, Ubuntu, MacOS " - exit 0 - ;; - esac -fi