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
66 # --------------------------------
67 # start_point = 0 : remove all
68 #---------------------------------
69 if [ $start_point -le 0 ]
71 # the following stupid test is used at debug time; Please don't remove!
75 sudo rm -rf creatools_bin/creaBin
76 sudo rm -rf creatools_bin/bbtkBin
77 sudo rm -rf creatools_bin/creaMaracasVisuBin
78 sudo rm -rf creatools_bin/creaEnvironmentBin
79 sudo rm -rf creatools_bin/creaBrukerBin
80 sudo rm -rf creatools_bin/creaImageIOBin
81 sudo rm -rf creatools_bin/creaContoursBin
82 sudo rm -rf creatools_bin/creaRigidRegistrationBin
83 sudo rm -rf creatools_bin/bbtkGEditorBin
84 sudo rm -rf creatools_bin/creaToolsBin
86 sudo rm -rf creatools_install/lib/creatools
87 sudo rm -rf creatools_install/lib64/creatools
88 sudo rm -rf creatools_install/bin/bb*
89 sudo rm -rf creatools_install/bin/crea*
90 sudo rm -rf creatools_install/include/bb*
91 sudo rm -rf creatools_install/include/crea*
92 sudo rm -rf creatools_install/share/bb*
93 sudo rm -rf creatools_install/share/crea*
95 #this is for the old versions EED
96 sudo rm -rf creatools_install/lib/crea*
97 sudo rm -rf creatools_install/lib/libbb*
98 sudo rm -rf creatools_install/lib/libcrea*
99 sudo rm -rf creatools_install/lib64/crea*
100 sudo rm -rf creatools_install/lib64/libbb*
101 sudo rm -rf creatools_install/lib64/libcrea*
105 # ----------------------------------
106 # start_point = 1 : checkout all
107 #-----------------------------------
108 if [ $start_point -le 1 ]
113 sh $scriptDir/cvscheckout.sh $creasource $generationdir $cvsUserName
114 sh $scriptDir/cvscheckout.sh $bbtksource $generationdir $cvsUserName
115 sh $scriptDir/cvscheckout.sh $creamaracassource $generationdir $cvsUserName
116 sh $scriptDir/cvscheckout.sh $creaenvironmentsource $generationdir $cvsUserName
117 sh $scriptDir/cvscheckout.sh $creabrukersource $generationdir $cvsUserName
118 sh $scriptDir/cvscheckout.sh $creaimagesource $generationdir $cvsUserName
119 sh $scriptDir/cvscheckout.sh $creacontourssource $generationdir $cvsUserName
120 sh $scriptDir/cvscheckout.sh $crearigidregistrationssource $generationdir $cvsUserName
121 sh $scriptDir/cvscheckout.sh $bbtkgeditorsource $generationdir $cvsUserName
122 sh $scriptDir/cvscheckout.sh $creatoolssource $generationdir $cvsUserName
129 # -------------------------
130 # start_point = 2 : CREA
131 #-------------------------
132 if [ $start_point -le 2 ]
135 # the following stupid test is used at debug time; Please don't remove!
139 sh cmakemod.sh $creasource $generationdir $installPrefix $buildType
140 sh creaVariables.sh $creasource $generationdir $docgeneration
141 sh compilemod.sh $buildType $creasource $generationdir
142 sh ctestmod.sh $creasource $generationdir
145 creadll=$generationdir/creatools_bin/creaBin
146 LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
150 # -------------------------
151 # start_point = 3 : BBTK
152 #-------------------------
153 if [ $start_point -le 3 ]
155 # the following stupid test is used at debug time; Please don't remove!
160 sh cmakemod.sh $bbtksource $generationdir $installPrefix $buildType
161 sh bbtkVariables.sh $bbtksource $generationdir $docgeneration
162 sh compilemod.sh $buildType $bbtksource $generationdir
163 sh ctestmod.sh $bbtksource $generationdir
166 bbtkdll=$generationdir/creatools_bin/bbtkBin
167 LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
170 # -------------------------
171 # start_point = 4 : creaMaracasVisu
172 #-------------------------
173 if [ $start_point -le 4 ]
175 # the following stupid test is used at debug time; Please don't remove!
180 sh cmakemod.sh $creamaracassource $generationdir $installPrefix $buildType
181 sh creaMaracasVariables.sh $creamaracassource $generationdir $docgeneration
182 sh compilemod.sh $buildType $creamaracassource $generationdir
183 sh ctestmod.sh $creamaracassource $generationdir
186 creamaracasdll=$generationdir/creatools_bin/creamaracasBin
187 LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
190 # -------------------------
191 # start_point = 5 : creaEnvironment
192 #-------------------------
193 if [ $start_point -le 5 ]
195 # the following stupid test is used at debug time; Please don't remove!
200 sh cmakemod.sh $creaenvironmentsource $generationdir $installPrefix $buildType
201 sh creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration
202 sh compilemod.sh $buildType $creaenvironmentsource $generationdir
203 sh ctestmod.sh $creaenvironmentsource $generationdir
206 creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
207 LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
210 # -------------------------
211 # start_point = 6 : creaBruker
212 #-------------------------
213 if [ $start_point -le 6 ]
215 # the following stupid test is used at debug time; Please don't remove!
220 sh cmakemod.sh $creabrukersource $generationdir $installPrefix $buildType
221 sh creaBrukerVariables.sh $creabrukersource $generationdir $docgeneration
222 sh compilemod.sh $buildType $creabrukersource $generationdir
224 sh ctestmod.sh $creabrukersource $generationdir
227 creabrukerdll=$generationdir/creatools_bin/creabrukerBin
228 LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
231 # -------------------------
232 # start_point = 7 : creaImageIO
233 #-------------------------
234 if [ $start_point -le 7 ]
236 # the following stupid test is used at debug time; Please don't remove!
241 sh cmakemod.sh $creaimagesource $generationdir $installPrefix $buildType
242 sh creaImageIOVariables.sh $creaimagesource $generationdir $docgeneration
243 sh compilemod.sh $buildType $creaimagesource $generationdir
244 sh ctestmod.sh $creaimagesource $generationdir
247 creaimagedll=$generationdir/creatools_bin/creaimageBin
248 LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
251 # -------------------------
252 # start_point = 8 : creaContour
253 #-------------------------
254 if [ $start_point -le 8 ]
256 # the following stupid test is used at debug time; Please don't remove!
261 sh cmakemod.sh $creacontourssource $generationdir $installPrefix $buildType
262 sh creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
263 sh compilemod.sh $buildType $creacontourssource $generationdir
264 sh ctestmod.sh $creacontourssource $generationdir
267 # creacontourdll=$generationdir/creatools_bin/creacontoursBin
268 # LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
271 # -------------------------
272 # start_point = 9 : creaRigidRegistration
273 #-------------------------
274 if [ $start_point -le 9 ]
276 # the following stupid test is used at debug time; Please don't remove!
280 sh cmakemod.sh $crearigidregistrationssource $generationdir $installPrefix $buildType
281 sh creaRigidRegistrationVariables.sh $crearigidregistrationssource $generationdir $docgeneration
282 sh compilemod.sh $buildType $crearigidregistrationssource $generationdir
283 sh ctestmod.sh $crearigidregistrationssource $generationdir
286 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
287 # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
290 # -------------------------
291 # start_point = 10 : bbtkGEditor
292 #-------------------------
293 if [ $start_point -le 10 ]
295 # the following stupid test is used at debug time; Please don't remove!
300 sh cmakemod.sh $bbtkgeditorsource $generationdir $installPrefix $buildType
301 sh bbtkGEditorVariables.sh $bbtkgeditorsource $generationdir $docgeneration
302 sh compilemod.sh $buildType $bbtkgeditorsource $generationdir
303 sh ctestmod.sh $bbtkgeditorsource $generationdir
306 # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
307 # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
310 # -------------------------
311 # start_point = 11 : creaTools
312 #-------------------------
313 if [ $start_point -le 11 ]
315 # the following stupid test is used at debug time; Please don't remove!
320 sh cmakemod.sh $creatoolssource $generationdir $installPrefix $buildType
321 sh creaToolsVariables.sh $creatoolssource $generationdir $docgeneration
322 sh compilemod.sh $buildType $creatoolssource $generationdir
327 # sh ctestmod.sh $creatoolsbinary $generationdir
328 # creatoolsdll=$generationdir/creatools_bin/creatoolsBin
329 # LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
332 CREATOOLS_INSTALL_DIR=$installPrefix
333 sudo rm $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
334 sudo touch $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
335 sudo chmod 666 $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
337 #######################################
339 sudo touch $installPrefix/share/creatools_base_library_config.sh
340 sudo chmod 666 $installPrefix/share/creatools_base_library_config.sh
343 sudo echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
344 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
345 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
348 # - remove line 'sh $installPrefix/creatools_install/share/creatools_base_party_libraries_config.sh' if any (with accurate value for ???)
349 sed -i -e '/.*creatools_base_library_config.*/ d' ~/.bashrc
351 # - add line 'sh $installPrefix/creatools_install/share/creatools_base_libraries_config.sh' (with accurate value for ???)
352 echo source $installPrefix/share/creatools_base_library_config.sh >> ~/.bashrc