6 echo "Run it as 'root':"
8 echo "sh make-install.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType> <GDCM Version>"
9 echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install"
10 echo "with 'GDCM Version' : GDCM1 / GDCM2"
12 echo "ex : sh make-install.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2"
29 echo "sh make-install.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType> <GDCM Version>"
30 echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install"
32 echo "ex : sh make-install.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2"
38 #allow user to choose the generation dir
39 #allow user to choose to generate the doc or not
53 # /// \TODO check if directories exist.
54 # /// \ exit 0 if they don't (message: run install.sh first!")
56 #mkdir $generationdir/creatools_source
57 #mkdir $generationdir/creatools_bin
61 creamaracassource=creaMaracasVisu
62 creaenvironmentsource=creaEnvironment
63 creabrukersource=creaBruker
64 creaimagesource=creaImageIO
65 creacontourssource=creaContours
66 crearigidregistrationssource=creaRigidRegistration
67 bbtkgeditorsource=bbtkGEditor
68 creatoolssource=creaTools
72 # start_point : used at debug time : start point of the script
73 # ex : if everything is OK, but bbtkGEditor,
74 # cvs upate bbtkGEditor manually,and use :
76 # in order not to cvs co everything, nor recompile everything.
80 # --------------------------------
81 # start_point = 1 : remove everything hat was installed before
82 #---------------------------------
83 if [ $start_point -le 1 ]
85 # the following stupid test is used at debug time; Please don't remove!
90 rm -rf creatools_install/lib/creatools
91 rm -rf creatools_install/lib64/creatools
92 rm -rf creatools_install/bin/bb*
93 rm -rf creatools_install/bin/crea*
94 rm -rf creatools_install/include/bb*
95 rm -rf creatools_install/include/crea*
96 rm -rf creatools_install/share/bb*
97 rm -rf creatools_install/share/crea*
99 #this is for the old versions EED
100 rm -rf creatools_install/lib/crea*
101 rm -rf creatools_install/lib/libbb*
102 rm -rf creatools_install/lib/libcrea*
103 rm -rf creatools_install/lib64/crea*
104 rm -rf creatools_install/lib64/libbb*
105 rm -rf creatools_install/lib64/libcrea*
113 # -------------------------
114 # start_point = 2 : CREA
115 #-------------------------
116 if [ $start_point -le 2 ]
119 # the following stupid test is used at debug time; Please don't remove!
123 sh installmod.sh $buildType $creasource $generationdir
127 creadll=$generationdir/creatools_bin/creaBin
128 LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
132 # -------------------------
133 # start_point = 3 : BBTK
134 #-------------------------
135 if [ $start_point -le 3 ]
137 # the following stupid test is used at debug time; Please don't remove!
142 sh installmod.sh $buildType $bbtksource $generationdir
145 bbtkdll=$generationdir/creatools_bin/bbtkBin
146 LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
149 # -------------------------
150 # start_point = 4 : creaMaracasVisu
151 #-------------------------
152 if [ $start_point -le 4 ]
154 # the following stupid test is used at debug time; Please don't remove!
159 sh installmod.sh $buildType $creamaracassource $generationdir
162 creamaracasdll=$generationdir/creatools_bin/creamaracasBin
163 LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
166 # -------------------------
167 # start_point = 5 : creaEnvironment
168 #-------------------------
169 if [ $start_point -le 5 ]
171 # the following stupid test is used at debug time; Please don't remove!
176 sh installmod.sh $buildType $creaenvironmentsource $generationdir
179 creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
180 LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
183 # -------------------------
184 # start_point = 6 : creaBruker
185 #-------------------------
186 if [ $start_point -le 6 ]
188 # the following stupid test is used at debug time; Please don't remove!
193 sh installmod.sh $buildType $creabrukersource $generationdir
197 creabrukerdll=$generationdir/creatools_bin/creabrukerBin
198 LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
201 # -------------------------
202 # start_point = 7 : creaImageIO
203 #-------------------------
204 if [ $start_point -le 7 ]
206 # the following stupid test is used at debug time; Please don't remove!
211 sh installmod.sh $buildType $creaimagesource $generationdir
214 creaimagedll=$generationdir/creatools_bin/creaimageBin
215 LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
218 # -------------------------
219 # start_point = 8 : creaContour
220 #-------------------------
221 if [ $start_point -le 8 ]
223 # the following stupid test is used at debug time; Please don't remove!
228 sh installmod.sh $buildType $creacontourssource $generationdir
231 # creacontourdll=$generationdir/creatools_bin/creacontoursBin
232 # LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
235 # -------------------------
236 # start_point = 9 : creaRigidRegistration
237 #-------------------------
238 if [ $start_point -le 9 ]
240 # the following stupid test is used at debug time; Please don't remove!
244 sh installmod.sh $buildType $crearigidregistrationssource $generationdir
247 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
248 # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
251 # -------------------------
252 # start_point = 10 : bbtkGEditor
253 #-------------------------
254 if [ $start_point -le 10 ]
256 # the following stupid test is used at debug time; Please don't remove!
261 sh installmod.sh $buildType $bbtkgeditorsource $generationdir
264 # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
265 # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
268 # -------------------------
269 # start_point = 11 : creaTools
270 #-------------------------
271 if [ $start_point -le 11 ]
273 # the following stupid test is used at debug time; Please don't remove!
278 sh installmod.sh $buildType $creatoolssource $generationdir
283 # creatoolsdll=$generationdir/creatools_bin/creatoolsBin
284 # LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
287 CREATOOLS_INSTALL_DIR=$installPrefix
288 rm $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
289 touch $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
290 chmod 666 $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
292 #######################################
294 touch $installPrefix/share/creatools_base_library_config.sh
295 chmod 666 $installPrefix/share/creatools_base_library_config.sh
298 echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
299 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
300 echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
303 # - remove line 'sh $installPrefix/creatools_install/share/creatools_base_party_libraries_config.sh' if any (with accurate value for ???)
304 sed -i -e '/.*creatools_base_library_config.*/ d' ~/.bashrc
306 # - add line 'sh $installPrefix/creatools_install/share/creatools_base_libraries_config.sh' (with accurate value for ???)
307 echo source $installPrefix/share/creatools_base_library_config.sh >> ~/.bashrc