if [ `checkVal $command all 3rd 3rd-base` == true ] ; then
bigDisplay "INSTALL PACKAGES DEPENDENCIES"
if [ "`whoami`" == root ] ; then
- bash scripts/ThirdParty-install-Base-Stuff.sh
+ echo ThirdParty-install-Base-Stuff
+ bash scripts/ThirdParty-install-Base-Stuff.sh
else
# must log as root
echo "Please enter the root passwd to add necessary packages:";
- sudo su -c "bash scripts/ThirdParty-install-Base-Stuff.sh"
+ su -c "bash scripts/ThirdParty-install-Base-Stuff.sh"
fi
bash scripts/ThirdParty-install.sh
fi
if [ `checkVal $command all creatools creatools-cmp` == true ] ; then
bigDisplay "COMPILE CREATOOLS"
source $ETC_BASHRC
- bash -x scripts/CreaTools-compile.sh
+ bash -x scripts/CreaTools-compile.sh
# To allow (*very* aware) user to patch code, later
if [ ! -e $generationdir/creatools_source ] ; then
#create creatools_base_library_config.sh at the very begining, so we can write "export xxx_BIN=..." inside installmod.sh. JPRx 3 mars 2011
- if [ -f $installPrefix/share/creatools_base_library_config.sh ]
- then
- rm $installPrefix/share/creatools_base_library_config.sh
- fi
- touch $installPrefix/share/creatools_base_library_config.sh
- chmod 755 $installPrefix/share/creatools_base_library_config.sh
-
- echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
- if [ $OperatingSystem = "MacOS" ]
- then
- echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
- else
- echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
- echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
- fi
+##EED if [ -f $installPrefix/share/creatools_base_library_config.sh ]
+##EED then
+##EED rm $installPrefix/share/creatools_base_library_config.sh
+##EED fi
+##EED touch $installPrefix/share/creatools_base_library_config.sh
+
+
# Install creatools as user (no longer as root) // JPR 2/5/2011
# - remove line 'bash $installPrefix/creatools_install/share/creatools_base_library_config.sh' if any
sed -i -e '/.*creatools_base_library_config.*/ d' $ETC_BASHRC
sed -i -e '/installPrefixtmp*/ d' $ETC_BASHRC
-
+
+ mkdir $installPrefix
+ mkdir $installPrefix/share
+ echo '## This file is call from .bashrc' > $installPrefix/share/creatools_base_library_config.sh
+ bash installmodBash.sh $installPrefix
+
# JPR 2/5/2011
# modify /etc/bashrc (we cannot modify .bashrc, since we switched as root)
# - add line 'bash $installPrefix/creatools_install/share/creatools_base_library_config.sh'
bash installmodNomake.sh $buildType wxvtk $generationdir $installPrefix
#EED I don't know why this works here and not after the chmod 755
-echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
-if [ $OperatingSystem = "MacOS" ]
-then
- echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
-else
- echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
- echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
-fi
+#EED bash installmodBash.sh $installPrefix
echo "===================================================in CreaTools-install.sh ETC_BASHRC : " $ETC_BASHRC
echo installPrefixtmp=$installPrefix >> $ETC_BASHRC
-echo '[ -f "$installPrefixtmp/share/creatools_base_library_config.sh" ] && source $installPrefixtmp/share/creatools_base_library_config.sh' >> $ETC_BASHRC
-
-source $installPrefix/share/creatools_base_library_config.sh
-echo "==================================================="
-echo " Regenerate Package doc"
-$installPrefix/bin/bbRegeneratePackageDoc -a -q
-echo " Regenerate Boxes list"
-$installPrefix/bin/bbRegenerateBoxesLists -q
-echo "==================================================="
+echo '[ -f "$installPrefixtmp/share/creatools_base_library_config.sh" ] && source $installPrefixtmp/share/creatools_base_library_config.sh $installPrefixtmp' >> $ETC_BASHRC
+
+source $installPrefix/share/creatools_base_library_config.sh $installPrefix
+
+##EED 21/12/2014
+##EED echo "==================================================="
+##EED echo " Regenerate Package doc"
+##EED $installPrefix/bin/bbRegeneratePackageDoc -a -q
+##EED echo " Regenerate Boxes list"
+##EED $installPrefix/bin/bbRegenerateBoxesLists -q
+##EED echo "==================================================="
# JPR 2/5/2011
#else
#if [ true = false ]
if [ true = true ]
then
-# rm -rf creatools_bin
-# mkdir $generationdir/creatools_bin
rm -rf creatools_source
+ rm -rf creatools_bin
+ rm -rf creatools_install
mkdir $generationdir/creatools_source
fi
fi
#
if [ $sourcesFrom = GIT ] || [ $sourcesFrom = GIT-READ-ONLY ];
then
+ ssh-add
bash $scriptDir/gitclone.sh $creasource $generationdir $sourcesFrom
bash $scriptDir/gitclone.sh $bbtksource $generationdir $sourcesFrom
bash $scriptDir/gitclone.sh $creavtksource $generationdir $sourcesFrom
touch $installPrefixThird/share/creatools_third_party_library_config.sh
chmod 755 $installPrefixThird/share/creatools_third_party_library_config.sh
-echo export PATH='$'PATH:$installPrefixThird/bin >> $installPrefixThird/share/creatools_third_party_library_config.sh
-echo export VTK_DIR=$installPrefixThird/lib/vtk-5.10 >> $installPrefixThird/share/creatools_third_party_library_config.sh
-echo export ITK_DIR=$installPrefixThird/lib/InsightToolkit >> $installPrefixThird/share/creatools_third_party_library_config.sh
-echo export GDCM_DIR=$installPrefixThird/lib/gdcm >> $installPrefixThird/share/creatools_third_party_library_config.sh
-echo export TTH=$installPrefixThird/bin/tth >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo installPrefixThird='$1' >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export PATH='$'PATH:'$'installPrefixThird/bin >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export VTK_DIR='$'installPrefixThird/lib/vtk-5.10 >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export ITK_DIR='$'installPrefixThird/lib/InsightToolkit >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export GDCM_DIR='$'installPrefixThird/lib/gdcm >> $installPrefixThird/share/creatools_third_party_library_config.sh
+echo export TTH='$'installPrefixThird/bin/tth >> $installPrefixThird/share/creatools_third_party_library_config.sh
if [ $OperatingSystem = "MacOS" ]
then
- echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
- echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
- echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+ echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:'$'GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+ echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:'$'ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+ echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:'$'VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
else
- echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
- echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
- echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+ echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:'$'GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+ echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:'$'ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
+ echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:'$'VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
fi
sed -i -e '/.*installPrefixThird*/ d' $ETC_BASHRC
echo "====================================================ETC_BASHRC " $ETC_BASHRC
echo installPrefixThird=$installPrefixThird >> $ETC_BASHRC
-echo '[ -f "$installPrefixThird/share/creatools_third_party_library_config.sh" ] && source $installPrefixThird/share/creatools_third_party_library_config.sh' >> $ETC_BASHRC
+echo '[ -f "$installPrefixThird/share/creatools_third_party_library_config.sh" ] && source $installPrefixThird/share/creatools_third_party_library_config.sh $installPrefixThird' >> $ETC_BASHRC
chown -R $loginUserName $generationdir
chgrp -R $loginGroupName $generationdir
+
+source ~/.bashrc
## tar -xvf VTK-5.6.1.patchCreatis.tar.gz
curl -O http://www.vtk.org/files/release/5.10/vtk-5.10.1.zip
- # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-(
unzip vtk-5.10.1.zip
-
+ cd VTK5.10.1/Rendering
+ curl -O http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/vtk-5.10.1.vtkXOpenGLRenderWindow.patch
+ patch < vtk-5.10.1.vtkXOpenGLRenderWindow.patch
+ # MacOS, clever enough to understand it *has* to uncompress, doesn't understand tar -z :-(
else
## EED 2013-10-29
echo unzip vtk-5.10.1.zip
pwd
unzip vtk-5.10.1.zip
+
+ cd VTK5.10.1/Rendering
+ wget http://www.creatis.insa-lyon.fr/software/public/creatools/crea_ThirdParty_Libraries/source/vtk-5.10.1.vtkXOpenGLRenderWindow.patch
+ patch < vtk-5.10.1.vtkXOpenGLRenderWindow.patch
fi
+
+
+
#if [ $buildType = "Debug" ]
#then
# debug="ON"
# grouik style patch JPR
if [ $2 = "bbtk" ]
then
- echo export BBTK_DIR=$installPrefix/lib64/creatools/$2 >> $installPrefix/share/creatools_base_library_config.sh
+ echo export BBTK_DIR='$'installPrefix/lib64/creatools/$2 >> $installPrefix/share/creatools_base_library_config.sh
else
- echo export $2_DIR=$installPrefix/lib64/creatools/$2 >> $installPrefix/share/creatools_base_library_config.sh
- echo export bb$2_DIR=$installPrefix/lib64/creatools/bb$2 >> $installPrefix/share/creatools_base_library_config.sh
+ echo export $2_DIR='$'installPrefix/lib64/creatools/$2 >> $installPrefix/share/creatools_base_library_config.sh
+ echo export bb$2_DIR='$'installPrefix/lib64/creatools/bb$2 >> $installPrefix/share/creatools_base_library_config.sh
fi
else
# grouik style patch JPR
if [ $2 = "bbtk" ]
then
- echo "export BBTK_DIR=$installPrefix/lib/creatools/$2" >> $installPrefix/share/creatools_base_library_config.sh
+ echo "export BBTK_DIR='$'installPrefix/lib/creatools/$2" >> $installPrefix/share/creatools_base_library_config.sh
else
- echo "export $2_DIR=$installPrefix/lib/creatools/$2" >> $installPrefix/share/creatools_base_library_config.sh
- echo "export bb$2_DIR=$installPrefix/lib/creatools/bb$2" >> $installPrefix/share/creatools_base_library_config.sh
+ echo "export $2_DIR='$'installPrefix/lib/creatools/$2" >> $installPrefix/share/creatools_base_library_config.sh
+ echo "export bb$2_DIR='$'installPrefix/lib/creatools/bb$2" >> $installPrefix/share/creatools_base_library_config.sh
fi
else
echo "============================= NEITHER $installPrefix/lib64 NOR $installPrefix/lib EXIST ?!?"
--- /dev/null
+# ---------------------------------------------------------------------
+#
+# 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.
+# ------------------------------------------------------------------------
+
+
+# $1 : installPrefix
+
+echo
+echo
+echo
+echo "------------------------------------------in installmodBash-------------"
+
+source CreaTools-configure.sh
+source CreaTools-names.sh
+
+echo installPrefix='$1' >> $installPrefix/share/creatools_base_library_config.sh
+echo export PATH='$'PATH:'$'installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
+if [ $OperatingSystem = "MacOS" ]
+then
+ echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:'$'installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
+else
+ echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:'$'installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
+ echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:'$'installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
+fi
+
+
#then
# echo export BBTK_DIR=$installPrefix/lib64/creatools/$2 >> $installPrefix/share/creatools_base_library_config.sh
#else
- echo export $2_DIR=$installPrefix/lib64/creatools/$2 >> $installPrefix/share/creatools_base_library_config.sh
- echo export bb$2_DIR=$installPrefix/lib64/creatools/bb$2 >> $installPrefix/share/creatools_base_library_config.sh
+ echo export $2_DIR='$'installPrefix/lib64/creatools/$2 >> $installPrefix/share/creatools_base_library_config.sh
+ echo export bb$2_DIR='$'installPrefix/lib64/creatools/bb$2 >> $installPrefix/share/creatools_base_library_config.sh
#fi
fi
# then
# echo "export BBTK_DIR=$installPrefix/lib/creatools/$2" >> $installPrefix/share/creatools_base_library_config.sh
# else
- echo "export $2_DIR=$installPrefix/lib/creatools/$2" >> $installPrefix/share/creatools_base_library_config.sh
- echo "export bb$2_DIR=$installPrefix/lib/creatools/bb$2" >> $installPrefix/share/creatools_base_library_config.sh
+ echo "export $2_DIR='$'installPrefix/lib/creatools/$2" >> $installPrefix/share/creatools_base_library_config.sh
+ echo "export bb$2_DIR='$'installPrefix/lib/creatools/bb$2" >> $installPrefix/share/creatools_base_library_config.sh
# fi
else
--- /dev/null
+# ---------------------------------------------------------------------
+#
+# 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.
+# ------------------------------------------------------------------------
+
+
+#!/bin/bash
+
+# JPR 2/5/2011
+#if [ $UID = 0 ]
+#then
+ # Set all local variables
+ source $PWD/scripts/CreaTools-configure.sh
+
+ if [ -e $generationdir ]
+ then
+ fileTGZ=$generationdir/creaTools-Bin.tgz
+ tar -cvzf $fileTGZ $installPrefix $installPrefixThird
+
+ echo ""
+ echo "Creation OK:"
+ echo $fileTGZ
+ echo ""
+
+ else
+ echo
+ echo "..ERROR.."
+ echo "==================================================="
+ echo "REMEMBER !"
+ echo ""
+ echo "You MUST load the Creatools sources before (use 2.2)!"
+ echo "==================================================="
+ echo
+ echo
+ read a
+ exit 0
+ fi
+
+
+