6 echo "sh All.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 All.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2"
27 echo "sh All.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 All.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
56 creamaracassource=creaMaracasVisu
57 creaenvironmentsource=creaEnvironment
58 creabrukersource=creaBruker
59 creaimagesource=creaImageIO
60 creacontourssource=creaContours
61 crearigidregistrationssource=creaRigidRegistration
62 bbtkgeditorsource=bbtkGEditor
63 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 : remove everything but source files
78 #---------------------------------
79 if [ $start_point -le 0 ]
81 # the following stupid test is used at debug time; Please don't remove!
86 mkdir $generationdir/creatools_bin
87 rm -rf creatools_source
88 mkdir $generationdir/creatools_source
90 sudo rm -rf creatools_install/lib/creatools
91 sudo rm -rf creatools_install/lib64/creatools
92 sudo rm -rf creatools_install/bin/bb*
93 sudo rm -rf creatools_install/bin/crea*
94 sudo rm -rf creatools_install/include/bb*
95 sudo rm -rf creatools_install/include/crea*
96 sudo rm -rf creatools_install/share/bb*
97 sudo rm -rf creatools_install/share/crea*
99 #this is for the old versions EED
100 sudo rm -rf creatools_install/lib/crea*
101 sudo rm -rf creatools_install/lib/libbb*
102 sudo rm -rf creatools_install/lib/libcrea*
103 sudo rm -rf creatools_install/lib64/crea*
104 sudo rm -rf creatools_install/lib64/libbb*
105 sudo rm -rf creatools_install/lib64/libcrea*
110 # ----------------------------------
111 # start_point = 1 : checkout all
112 #-----------------------------------
113 if [ $start_point -le 1 ]
118 sh $scriptDir/cvscheckout.sh $creasource $generationdir $cvsUserName
119 sh $scriptDir/cvscheckout.sh $bbtksource $generationdir $cvsUserName
120 sh $scriptDir/cvscheckout.sh $creamaracassource $generationdir $cvsUserName
121 sh $scriptDir/cvscheckout.sh $creaenvironmentsource $generationdir $cvsUserName
122 sh $scriptDir/cvscheckout.sh $creabrukersource $generationdir $cvsUserName
123 sh $scriptDir/cvscheckout.sh $creaimagesource $generationdir $cvsUserName
124 sh $scriptDir/cvscheckout.sh $creacontourssource $generationdir $cvsUserName
125 sh $scriptDir/cvscheckout.sh $crearigidregistrationssource $generationdir $cvsUserName
126 sh $scriptDir/cvscheckout.sh $bbtkgeditorsource $generationdir $cvsUserName
127 sh $scriptDir/cvscheckout.sh $creatoolssource $generationdir $cvsUserName
134 # -------------------------
135 # start_point = 2 : CREA
136 #-------------------------
137 if [ $start_point -le 2 ]
140 # the following stupid test is used at debug time; Please don't remove!
144 sh cmakemod.sh $creasource $generationdir $installPrefix $buildType
145 sh creaVariables.sh $creasource $generationdir $docgeneration
146 sh compilemod.sh $buildType $creasource $generationdir
147 sh ctestmod.sh $creasource $generationdir
150 creadll=$generationdir/creatools_bin/creaBin
151 LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
154 # -------------------------
155 # start_point = 3 : BBTK
156 #-------------------------
157 if [ $start_point -le 3 ]
159 # the following stupid test is used at debug time; Please don't remove!
164 sh cmakemod.sh $bbtksource $generationdir $installPrefix $buildType
165 sh bbtkVariables.sh $bbtksource $generationdir $docgeneration $gdcmVersion
166 sh compilemod.sh $buildType $bbtksource $generationdir
167 sh ctestmod.sh $bbtksource $generationdir
170 bbtkdll=$generationdir/creatools_bin/bbtkBin
171 LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
174 # -------------------------
175 # start_point = 4 : creaMaracasVisu
176 #-------------------------
177 if [ $start_point -le 4 ]
179 # the following stupid test is used at debug time; Please don't remove!
184 sh cmakemod.sh $creamaracassource $generationdir $installPrefix $buildType
185 sh creaMaracasVariables.sh $creamaracassource $generationdir $docgeneration
186 sh compilemod.sh $buildType $creamaracassource $generationdir
187 sh ctestmod.sh $creamaracassource $generationdir
190 creamaracasdll=$generationdir/creatools_bin/creamaracasBin
191 LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
194 # -------------------------
195 # start_point = 5 : creaEnvironment
196 #-------------------------
197 if [ $start_point -le 5 ]
199 # the following stupid test is used at debug time; Please don't remove!
204 sh cmakemod.sh $creaenvironmentsource $generationdir $installPrefix $buildType
205 sh creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration
206 sh compilemod.sh $buildType $creaenvironmentsource $generationdir
207 sh ctestmod.sh $creaenvironmentsource $generationdir
210 creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
211 LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
214 # -------------------------
215 # start_point = 6 : creaBruker
216 #-------------------------
217 if [ $start_point -le 6 ]
219 # the following stupid test is used at debug time; Please don't remove!
224 sh cmakemod.sh $creabrukersource $generationdir $installPrefix $buildType
225 sh creaBrukerVariables.sh $creabrukersource $generationdir $docgeneration $gdcmVersion
226 sh compilemod.sh $buildType $creabrukersource $generationdir
227 sh ctestmod.sh $creabrukersource $generationdir
231 creabrukerdll=$generationdir/creatools_bin/creabrukerBin
232 LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
235 # -------------------------
236 # start_point = 7 : creaImageIO
237 #-------------------------
238 if [ $start_point -le 7 ]
240 # the following stupid test is used at debug time; Please don't remove!
245 sh cmakemod.sh $creaimagesource $generationdir $installPrefix $buildType
246 sh creaImageIOVariables.sh $creaimagesource $generationdir $docgeneration $gdcmVersion
247 sh compilemod.sh $buildType $creaimagesource $generationdir
248 sh ctestmod.sh $creaimagesource $generationdir
251 creaimagedll=$generationdir/creatools_bin/creaimageBin
252 LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
255 # -------------------------
256 # start_point = 8 : creaContour
257 #-------------------------
258 if [ $start_point -le 8 ]
260 # the following stupid test is used at debug time; Please don't remove!
265 sh cmakemod.sh $creacontourssource $generationdir $installPrefix $buildType
266 sh creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
267 sh compilemod.sh $buildType $creacontourssource $generationdir
268 sh ctestmod.sh $creacontourssource $generationdir
271 # creacontourdll=$generationdir/creatools_bin/creacontoursBin
272 # LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
275 # -------------------------
276 # start_point = 9 : creaRigidRegistration
277 #-------------------------
278 if [ $start_point -le 9 ]
280 # the following stupid test is used at debug time; Please don't remove!
284 sh cmakemod.sh $crearigidregistrationssource $generationdir $installPrefix $buildType
285 sh creaRigidRegistrationVariables.sh $crearigidregistrationssource $generationdir $docgeneration
286 sh compilemod.sh $buildType $crearigidregistrationssource $generationdir
287 sh ctestmod.sh $crearigidregistrationssource $generationdir
290 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
291 # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
294 # -------------------------
295 # start_point = 10 : bbtkGEditor
296 #-------------------------
297 if [ $start_point -le 10 ]
299 # the following stupid test is used at debug time; Please don't remove!
304 sh cmakemod.sh $bbtkgeditorsource $generationdir $installPrefix $buildType
305 sh bbtkGEditorVariables.sh $bbtkgeditorsource $generationdir $docgeneration
306 sh compilemod.sh $buildType $bbtkgeditorsource $generationdir
307 sh ctestmod.sh $bbtkgeditorsource $generationdir
310 # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
311 # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
314 # -------------------------
315 # start_point = 11 : creaTools
316 #-------------------------
317 if [ $start_point -le 11 ]
319 # the following stupid test is used at debug time; Please don't remove!
324 sh cmakemod.sh $creatoolssource $generationdir $installPrefix $buildType
325 sh creaToolsVariables.sh $creatoolssource $generationdir $docgeneration
326 sh compilemod.sh $buildType $creatoolssource $generationdir
331 # sh ctestmod.sh $creatoolsbinary $generationdir
332 # creatoolsdll=$generationdir/creatools_bin/creatoolsBin
333 # LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
336 CREATOOLS_INSTALL_DIR=$installPrefix
337 sudo rm $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
338 sudo touch $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
339 sudo chmod 666 $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
341 #######################################
343 sudo touch $installPrefix/share/creatools_base_library_config.sh
344 sudo chmod 666 $installPrefix/share/creatools_base_library_config.sh
347 sudo echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
348 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
349 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh