6 echo "sh make.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType> <GDCM Version>"
7 echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install"
8 echo "with 'GDCM Version' : GDCM1 / GDCM2"
10 echo "ex : sh make.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2"
27 echo "sh make.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType> <GDCM Version>"
28 echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install"
30 echo "ex : sh make.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2"
36 #allow user to choose the generation dir
37 #allow user to choose to generate the doc or not
50 mkdir $generationdir/creatools_source
51 mkdir $generationdir/creatools_bin
55 creamaracassource=creaMaracasVisu
56 creaenvironmentsource=creaEnvironment
57 creabrukersource=creaBruker
58 creaimagesource=creaImageIO
59 creacontourssource=creaContours
60 crearigidregistrationssource=creaRigidRegistration
61 bbtkgeditorsource=bbtkGEditor
62 creatoolssource=creaTools
66 # start_point : used at debug time : start point of the script
67 # ex : if everything is OK, but bbtkGEditor,
68 # cvs upate bbtkGEditor manually,and use :
70 # in order not to cvs co everything, nor recompile everything.
76 # ----------------------------------
77 # start_point = 0 : checkout all
78 #-----------------------------------
79 if [ $start_point -le 0 ]
84 sh $scriptDir/cvscheckout.sh $creasource $generationdir $cvsUserName
85 sh $scriptDir/cvscheckout.sh $bbtksource $generationdir $cvsUserName
86 sh $scriptDir/cvscheckout.sh $creamaracassource $generationdir $cvsUserName
87 sh $scriptDir/cvscheckout.sh $creaenvironmentsource $generationdir $cvsUserName
88 sh $scriptDir/cvscheckout.sh $creabrukersource $generationdir $cvsUserName
89 sh $scriptDir/cvscheckout.sh $creaimagesource $generationdir $cvsUserName
90 sh $scriptDir/cvscheckout.sh $creacontourssource $generationdir $cvsUserName
91 sh $scriptDir/cvscheckout.sh $crearigidregistrationssource $generationdir $cvsUserName
92 sh $scriptDir/cvscheckout.sh $bbtkgeditorsource $generationdir $cvsUserName
93 sh $scriptDir/cvscheckout.sh $creatoolssource $generationdir $cvsUserName
97 # --------------------------------
98 # start_point = 1 : remove everything but source files
99 #---------------------------------
100 if [ $start_point -le 1 ]
102 # the following stupid test is used at debug time; Please don't remove!
106 sudo rm -rf creatools_bin
107 mkdir $generationdir/creatools_bin
108 sudo rm -rf creatools_source
109 mkdir $generationdir/creatools_source
111 sudo rm -rf creatools_install/lib/creatools
112 sudo rm -rf creatools_install/lib64/creatools
113 sudo rm -rf creatools_install/bin/bb*
114 sudo rm -rf creatools_install/bin/crea*
115 sudo rm -rf creatools_install/include/bb*
116 sudo rm -rf creatools_install/include/crea*
117 sudo rm -rf creatools_install/share/bb*
118 sudo rm -rf creatools_install/share/crea*
120 #this is for the old versions EED
121 sudo rm -rf creatools_install/lib/crea*
122 sudo rm -rf creatools_install/lib/libbb*
123 sudo rm -rf creatools_install/lib/libcrea*
124 sudo rm -rf creatools_install/lib64/crea*
125 sudo rm -rf creatools_install/lib64/libbb*
126 sudo rm -rf creatools_install/lib64/libcrea*
131 # ----------------------------------
132 # start_point = 1 : checkout all
133 #-----------------------------------
134 if [ $start_point -le 1 ]
139 sh $scriptDir/cvscheckout.sh $creasource $generationdir $cvsUserName
140 sh $scriptDir/cvscheckout.sh $bbtksource $generationdir $cvsUserName
141 sh $scriptDir/cvscheckout.sh $creamaracassource $generationdir $cvsUserName
142 sh $scriptDir/cvscheckout.sh $creaenvironmentsource $generationdir $cvsUserName
143 sh $scriptDir/cvscheckout.sh $creabrukersource $generationdir $cvsUserName
144 sh $scriptDir/cvscheckout.sh $creaimagesource $generationdir $cvsUserName
145 sh $scriptDir/cvscheckout.sh $creacontourssource $generationdir $cvsUserName
146 sh $scriptDir/cvscheckout.sh $crearigidregistrationssource $generationdir $cvsUserName
147 sh $scriptDir/cvscheckout.sh $bbtkgeditorsource $generationdir $cvsUserName
148 sh $scriptDir/cvscheckout.sh $creatoolssource $generationdir $cvsUserName
155 # -------------------------
156 # start_point = 2 : CREA
157 #-------------------------
158 if [ $start_point -le 2 ]
161 # the following stupid test is used at debug time; Please don't remove!
165 sh cmakemod.sh $creasource $generationdir $installPrefix $buildType
166 sh creaVariables.sh $creasource $generationdir $docgeneration
167 sh compilemod.sh $buildType $creasource $generationdir
168 sh ctestmod.sh $creasource $generationdir
171 creadll=$generationdir/creatools_bin/creaBin
172 LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
176 # -------------------------
177 # start_point = 3 : BBTK
178 #-------------------------
179 if [ $start_point -le 3 ]
181 # the following stupid test is used at debug time; Please don't remove!
186 sh cmakemod.sh $bbtksource $generationdir $installPrefix $buildType
187 sh bbtkVariables.sh $bbtksource $generationdir $docgeneration $gdcmVersion
188 sh compilemod.sh $buildType $bbtksource $generationdir
189 sh ctestmod.sh $bbtksource $generationdir
192 bbtkdll=$generationdir/creatools_bin/bbtkBin
193 LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
196 # -------------------------
197 # start_point = 4 : creaMaracasVisu
198 #-------------------------
199 if [ $start_point -le 4 ]
201 # the following stupid test is used at debug time; Please don't remove!
206 sh cmakemod.sh $creamaracassource $generationdir $installPrefix $buildType
207 sh creaMaracasVariables.sh $creamaracassource $generationdir $docgeneration
208 sh compilemod.sh $buildType $creamaracassource $generationdir
209 sh ctestmod.sh $creamaracassource $generationdir
212 creamaracasdll=$generationdir/creatools_bin/creamaracasBin
213 LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
216 # -------------------------
217 # start_point = 5 : creaEnvironment
218 #-------------------------
219 if [ $start_point -le 5 ]
221 # the following stupid test is used at debug time; Please don't remove!
226 sh cmakemod.sh $creaenvironmentsource $generationdir $installPrefix $buildType
227 sh creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration
228 sh compilemod.sh $buildType $creaenvironmentsource $generationdir
229 sh ctestmod.sh $creaenvironmentsource $generationdir
232 creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
233 LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
236 # -------------------------
237 # start_point = 6 : creaBruker
238 #-------------------------
239 if [ $start_point -le 6 ]
241 # the following stupid test is used at debug time; Please don't remove!
246 sh cmakemod.sh $creabrukersource $generationdir $installPrefix $buildType
247 sh creaBrukerVariables.sh $creabrukersource $generationdir $docgeneration $gdcmVersion
248 sh compilemod.sh $buildType $creabrukersource $generationdir
250 sh ctestmod.sh $creabrukersource $generationdir
253 creabrukerdll=$generationdir/creatools_bin/creabrukerBin
254 LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
257 # -------------------------
258 # start_point = 7 : creaImageIO
259 #-------------------------
260 if [ $start_point -le 7 ]
262 # the following stupid test is used at debug time; Please don't remove!
267 sh cmakemod.sh $creaimagesource $generationdir $installPrefix $buildType
268 sh creaImageIOVariables.sh $creaimagesource $generationdir $docgeneration $gdcmVersion
269 sh compilemod.sh $buildType $creaimagesource $generationdir
270 sh ctestmod.sh $creaimagesource $generationdir
273 creaimagedll=$generationdir/creatools_bin/creaimageBin
274 LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
277 # -------------------------
278 # start_point = 8 : creaContour
279 #-------------------------
280 if [ $start_point -le 8 ]
282 # the following stupid test is used at debug time; Please don't remove!
287 sh cmakemod.sh $creacontourssource $generationdir $installPrefix $buildType
288 sh creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
289 sh compilemod.sh $buildType $creacontourssource $generationdir
290 sh ctestmod.sh $creacontourssource $generationdir
293 # creacontourdll=$generationdir/creatools_bin/creacontoursBin
294 # LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
297 # -------------------------
298 # start_point = 9 : creaRigidRegistration
299 #-------------------------
300 if [ $start_point -le 9 ]
302 # the following stupid test is used at debug time; Please don't remove!
306 sh cmakemod.sh $crearigidregistrationssource $generationdir $installPrefix $buildType
307 sh creaRigidRegistrationVariables.sh $crearigidregistrationssource $generationdir $docgeneration
308 sh compilemod.sh $buildType $crearigidregistrationssource $generationdir
309 sh ctestmod.sh $crearigidregistrationssource $generationdir
312 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
313 # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
316 # -------------------------
317 # start_point = 10 : bbtkGEditor
318 #-------------------------
319 if [ $start_point -le 10 ]
321 # the following stupid test is used at debug time; Please don't remove!
326 sh cmakemod.sh $bbtkgeditorsource $generationdir $installPrefix $buildType
327 sh bbtkGEditorVariables.sh $bbtkgeditorsource $generationdir $docgeneration
328 sh compilemod.sh $buildType $bbtkgeditorsource $generationdir
329 sh ctestmod.sh $bbtkgeditorsource $generationdir
332 # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
333 # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
336 # -------------------------
337 # start_point = 11 : creaTools
338 #-------------------------
339 if [ $start_point -le 11 ]
341 # the following stupid test is used at debug time; Please don't remove!
346 sh cmakemod.sh $creatoolssource $generationdir $installPrefix $buildType
347 sh creaToolsVariables.sh $creatoolssource $generationdir $docgeneration
348 sh compilemod.sh $buildType $creatoolssource $generationdir
353 # sh ctestmod.sh $creatoolsbinary $generationdir
354 # creatoolsdll=$generationdir/creatools_bin/creatoolsBin
355 # LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
358 CREATOOLS_INSTALL_DIR=$installPrefix
359 sudo rm $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
360 sudo touch $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
361 sudo chmod 666 $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
363 #######################################
365 sudo touch $installPrefix/share/creatools_base_library_config.sh
366 sudo chmod 666 $installPrefix/share/creatools_base_library_config.sh
369 sudo echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
370 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
371 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
374 # - remove line 'sh $installPrefix/creatools_install/share/creatools_base_party_libraries_config.sh' if any (with accurate value for ???)
375 sed -i -e '/.*creatools_base_library_config.*/ d' ~/.bashrc
377 # - add line 'sh $installPrefix/creatools_install/share/creatools_base_libraries_config.sh' (with accurate value for ???)
378 echo source $installPrefix/share/creatools_base_library_config.sh >> ~/.bashrc