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
51 mkdir $generationdir/creatools_source
52 mkdir $generationdir/creatools_bin
56 creamaracassource=creaMaracasVisu
57 creaenvironmentsource=creaEnvironment
58 creabrukersource=creaBruker
59 creaimagesource=creaImageIO
60 creacontourssource=creaContours
61 crearigidregistrationssource=creaRigidRegistration
62 bbtkgeditorsource=bbtkGEditor
63 creatoolssource=creaTools
67 # start_point : used at debug time : start point of the script
68 # ex : if everything is OK, but bbtkGEditor,
69 # cvs upate bbtkGEditor manually,and use :
71 # in order not to cvs co everything, nor recompile everything.
75 # --------------------------------
76 # start_point = 0 : remove everything
77 #---------------------------------
78 if [ $start_point -le 0 ]
80 # the following stupid test is used at debug time; Please don't remove!
85 mkdir $generationdir/creatools_bin
86 rm -rf creatools_source
87 mkdir $generationdir/creatools_source
91 # ----------------------------------
92 # start_point = 1 : checkout all
93 #-----------------------------------
94 if [ $start_point -le 1 ]
99 sh $scriptDir/cvscheckout.sh $creasource $generationdir $cvsUserName
100 sh $scriptDir/cvscheckout.sh $bbtksource $generationdir $cvsUserName
101 sh $scriptDir/cvscheckout.sh $creamaracassource $generationdir $cvsUserName
102 sh $scriptDir/cvscheckout.sh $creaenvironmentsource $generationdir $cvsUserName
103 sh $scriptDir/cvscheckout.sh $creabrukersource $generationdir $cvsUserName
104 sh $scriptDir/cvscheckout.sh $creaimagesource $generationdir $cvsUserName
105 sh $scriptDir/cvscheckout.sh $creacontourssource $generationdir $cvsUserName
106 sh $scriptDir/cvscheckout.sh $crearigidregistrationssource $generationdir $cvsUserName
107 sh $scriptDir/cvscheckout.sh $bbtkgeditorsource $generationdir $cvsUserName
108 sh $scriptDir/cvscheckout.sh $creatoolssource $generationdir $cvsUserName
117 # -------------------------
118 # start_point = 2 : CREA
119 #-------------------------
120 if [ $start_point -le 2 ]
123 # the following stupid test is used at debug time; Please don't remove!
127 sh cmakemod.sh $creasource $generationdir $installPrefix $buildType
128 sh creaVariables.sh $creasource $generationdir $docgeneration
129 sh compilemod.sh $buildType $creasource $generationdir
130 sh ctestmod.sh $creasource $generationdir
133 creadll=$generationdir/creatools_bin/creaBin
134 LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
138 # -------------------------
139 # start_point = 3 : BBTK
140 #-------------------------
141 if [ $start_point -le 3 ]
143 # the following stupid test is used at debug time; Please don't remove!
148 sh cmakemod.sh $bbtksource $generationdir $installPrefix $buildType
149 sh bbtkVariables.sh $bbtksource $generationdir $docgeneration $gdcmVersion
150 sh compilemod.sh $buildType $bbtksource $generationdir
151 sh ctestmod.sh $bbtksource $generationdir
154 bbtkdll=$generationdir/creatools_bin/bbtkBin
155 LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
159 # -------------------------
160 # start_point = 4 : creaMaracasVisu
161 #-------------------------
162 if [ $start_point -le 4 ]
164 # the following stupid test is used at debug time; Please don't remove!
169 sh cmakemod.sh $creamaracassource $generationdir $installPrefix $buildType
170 sh creaMaracasVariables.sh $creamaracassource $generationdir $docgeneration
171 sh compilemod.sh $buildType $creamaracassource $generationdir
172 sh ctestmod.sh $creamaracassource $generationdir
175 creamaracasdll=$generationdir/creatools_bin/creamaracasBin
176 LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
179 # -------------------------
180 # start_point = 5 : creaEnvironment
181 #-------------------------
182 if [ $start_point -le 5 ]
184 # the following stupid test is used at debug time; Please don't remove!
189 sh cmakemod.sh $creaenvironmentsource $generationdir $installPrefix $buildType
190 sh creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration
191 sh compilemod.sh $buildType $creaenvironmentsource $generationdir
192 sh ctestmod.sh $creaenvironmentsource $generationdir
195 creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
196 LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
199 # -------------------------
200 # start_point = 6 : creaBruker
201 #-------------------------
202 if [ $start_point -le 6 ]
204 # the following stupid test is used at debug time; Please don't remove!
209 sh cmakemod.sh $creabrukersource $generationdir $installPrefix $buildType
210 sh creaBrukerVariables.sh $creabrukersource $generationdir $docgeneration $gdcmVersion
211 sh compilemod.sh $buildType $creabrukersource $generationdir
213 sh ctestmod.sh $creabrukersource $generationdir
216 creabrukerdll=$generationdir/creatools_bin/creabrukerBin
217 LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
220 # -------------------------
221 # start_point = 7 : creaImageIO
222 #-------------------------
223 if [ $start_point -le 7 ]
225 # the following stupid test is used at debug time; Please don't remove!
230 sh cmakemod.sh $creaimagesource $generationdir $installPrefix $buildType
231 sh creaImageIOVariables.sh $creaimagesource $generationdir $docgeneration $gdcmVersion
232 sh compilemod.sh $buildType $creaimagesource $generationdir
233 sh ctestmod.sh $creaimagesource $generationdir
236 creaimagedll=$generationdir/creatools_bin/creaimageBin
237 LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
240 # -------------------------
241 # start_point = 8 : creaContour
242 #-------------------------
243 if [ $start_point -le 8 ]
245 # the following stupid test is used at debug time; Please don't remove!
250 sh cmakemod.sh $creacontourssource $generationdir $installPrefix $buildType
251 sh creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
252 sh compilemod.sh $buildType $creacontourssource $generationdir
253 sh ctestmod.sh $creacontourssource $generationdir
256 # creacontourdll=$generationdir/creatools_bin/creacontoursBin
257 # LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
260 # -------------------------
261 # start_point = 9 : creaRigidRegistration
262 #-------------------------
263 if [ $start_point -le 9 ]
265 # the following stupid test is used at debug time; Please don't remove!
269 sh cmakemod.sh $crearigidregistrationssource $generationdir $installPrefix $buildType
270 sh creaRigidRegistrationVariables.sh $crearigidregistrationssource $generationdir $docgeneration
271 sh compilemod.sh $buildType $crearigidregistrationssource $generationdir
272 sh ctestmod.sh $crearigidregistrationssource $generationdir
275 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
276 # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
279 # -------------------------
280 # start_point = 10 : bbtkGEditor
281 #-------------------------
282 if [ $start_point -le 10 ]
284 # the following stupid test is used at debug time; Please don't remove!
289 sh cmakemod.sh $bbtkgeditorsource $generationdir $installPrefix $buildType
290 sh bbtkGEditorVariables.sh $bbtkgeditorsource $generationdir $docgeneration
291 sh compilemod.sh $buildType $bbtkgeditorsource $generationdir
292 sh ctestmod.sh $bbtkgeditorsource $generationdir
295 # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
296 # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
299 # -------------------------
300 # start_point = 11 : creaTools
301 #-------------------------
302 if [ $start_point -le 11 ]
304 # the following stupid test is used at debug time; Please don't remove!
309 sh cmakemod.sh $creatoolssource $generationdir $installPrefix $buildType
310 sh creaToolsVariables.sh $creatoolssource $generationdir $docgeneration
311 sh compilemod.sh $buildType $creatoolssource $generationdir
316 # sh ctestmod.sh $creatoolsbinary $generationdir
317 # creatoolsdll=$generationdir/creatools_bin/creatoolsBin
318 # LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
321 CREATOOLS_INSTALL_DIR=$installPrefix
322 sudo rm $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
323 sudo touch $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
324 sudo chmod 666 $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
326 #######################################
328 sudo touch $installPrefix/share/creatools_base_library_config.sh
329 sudo chmod 666 $installPrefix/share/creatools_base_library_config.sh
332 sudo echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
333 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
334 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
337 # - remove line 'sh $installPrefix/creatools_install/share/creatools_base_party_libraries_config.sh' if any (with accurate value for ???)
338 sed -i -e '/.*creatools_base_library_config.*/ d' ~/.bashrc
340 # - add line 'sh $installPrefix/creatools_install/share/creatools_base_libraries_config.sh' (with accurate value for ???)
341 echo [ -f "$installPrefix/share/creatools_base_library_config.sh" ] && source $installPrefix/share/creatools_base_library_config.sh >> ~/.bashrc