X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=Install_ThirdParty%2Fscripts%2Finstall_thirdparty_all.sh;h=d430a5cad4192b32b34fce451e4fa27e320397ab;hb=cb120dc0de76631b51a30ec7bfb6d9ed20d826a3;hp=924c95b1e28b73cc736437d68c58649b6483b7db;hpb=331fd5cb62a0e7e9a10f0959c28e1c3e2c820e9f;p=creaToolsTools.git diff --git a/Install_ThirdParty/scripts/install_thirdparty_all.sh b/Install_ThirdParty/scripts/install_thirdparty_all.sh index 924c95b..d430a5c 100644 --- a/Install_ThirdParty/scripts/install_thirdparty_all.sh +++ b/Install_ThirdParty/scripts/install_thirdparty_all.sh @@ -21,18 +21,21 @@ echo $3 echo $4 echo "----------" + + if [ $# = 0 || $# != 4 ] then echo "Use it as :" echo "sh install_thirdparty_all.sh " echo "with 'OperatingSystem' in {Fedora, Ubuntu, MacOS}" - echo "with 'installPrefix' : /usr/local or + echo "with 'installPrefix' : /usr/local or " echo " " echo "ex : sh install_thirdparty_all.sh /tmp/gendir /tmp/gendir/thirdparty_install Debug Ubuntu" exit 0 fi - +echo $OS +echo 'ididid' generationdir=$1 installPrefix=$2 buildType=$3 @@ -42,15 +45,21 @@ scriptDir=$PWD sourcesDir=$generationdir/thirdparty_sources binDir=$generationdir/thirdparty_bin + mkdir $generationdir mkdir $sourcesDir mkdir $binDir +sudo rm $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh + + + + # the following stupid test is used at debug time; Please don't remove! if [ true = true ] then - case $OS in + case "$OS" in Fedora) sudo yum install cmake -y sudo yum install cmake-gui -y @@ -80,6 +89,7 @@ then 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 libsqlite0-dev 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 @@ -100,7 +110,7 @@ then sudo port install mesa-libOSMesa-devel -y ;; *) - echo " '$OS' : Unknown (for us...) Operating Sytem " + #echo " '$OS' : Unknown (for us...) Operating Sytem " echo " Allowed values are (right now) Fedora, Ubuntu, MacOS " exit 0 ;; @@ -185,25 +195,23 @@ fi #deal with create creatools_third_party_libraries_config.sh -THIRDPARTY_INSTALL_DIR=$installPrefix/thirdparty_install -sudo rm $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh -sudo touch $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh -sudo chmod 666 $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh +sudo touch $installPrefix/share/creatools_third_party_library_config.sh +sudo chmod 666 $installPrefix/share/creatools_third_party_library_config.sh -sudo echo export PATH=$PATH:$THIRDPARTY_INSTALL_DIR/bin >> $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh -sudo echo export VTK_DIR=$THIRDPARTY_INSTALL_DIR/lib/vtk-5.6 >> $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh -sudo echo export ITK_DIR=$THIRDPARTY_INSTALL_DIR/lib/InsightToolkit >> $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh -sudo echo export GDCM_DIR=$THIRDPARTY_INSTALL_DIR/lib/gdcm >> $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh -sudo echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$GDCM_DIR >> $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh -sudo echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ITK_DIR >> $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh -sudo echo export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$VTK_DIR >> $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_library_config.sh +sudo echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_third_party_library_config.sh +sudo echo export VTK_DIR=$installPrefix/lib/vtk-5.6 >> $installPrefix/share/creatools_third_party_library_config.sh +sudo echo export ITK_DIR=$installPrefix/lib/InsightToolkit >> $installPrefix/share/creatools_third_party_library_config.sh +sudo echo export GDCM_DIR=$installPrefix/lib/gdcm >> $installPrefix/share/creatools_third_party_library_config.sh +sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$GDCM_DIR >> $installPrefix/share/creatools_third_party_library_config.sh +sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$ITK_DIR >> $installPrefix/share/creatools_third_party_library_config.sh +sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR >> $installPrefix/share/creatools_third_party_library_config.sh # modify .bashrc -# - remove line 'sh $installPrefix/thirdparty_install/share/creatools_third_party_libraries_config.sh' if any (with accurate value for ???) -sed -i -e 's/.*creatools_third_party_libraries_config.*/ /g' ~/.bashrc +# - remove line 'sh $installPrefix/share/creatools_third_party_library_config.sh' if any (with accurate value for ???) +sed -i -e '/.*creatools_third_party_library_config.*/ d' ~/.bashrc -# - add line 'sh $installPrefix/thirdparty_install/share/creatools_third_party_libraries_config.sh' (with accurate value for ???) -echo sh $THIRDPARTY_INSTALL_DIR/share/creatools_third_party_libraries_config.sh >> ~/.bashrc +# - add line 'sh $installPrefix/share/creatools_third_party_library_config.sh' (with accurate value for ???) +echo source $installPrefix/share/creatools_third_party_library_config.sh >> ~/.bashrc