6 echo "sh All.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType>"
7 echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install"
9 echo "ex : sh All.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug"
25 echo "sh All.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType>"
26 echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install"
28 echo "ex : sh All.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug"
34 #allow user to choose the generation dir
35 #allow user to choose to generate the doc or not
47 mkdir $generationdir/creatools_source
48 mkdir $generationdir/creatools_bin
52 creamaracassource=creaMaracasVisu
53 creaenvironmentsource=creaEnvironment
54 creabrukersource=creaBruker
55 creaimagesource=creaImageIO
56 creacontourssource=creaContours
57 crearigidregistrationssource=creaRigidRegistration
58 bbtkgeditorsource=bbtkGEditor
59 creatoolssource=creaTools
63 # start_point : used at debug time : start point of the script
64 # ex : if everything is OK, but bbtkGEditor,
65 # cvs upate bbtkGEditor manually,and use :
67 # in order not to cvs co everything, nor recompile everything.
73 # ----------------------------------
74 # start_point = 0 : checkout all
75 #-----------------------------------
76 if [ $start_point -le 0 ]
81 sh $scriptDir/cvscheckout.sh $creasource $generationdir $cvsUserName
82 sh $scriptDir/cvscheckout.sh $bbtksource $generationdir $cvsUserName
83 sh $scriptDir/cvscheckout.sh $creamaracassource $generationdir $cvsUserName
84 sh $scriptDir/cvscheckout.sh $creaenvironmentsource $generationdir $cvsUserName
85 sh $scriptDir/cvscheckout.sh $creabrukersource $generationdir $cvsUserName
86 sh $scriptDir/cvscheckout.sh $creaimagesource $generationdir $cvsUserName
87 sh $scriptDir/cvscheckout.sh $creacontourssource $generationdir $cvsUserName
88 sh $scriptDir/cvscheckout.sh $crearigidregistrationssource $generationdir $cvsUserName
89 sh $scriptDir/cvscheckout.sh $bbtkgeditorsource $generationdir $cvsUserName
90 sh $scriptDir/cvscheckout.sh $creatoolssource $generationdir $cvsUserName
95 # --------------------------------
96 # start_point = 1 : remove everything but source files
97 #---------------------------------
98 if [ $start_point -le 1 ]
100 # the following stupid test is used at debug time; Please don't remove!
104 sudo rm -rf creatools_bin
105 mkdir $generationdir/creatools_bin
106 sudo rm -rf creatools_source
107 mkdir $generationdir/creatools_source
109 sudo rm -rf creatools_install/lib/creatools
110 sudo rm -rf creatools_install/lib64/creatools
111 sudo rm -rf creatools_install/bin/bb*
112 sudo rm -rf creatools_install/bin/crea*
113 sudo rm -rf creatools_install/include/bb*
114 sudo rm -rf creatools_install/include/crea*
115 sudo rm -rf creatools_install/share/bb*
116 sudo rm -rf creatools_install/share/crea*
118 #this is for the old versions EED
119 sudo rm -rf creatools_install/lib/crea*
120 sudo rm -rf creatools_install/lib/libbb*
121 sudo rm -rf creatools_install/lib/libcrea*
122 sudo rm -rf creatools_install/lib64/crea*
123 sudo rm -rf creatools_install/lib64/libbb*
124 sudo rm -rf creatools_install/lib64/libcrea*
129 # ----------------------------------
130 # start_point = 1 : checkout all
131 #-----------------------------------
132 if [ $start_point -le 1 ]
137 sh $scriptDir/cvscheckout.sh $creasource $generationdir $cvsUserName
138 sh $scriptDir/cvscheckout.sh $bbtksource $generationdir $cvsUserName
139 sh $scriptDir/cvscheckout.sh $creamaracassource $generationdir $cvsUserName
140 sh $scriptDir/cvscheckout.sh $creaenvironmentsource $generationdir $cvsUserName
141 sh $scriptDir/cvscheckout.sh $creabrukersource $generationdir $cvsUserName
142 sh $scriptDir/cvscheckout.sh $creaimagesource $generationdir $cvsUserName
143 sh $scriptDir/cvscheckout.sh $creacontourssource $generationdir $cvsUserName
144 sh $scriptDir/cvscheckout.sh $crearigidregistrationssource $generationdir $cvsUserName
145 sh $scriptDir/cvscheckout.sh $bbtkgeditorsource $generationdir $cvsUserName
146 sh $scriptDir/cvscheckout.sh $creatoolssource $generationdir $cvsUserName
153 # -------------------------
154 # start_point = 2 : CREA
155 #-------------------------
156 if [ $start_point -le 2 ]
159 # the following stupid test is used at debug time; Please don't remove!
163 sh cmakemod.sh $creasource $generationdir $installPrefix $buildType
164 sh creaVariables.sh $creasource $generationdir $docgeneration
165 sh compilemod.sh $buildType $creasource $generationdir
166 sh ctestmod.sh $creasource $generationdir
169 creadll=$generationdir/creatools_bin/creaBin
170 LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
174 # -------------------------
175 # start_point = 3 : BBTK
176 #-------------------------
177 if [ $start_point -le 3 ]
179 # the following stupid test is used at debug time; Please don't remove!
184 sh cmakemod.sh $bbtksource $generationdir $installPrefix $buildType
185 sh bbtkVariables.sh $bbtksource $generationdir $docgeneration
186 sh compilemod.sh $buildType $bbtksource $generationdir
187 sh ctestmod.sh $bbtksource $generationdir
190 bbtkdll=$generationdir/creatools_bin/bbtkBin
191 LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
194 # -------------------------
195 # start_point = 4 : creaMaracasVisu
196 #-------------------------
197 if [ $start_point -le 4 ]
199 # the following stupid test is used at debug time; Please don't remove!
204 sh cmakemod.sh $creamaracassource $generationdir $installPrefix $buildType
205 sh creaMaracasVariables.sh $creamaracassource $generationdir $docgeneration
206 sh compilemod.sh $buildType $creamaracassource $generationdir
207 sh ctestmod.sh $creamaracassource $generationdir
210 creamaracasdll=$generationdir/creatools_bin/creamaracasBin
211 LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
214 # -------------------------
215 # start_point = 5 : creaEnvironment
216 #-------------------------
217 if [ $start_point -le 5 ]
219 # the following stupid test is used at debug time; Please don't remove!
224 sh cmakemod.sh $creaenvironmentsource $generationdir $installPrefix $buildType
225 sh creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration
226 sh compilemod.sh $buildType $creaenvironmentsource $generationdir
227 sh ctestmod.sh $creaenvironmentsource $generationdir
230 creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
231 LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
234 # -------------------------
235 # start_point = 6 : creaBruker
236 #-------------------------
237 if [ $start_point -le 6 ]
239 # the following stupid test is used at debug time; Please don't remove!
244 sh cmakemod.sh $creabrukersource $generationdir $installPrefix $buildType
245 sh creaBrukerVariables.sh $creabrukersource $generationdir $docgeneration
246 sh compilemod.sh $buildType $creabrukersource $generationdir
248 sh ctestmod.sh $creabrukersource $generationdir
251 creabrukerdll=$generationdir/creatools_bin/creabrukerBin
252 LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
255 # -------------------------
256 # start_point = 7 : creaImageIO
257 #-------------------------
258 if [ $start_point -le 7 ]
260 # the following stupid test is used at debug time; Please don't remove!
265 sh cmakemod.sh $creaimagesource $generationdir $installPrefix $buildType
266 sh creaImageIOVariables.sh $creaimagesource $generationdir $docgeneration
267 sh compilemod.sh $buildType $creaimagesource $generationdir
268 sh ctestmod.sh $creaimagesource $generationdir
271 creaimagedll=$generationdir/creatools_bin/creaimageBin
272 LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
275 # -------------------------
276 # start_point = 8 : creaContour
277 #-------------------------
278 if [ $start_point -le 8 ]
280 # the following stupid test is used at debug time; Please don't remove!
285 sh cmakemod.sh $creacontourssource $generationdir $installPrefix $buildType
286 sh creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
287 sh compilemod.sh $buildType $creacontourssource $generationdir
288 sh ctestmod.sh $creacontourssource $generationdir
291 # creacontourdll=$generationdir/creatools_bin/creacontoursBin
292 # LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
295 # -------------------------
296 # start_point = 9 : creaRigidRegistration
297 #-------------------------
298 if [ $start_point -le 9 ]
300 # the following stupid test is used at debug time; Please don't remove!
304 sh cmakemod.sh $crearigidregistrationssource $generationdir $installPrefix $buildType
305 sh creaRigidRegistrationVariables.sh $crearigidregistrationssource $generationdir $docgeneration
306 sh compilemod.sh $buildType $crearigidregistrationssource $generationdir
307 sh ctestmod.sh $crearigidregistrationssource $generationdir
310 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
311 # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
314 # -------------------------
315 # start_point = 10 : bbtkGEditor
316 #-------------------------
317 if [ $start_point -le 10 ]
319 # the following stupid test is used at debug time; Please don't remove!
324 sh cmakemod.sh $bbtkgeditorsource $generationdir $installPrefix $buildType
325 sh bbtkGEditorVariables.sh $bbtkgeditorsource $generationdir $docgeneration
326 sh compilemod.sh $buildType $bbtkgeditorsource $generationdir
327 sh ctestmod.sh $bbtkgeditorsource $generationdir
330 # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
331 # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
334 # -------------------------
335 # start_point = 11 : creaTools
336 #-------------------------
337 if [ $start_point -le 11 ]
339 # the following stupid test is used at debug time; Please don't remove!
344 sh cmakemod.sh $creatoolssource $generationdir $installPrefix $buildType
345 sh creaToolsVariables.sh $creatoolssource $generationdir $docgeneration
346 sh compilemod.sh $buildType $creatoolssource $generationdir
351 # sh ctestmod.sh $creatoolsbinary $generationdir
352 # creatoolsdll=$generationdir/creatools_bin/creatoolsBin
353 # LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
356 CREATOOLS_INSTALL_DIR=$installPrefix
357 sudo rm $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
358 sudo touch $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
359 sudo chmod 666 $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
361 #######################################
363 sudo touch $installPrefix/share/creatools_base_library_config.sh
364 sudo chmod 666 $installPrefix/share/creatools_base_library_config.sh
367 sudo echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
368 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
369 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
372 # - remove line 'sh $installPrefix/creatools_install/share/creatools_base_party_libraries_config.sh' if any (with accurate value for ???)
373 sed -i -e '/.*creatools_base_library_config.*/ d' ~/.bashrc
375 # - add line 'sh $installPrefix/creatools_install/share/creatools_base_libraries_config.sh' (with accurate value for ???)
376 echo source $installPrefix/share/creatools_base_library_config.sh >> ~/.bashrc