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 # ------------------------------------------------------------------------
30 # Set all local variables
31 source $PWD/scripts/CreaTools-configure.sh
32 source $PWD/scripts/CreaTools-names.sh
34 if [ -e $generationdir ]
36 if [ ! -e $generationdir/creatools_install ]
38 mkdir $generationdir/creatools_install
43 echo "==================================================="
46 echo "You MUST load the Creatools sources before (use 2.2)!"
47 echo "==================================================="
56 #create creatools_base_library_config.sh at the very begining, so we can write "export xxx_BIN=..." inside installmod.sh. JPRx 3 mars 2011
58 if [ -f $installPrefix/share/creatools_base_library_config.sh ]
60 rm $installPrefix/share/creatools_base_library_config.sh
62 touch $installPrefix/share/creatools_base_library_config.sh
63 chmod 755 $installPrefix/share/creatools_base_library_config.sh
65 echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
66 if [ $OperatingSystem = "MacOS" ]
68 echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
70 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
71 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
74 # Install creatools as user (no longer as root) // JPR 2/5/2011
76 # - remove line 'bash $installPrefix/creatools_install/share/creatools_base_library_config.sh' if any
77 sed -i -e '/.*creatools_base_library_config.*/ d' $ETC_BASHRC
78 sed -i -e '/installPrefixtmp*/ d' $ETC_BASHRC
81 # modify /etc/bashrc (we cannot modify .bashrc, since we switched as root)
82 # - add line 'bash $installPrefix/creatools_install/share/creatools_base_library_config.sh'
84 bash installmod.sh $buildType $creasource $generationdir $installPrefix
85 bash installmod.sh $buildType $bbtksource $generationdir $installPrefix
86 bash installmod.sh $buildType $creamaracassource $generationdir $installPrefix
87 bash installmod.sh $buildType $creaenvironmentsource $generationdir $installPrefix
88 bash installmod.sh $buildType $creabrukersource $generationdir $installPrefix
89 bash installmod.sh $buildType $creaimagesource $generationdir $installPrefix
90 bash installmod.sh $buildType $creacontourssource $generationdir $installPrefix
91 bash installmod.sh $buildType $crearigidregistrationssource $generationdir $installPrefix
92 bash installmod.sh $buildType $bbtkgeditorsource $generationdir $installPrefix
93 bash installmod.sh $buildType $creatoolssource $generationdir $installPrefix
94 bash installmod.sh $buildType $creaminitoolssource $generationdir $installPrefix
95 # bash installmod.sh $buildType $libidosource $generationdir $installPrefix
97 #export as well bbPackages_DIR // JPR 25 Mai 2011
99 bash installmodNomake.sh $buildType appli $generationdir $installPrefix
100 bash installmodNomake.sh $buildType creaMiniToolsBase $generationdir $installPrefix
101 bash installmodNomake.sh $buildType demo $generationdir $installPrefix
102 bash installmodNomake.sh $buildType gdcmvtk $generationdir $installPrefix
103 bash installmodNomake.sh $buildType itk $generationdir $installPrefix
104 bash installmodNomake.sh $buildType itkvtk $generationdir $installPrefix
105 bash installmodNomake.sh $buildType qt $generationdir $installPrefix
106 bash installmodNomake.sh $buildType std $generationdir $installPrefix
107 bash installmodNomake.sh $buildType toolsbbtk $generationdir $installPrefix
108 bash installmodNomake.sh $buildType vtk $generationdir $installPrefix
109 bash installmodNomake.sh $buildType wx $generationdir $installPrefix
110 bash installmodNomake.sh $buildType wxvtk $generationdir $installPrefix
112 #EED I don't know why this works here and not after the chmod 755
113 echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
114 if [ $OperatingSystem = "MacOS" ]
116 echo export DYLD_LIBRARY_PATH='$'DYLD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
118 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
119 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
122 echo "===================================================in CreaTools-install.sh ETC_BASHRC : " $ETC_BASHRC
123 echo installPrefixtmp=$installPrefix >> $ETC_BASHRC
124 echo '[ -f "$installPrefixtmp/share/creatools_base_library_config.sh" ] && source $installPrefixtmp/share/creatools_base_library_config.sh' >> $ETC_BASHRC
126 source $installPrefix/share/creatools_base_library_config.sh
127 echo "==================================================="
128 echo " Regenerate Package doc"
129 $installPrefix/bin/bbRegeneratePackageDoc -a -q
130 echo " Regenerate Boxes list"
131 $installPrefix/bin/bbRegenerateBoxesLists -q
132 echo "==================================================="
138 # echo "==================================================="
141 # echo "YOU NEED TO RUN THIS ONE AS root"
142 # echo "==================================================="