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
158 # -------------------------
159 # start_point = 4 : creaMaracasVisu
160 #-------------------------
161 if [ $start_point -le 4 ]
163 # the following stupid test is used at debug time; Please don't remove!
168 sh cmakemod.sh $creamaracassource $generationdir $installPrefix $buildType
169 sh creaMaracasVariables.sh $creamaracassource $generationdir $docgeneration
170 sh compilemod.sh $buildType $creamaracassource $generationdir
171 sh ctestmod.sh $creamaracassource $generationdir
174 creamaracasdll=$generationdir/creatools_bin/creamaracasBin
175 LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
178 # -------------------------
179 # start_point = 5 : creaEnvironment
180 #-------------------------
181 if [ $start_point -le 5 ]
183 # the following stupid test is used at debug time; Please don't remove!
188 sh cmakemod.sh $creaenvironmentsource $generationdir $installPrefix $buildType
189 sh creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration
190 sh compilemod.sh $buildType $creaenvironmentsource $generationdir
191 sh ctestmod.sh $creaenvironmentsource $generationdir
194 creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
195 LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
198 # -------------------------
199 # start_point = 6 : creaBruker
200 #-------------------------
201 if [ $start_point -le 6 ]
203 # the following stupid test is used at debug time; Please don't remove!
208 sh cmakemod.sh $creabrukersource $generationdir $installPrefix $buildType
209 sh creaBrukerVariables.sh $creabrukersource $generationdir $docgeneration $gdcmVersion
210 sh compilemod.sh $buildType $creabrukersource $generationdir
212 sh ctestmod.sh $creabrukersource $generationdir
215 creabrukerdll=$generationdir/creatools_bin/creabrukerBin
216 LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
219 # -------------------------
220 # start_point = 7 : creaImageIO
221 #-------------------------
222 if [ $start_point -le 7 ]
224 # the following stupid test is used at debug time; Please don't remove!
229 sh cmakemod.sh $creaimagesource $generationdir $installPrefix $buildType
230 sh creaImageIOVariables.sh $creaimagesource $generationdir $docgeneration $gdcmVersion
231 sh compilemod.sh $buildType $creaimagesource $generationdir
232 sh ctestmod.sh $creaimagesource $generationdir
235 creaimagedll=$generationdir/creatools_bin/creaimageBin
236 LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
239 # -------------------------
240 # start_point = 8 : creaContour
241 #-------------------------
242 if [ $start_point -le 8 ]
244 # the following stupid test is used at debug time; Please don't remove!
249 sh cmakemod.sh $creacontourssource $generationdir $installPrefix $buildType
250 sh creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
251 sh compilemod.sh $buildType $creacontourssource $generationdir
252 sh ctestmod.sh $creacontourssource $generationdir
255 # creacontourdll=$generationdir/creatools_bin/creacontoursBin
256 # LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
259 # -------------------------
260 # start_point = 9 : creaRigidRegistration
261 #-------------------------
262 if [ $start_point -le 9 ]
264 # the following stupid test is used at debug time; Please don't remove!
268 sh cmakemod.sh $crearigidregistrationssource $generationdir $installPrefix $buildType
269 sh creaRigidRegistrationVariables.sh $crearigidregistrationssource $generationdir $docgeneration
270 sh compilemod.sh $buildType $crearigidregistrationssource $generationdir
271 sh ctestmod.sh $crearigidregistrationssource $generationdir
274 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
275 # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
278 # -------------------------
279 # start_point = 10 : bbtkGEditor
280 #-------------------------
281 if [ $start_point -le 10 ]
283 # the following stupid test is used at debug time; Please don't remove!
288 sh cmakemod.sh $bbtkgeditorsource $generationdir $installPrefix $buildType
289 sh bbtkGEditorVariables.sh $bbtkgeditorsource $generationdir $docgeneration
290 sh compilemod.sh $buildType $bbtkgeditorsource $generationdir
291 sh ctestmod.sh $bbtkgeditorsource $generationdir
294 # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
295 # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
298 # -------------------------
299 # start_point = 11 : creaTools
300 #-------------------------
301 if [ $start_point -le 11 ]
303 # the following stupid test is used at debug time; Please don't remove!
308 sh cmakemod.sh $creatoolssource $generationdir $installPrefix $buildType
309 sh creaToolsVariables.sh $creatoolssource $generationdir $docgeneration
310 sh compilemod.sh $buildType $creatoolssource $generationdir
315 # sh ctestmod.sh $creatoolsbinary $generationdir
316 # creatoolsdll=$generationdir/creatools_bin/creatoolsBin
317 # LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
320 CREATOOLS_INSTALL_DIR=$installPrefix
321 sudo rm $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
322 sudo touch $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
323 sudo chmod 666 $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
325 #######################################
327 sudo touch $installPrefix/share/creatools_base_library_config.sh
328 sudo chmod 666 $installPrefix/share/creatools_base_library_config.sh
331 sudo echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
332 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
333 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
336 # - remove line 'sh $installPrefix/creatools_install/share/creatools_base_party_libraries_config.sh' if any (with accurate value for ???)
337 sed -i -e '/.*creatools_base_library_config.*/ d' ~/.bashrc
339 # - add line 'sh $installPrefix/creatools_install/share/creatools_base_libraries_config.sh' (with accurate value for ???)
340 echo [ -f "$installPrefix/share/creatools_base_library_config.sh" ] && source $installPrefix/share/creatools_base_library_config.sh >> ~/.bashrc