]> Creatis software - creaToolsTools.git/blob - Linux/scripts/CreaTools-install.sh
fdd401c01398b0af3fd5b313942a7c71eaa0fccc
[creaToolsTools.git] / Linux / scripts / CreaTools-install.sh
1 # ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image 
4 #                        pour la Santé)
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 #
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.
13 #
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
18 #  liability. 
19 #
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 # ------------------------------------------------------------------------  
23
24
25 #!/bin/bash
26
27 # JPR 2/5/2011
28 #if [ $UID = 0 ] 
29 #then
30   # Set all local variables
31   source $PWD/scripts/CreaTools-configure.sh
32   source $PWD/scripts/CreaTools-names.sh
33  
34   if [ -e $generationdir ]
35   then
36      if [ ! -e $generationdir/creatools_install ]
37      then
38         mkdir -p $generationdir/creatools_install
39      fi
40   else
41    echo
42    echo "..ERROR.."
43    echo "==================================================="
44    echo "REMEMBER !"
45    echo ""
46    echo "You MUST load the Creatools sources before (use 2.2)!"
47    echo "==================================================="
48    echo
49    echo 
50    read a
51    exit 0 
52   fi  
53   
54   cd $scriptDir
55   export baseLibraryCreatoolsDir=$installPrefix/share/creatools
56   mkdir -p $baseLibraryCreatoolsDir
57   cp CreaTools-bashrc.sh $baseLibraryCreatoolsDir/.
58   cp LocalFunctions.sh $baseLibraryCreatoolsDir/.
59
60   #create creatools_base_library_config.sh  at the very begining, so we can write "export xxx_BIN=..." inside installmod.sh. JPRx 3 mars 2011
61   echo '## This file is call from .bashrc' > $baseLibraryCreatoolsDir/creatools_base_library_config.sh
62   bash installmodBash.sh $installPrefix
63
64   # JPR 2/5/2011
65   #  modify /etc/bashrc (we cannot modify .bashrc, since we switched as root)  
66   # - add line 'bash $installPrefix/creatools_install/share/creatools_base_library_config.sh'
67
68   bash installmod.sh $buildType $creasource                   $generationdir  $installPrefix  $corenumber
69   bash installmod.sh $buildType $bbtksource                   $generationdir  $installPrefix  $corenumber
70   bash installmod.sh $buildType $creavtksource                $generationdir  $installPrefix  $corenumber
71   bash installmod.sh $buildType $creamaracassource            $generationdir  $installPrefix  $corenumber
72   bash installmod.sh $buildType $creaenvironmentsource        $generationdir  $installPrefix  $corenumber
73   bash installmod.sh $buildType $creabrukersource             $generationdir  $installPrefix  $corenumber
74   bash installmod.sh $buildType $creaimagesource              $generationdir  $installPrefix  $corenumber
75   bash installmod.sh $buildType $creacontourssource           $generationdir  $installPrefix  $corenumber
76   bash installmod.sh $buildType $crearigidregistrationssource $generationdir  $installPrefix  $corenumber
77   bash installmod.sh $buildType $bbtkgeditorsource            $generationdir  $installPrefix  $corenumber
78   bash installmod.sh $buildType $creatoolssource              $generationdir  $installPrefix  $corenumber
79   bash installmod.sh $buildType $creaminitoolssource          $generationdir  $installPrefix  $corenumber
80   # bash installmod.sh $buildType $libidosource                 $generationdir  $installPrefix 
81
82   #export as well bbPackages_DIR // JPR 25 Mai 2011
83
84   bash installmodNomake.sh $buildType appli              $generationdir  $installPrefix
85   bash installmodNomake.sh $buildType creaMiniToolsBase  $generationdir  $installPrefix
86   bash installmodNomake.sh $buildType demo               $generationdir  $installPrefix
87   bash installmodNomake.sh $buildType gdcmvtk            $generationdir  $installPrefix
88   bash installmodNomake.sh $buildType itk                $generationdir  $installPrefix
89   bash installmodNomake.sh $buildType itkvtk             $generationdir  $installPrefix
90   bash installmodNomake.sh $buildType qt                 $generationdir  $installPrefix
91   bash installmodNomake.sh $buildType std                $generationdir  $installPrefix
92   bash installmodNomake.sh $buildType toolsbbtk          $generationdir  $installPrefix
93   bash installmodNomake.sh $buildType vtk                $generationdir  $installPrefix
94   bash installmodNomake.sh $buildType wx                 $generationdir  $installPrefix
95   bash installmodNomake.sh $buildType wxvtk              $generationdir  $installPrefix
96
97   source CreaTools-bashrc.sh
98   source $ETC_BASHRC 
99
100
101 if [ $OperatingSystem = "MacOS" ]
102 then
103     echo '~/.bashrc' > $generationdir bbEditor.command
104     echo '~/.bashrc' > $generationdir bbi.command
105     echo '~/.bashrc' > $generationdir creaContourApp.command
106     echo '~/.bashrc' > $generationdir creaDevManager.command
107     echo bbEditor >> $generationdir bbi.command
108     echo bbi >> $generationdir bbi.command
109     echo creaContourApp >> $generationdir creaContourApp.command
110     echo creaDevManager >> creaDevManager $generationdir .command
111 fi
112
113
114 ##EED 21/12/2014
115 ##EED echo "==================================================="
116 ##EED echo " Regenerate Package doc"
117 ##EED $installPrefix/bin/bbRegeneratePackageDoc -a -q
118 ##EED echo " Regenerate Boxes list"
119 ##EED $installPrefix/bin/bbRegenerateBoxesLists -q
120 ##EED echo "==================================================="
121
122   # JPR 2/5/2011
123 #else
124 #  echo
125 #  echo "..ERROR.."
126 #  echo "==================================================="
127 #  echo "REMEMBER !"
128 #  echo ""
129 #  echo "YOU NEED TO RUN THIS ONE AS root"
130 #  echo "==================================================="
131 #  echo
132 #  echo
133 #fi 
134