From: jean-pierre roux Date: Fri, 5 Nov 2010 11:38:51 +0000 (+0000) Subject: Allow choosing OperatingSystem X-Git-Tag: Creatools2-0-3.creaToolsTools2-0-3.17Feb2011~97 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=6a0e6c1046a9bc20dd03df2e34d212281d7d351f;p=creaToolsTools.git Allow choosing OperatingSystem --- diff --git a/Install_ThirdParty/Readme.txt b/Install_ThirdParty/Readme.txt index 32570fb..0722f60 100644 --- a/Install_ThirdParty/Readme.txt +++ b/Install_ThirdParty/Readme.txt @@ -1,5 +1,34 @@ +=== === === UNIX / LINUX users === === === +1) Make sure you are a 'sudoer' : --sudo configuration-- https://fedoraproject.org/wiki/Configuring_Sudo +2) Make sure you got the last version of creaToolsTools. +cvs update -dP creaToolsTools + +3)cd Install_ThirdParty +cp install_thirdparty.sh_TEMPLATE install_thirdparty.sh + +4) modify the file install_thirdparty.sh, according to your preferences, modify (only once) creatools.sh +vim install_thirdparty.sh +as follows : + +-- install_thirdparty.sh --------------------- +creatoolsGeneration= + installPrefix=$creatoolsGeneration/creatools_install + or + installPrefix=/usr/local +buildType= +OperatingSystem= +cd scripts +sh install_thirdparty_all.sh $creatoolsGeneration $installPrefix $buildType $OperatingSystem +cd .. +----------------------- + +5) Run the whole stuff : +sh install_thirdparty.sh + +=== === === WINDOWS users === === === + diff --git a/Install_ThirdParty/install_thirdparty.sh_TEMPLATE b/Install_ThirdParty/install_thirdparty.sh_TEMPLATE index fa44d18..7ee61f6 100644 --- a/Install_ThirdParty/install_thirdparty.sh_TEMPLATE +++ b/Install_ThirdParty/install_thirdparty.sh_TEMPLATE @@ -1,8 +1,24 @@ -creatoolsGeneration=~/Creatis/All/thirdParty_creatools -installPrefix=$creatoolsGeneration/thirdparty_install -buildType=Debug +USER : Modify the following lines ! + +creatoolsGeneration= + +installPrefix=$creatoolsGeneration/creatools_install +# or +#installPrefix=/usr/local + +buildType= + +OperatingSystem= + +Example : + +#creatoolsGeneration=~/Creatis/All/thirdParty_creatools +#installPrefix=$creatoolsGeneration/thirdparty_install +#buildType=Debug +#OperatingSystem=Linux + +USER : Hand off! -#sudo pwd cd scripts -sh install_thirdparty_all.sh $creatoolsGeneration $installPrefix $buildType +sh install_thirdparty_all.sh $creatoolsGeneration $installPrefix $buildType $OperatingSystem cd .. diff --git a/Install_ThirdParty/scripts/install_thirdparty_all.sh b/Install_ThirdParty/scripts/install_thirdparty_all.sh index a63a0b1..a1537fd 100644 --- a/Install_ThirdParty/scripts/install_thirdparty_all.sh +++ b/Install_ThirdParty/scripts/install_thirdparty_all.sh @@ -4,9 +4,10 @@ if [ $# = 0 ] then echo "Use it as :" - echo "sh install_thirdparty_fedora.sh " + echo "sh install_thirdparty_all.sh " + echo "with 'OperatingSystem' in {Fedora, Ubuntu, MacOS}" echo " " - echo "ex : sh install_thirdparty_fedora.sh /tmp/gendir /home/jpr/myInstallDirectory Debug" + echo "ex : sh install_thirdparty_all.sh /tmp/gendir ~/Creatis/myInstallDirectory Debug Ubuntu" exit 0 fi @@ -16,14 +17,16 @@ echo $0 echo $1 echo $2 echo $3 +echo $4 echo "----------" -if [ $# != 3 ] +if [ $# != 4 ] then echo "Use it as :" - echo "sh install_thirdparty_fedora.sh " + echo "sh install_thirdparty_all.sh " + echo "with 'OperatingSystem' in {Fedora, Ubuntu, MacOS}" echo " " - echo "ex : sh install_thirdparty_fedora.sh /tmp/gendir /home/jpr/myInstallDirectory Debug" + echo "ex : sh install_thirdparty_all.sh /tmp/gendir ~/Creatis/myInstallDirectory Debug Ubuntu" exit 0 fi @@ -31,6 +34,7 @@ fi generationdir=$1 installPrefix=$2 buildType=$3 +OS=$4 scriptDir=$PWD sourcesDir=$generationdir/thirdparty_sources @@ -43,17 +47,51 @@ mkdir $binDir # the following stupid test is used at debug time; Please don't remove! if [ true = true ] then - sudo yum install cmake -y - sudo yum install cmake-gui -y - sudo yum install doxygen -y - sudo yum install graphviz -y - sudo yum install texlive -y - sudo yum install latex2html -y - sudo yum install wxGTK-devel wxBase -y - sudo yum install boost-devel -y - sudo yum install sqlite-devel -y - sudo yum install qt-devel -y - sudo yum install mesa-libOSMesa-devel -y + + case $OS in + Fedora) + sudo yum install cmake -y + sudo yum install cmake-gui -y + sudo yum install doxygen -y + sudo yum install graphviz -y + sudo yum install texlive -y + sudo yum install latex2html -y + sudo yum install wxGTK-devel wxBase -y + sudo yum install boost-devel -y + sudo yum install sqlite-devel -y + sudo yum install qt-devel -y + sudo yum install mesa-libOSMesa-devel -y + ;; + Ubuntu) + sudo apt-get --yes install build-essential # esta linea instala las librerias necesarias para compilar en ubuntu, g++ gcc etc etc etc. + sudo apt-get --yes install cmake + sudo apt-get --yes install cmake-gui + sudo apt-get --yes install cmake-curses-gui + sudo apt-get --yes install doxygen + sudo apt-get --yes install graphviz + sudo apt-get --yes install texlive + sudo apt-get --yes install latex2html + sudo apt-get --yes install libgtk2.0-dev #GTK + sudo apt-get --yes install libwxgtk2.8-dev #Wx GTK + sudo apt-get --yes install libwxbase2.8-dev #Wx solito + sudo apt-get --yes install libboost-dev #Boost + sudo apt-get --yes install libboost-all-dev #Boost + sudo apt-get --yes install libqt4-dev #QT4 + sudo apt-get --yes install sqlite + sudo apt-get --yes install libosmesa6-dev #Mesa6 + sudo apt-get --yes install uuid-dev # uuid para la instalacion de itk + sudo apt-get --yes install libxaw7-dev # X11 + ;; + MacOS) + echo "MacOS not yet dealt with ..." + exit 0 + ;; + *) + echo " '$OS' : Unknown (for us...) Operating Sytem " + echo " Allowed values are (right now) Fedora, Ubuntu, MacOS " + exit 0 + ;; + esac fi