1 # ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
7 # This software is governed by the CeCILL-B license under French law and
8 # abiding by the rules of distribution of free software. You can use,
9 # modify and/ or redistribute the software under the terms of the CeCILL-B
10 # license as circulated by CEA, CNRS and INRIA at the following URL
11 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
12 # or in the file LICENSE.txt.
14 # As a counterpart to the access to the source code and rights to copy,
15 # modify and redistribute granted by the license, users are provided only
16 # with a limited warranty and the software's author, the holder of the
17 # economic rights, and the successive licensors have only limited
20 # The fact that you are presently reading this means that you have had
21 # knowledge of the CeCILL-B license and that you accept its terms.
22 # ------------------------------------------------------------------------
27 if [ ! -f $PWD/scripts/CreaTools-configure.sh ]
31 echo "==================================================="
34 echo "YOU NEED TO RUN 'Configure' (0) First !"
35 echo "==================================================="
41 source $PWD/scripts/CreaTools-configure.sh
42 echo "=================================== in ThirdParty-install-Finalize.sh ETC_BASHRC : " $ETC_BASHRC
44 # /// \TODO move theese ones upper in the process! JPR
46 export GDCM_DIR=$installPrefixThird/lib/gdcm/
47 export VTK_DIR=$installPrefixThird/lib/vtk-5.10/
48 export ITK_DIR=$installPrefixThird/lib/InsightToolkit/
51 #deal with create creatools_third_party_libraries_config.sh
52 echo "=========================================================installPrefixThird "$installPrefixThird
53 if [ -f $installPrefixThird/share/creatools_third_party_library_config.sh ]
55 rm $installPrefixThird/share/creatools_third_party_library_config.sh
58 if [ ! -e $installPrefixThird/share ]
60 mkdir $installPrefixThird/share
62 touch $installPrefixThird/share/creatools_third_party_library_config.sh
63 chmod 755 $installPrefixThird/share/creatools_third_party_library_config.sh
65 echo export PATH='$'PATH:$installPrefixThird/bin >> $installPrefixThird/share/creatools_third_party_library_config.sh
66 echo export VTK_DIR=$installPrefixThird/lib/vtk-5.10 >> $installPrefixThird/share/creatools_third_party_library_config.sh
67 echo export ITK_DIR=$installPrefixThird/lib/InsightToolkit >> $installPrefixThird/share/creatools_third_party_library_config.sh
68 echo export GDCM_DIR=$installPrefixThird/lib/gdcm >> $installPrefixThird/share/creatools_third_party_library_config.sh
69 echo export TTH=$installPrefixThird/bin/tth >> $installPrefixThird/share/creatools_third_party_library_config.sh
71 if [ $OperatingSystem = "MacOS" ]
73 echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
74 echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
75 echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
77 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$GDCM_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
78 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$ITK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
79 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$VTK_DIR >> $installPrefixThird/share/creatools_third_party_library_config.sh
82 sed -i -e '/.*installPrefixThird*/ d' $ETC_BASHRC
83 sed -i -e '/.*creatools_third_party_library_config.*/ d' $ETC_BASHRC
85 # - add line 'bash $installPrefixThird/share/creatools_third_party_library_config.sh' (with accurate value for ???)
87 echo "====================================================ETC_BASHRC " $ETC_BASHRC
88 echo installPrefixThird=$installPrefixThird >> $ETC_BASHRC
89 echo '[ -f "$installPrefixThird/share/creatools_third_party_library_config.sh" ] && source $installPrefixThird/share/creatools_third_party_library_config.sh' >> $ETC_BASHRC
91 chown -R $loginUserName $generationdir
92 chgrp -R $loginGroupName $generationdir