6 echo "sh make-install.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-install.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2"
27 echo "sh make-install.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-install.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 # /// \TODO check if directories exist.
51 # /// \ exit 0 if they don't (message: run install.sh first!")
53 #mkdir $generationdir/creatools_source
54 #mkdir $generationdir/creatools_bin
58 creamaracassource=creaMaracasVisu
59 creaenvironmentsource=creaEnvironment
60 creabrukersource=creaBruker
61 creaimagesource=creaImageIO
62 creacontourssource=creaContours
63 crearigidregistrationssource=creaRigidRegistration
64 bbtkgeditorsource=bbtkGEditor
65 creatoolssource=creaTools
69 # start_point : used at debug time : start point of the script
70 # ex : if everything is OK, but bbtkGEditor,
71 # cvs upate bbtkGEditor manually,and use :
73 # in order not to cvs co everything, nor recompile everything.
83 # -------------------------
84 # start_point = 2 : CREA
85 #-------------------------
86 if [ $start_point -le 2 ]
89 # the following stupid test is used at debug time; Please don't remove!
93 sh compilemod.sh $buildType $creasource $generationdir
97 creadll=$generationdir/creatools_bin/creaBin
98 LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
102 # -------------------------
103 # start_point = 3 : BBTK
104 #-------------------------
105 if [ $start_point -le 3 ]
107 # the following stupid test is used at debug time; Please don't remove!
112 sh compilemod.sh $buildType $bbtksource $generationdir
115 bbtkdll=$generationdir/creatools_bin/bbtkBin
116 LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
119 # -------------------------
120 # start_point = 4 : creaMaracasVisu
121 #-------------------------
122 if [ $start_point -le 4 ]
124 # the following stupid test is used at debug time; Please don't remove!
129 sh compilemod.sh $buildType $creamaracassource $generationdir
132 creamaracasdll=$generationdir/creatools_bin/creamaracasBin
133 LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
136 # -------------------------
137 # start_point = 5 : creaEnvironment
138 #-------------------------
139 if [ $start_point -le 5 ]
141 # the following stupid test is used at debug time; Please don't remove!
146 sh compilemod.sh $buildType $creaenvironmentsource $generationdir
149 creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
150 LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
153 # -------------------------
154 # start_point = 6 : creaBruker
155 #-------------------------
156 if [ $start_point -le 6 ]
158 # the following stupid test is used at debug time; Please don't remove!
163 sh compilemod.sh $buildType $creabrukersource $generationdir
167 creabrukerdll=$generationdir/creatools_bin/creabrukerBin
168 LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
171 # -------------------------
172 # start_point = 7 : creaImageIO
173 #-------------------------
174 if [ $start_point -le 7 ]
176 # the following stupid test is used at debug time; Please don't remove!
181 sh compilemod.sh $buildType $creaimagesource $generationdir
184 creaimagedll=$generationdir/creatools_bin/creaimageBin
185 LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
188 # -------------------------
189 # start_point = 8 : creaContour
190 #-------------------------
191 if [ $start_point -le 8 ]
193 # the following stupid test is used at debug time; Please don't remove!
198 sh compilemod.sh $buildType $creacontourssource $generationdir
201 # creacontourdll=$generationdir/creatools_bin/creacontoursBin
202 # LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
205 # -------------------------
206 # start_point = 9 : creaRigidRegistration
207 #-------------------------
208 if [ $start_point -le 9 ]
210 # the following stupid test is used at debug time; Please don't remove!
214 sh compilemod.sh $buildType $crearigidregistrationssource $generationdir
217 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
218 # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
221 # -------------------------
222 # start_point = 10 : bbtkGEditor
223 #-------------------------
224 if [ $start_point -le 10 ]
226 # the following stupid test is used at debug time; Please don't remove!
231 sh compilemod.sh $buildType $bbtkgeditorsource $generationdir
234 # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
235 # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
238 # -------------------------
239 # start_point = 11 : creaTools
240 #-------------------------
241 if [ $start_point -le 11 ]
243 # the following stupid test is used at debug time; Please don't remove!
248 sh compilemod.sh $buildType $creatoolssource $generationdir
253 # creatoolsdll=$generationdir/creatools_bin/creatoolsBin
254 # LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
257 CREATOOLS_INSTALL_DIR=$installPrefix
258 sudo rm $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
259 sudo touch $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
260 sudo chmod 666 $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
262 #######################################
264 sudo touch $installPrefix/share/creatools_base_library_config.sh
265 sudo chmod 666 $installPrefix/share/creatools_base_library_config.sh
268 sudo echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
269 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
270 sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
273 # - remove line 'sh $installPrefix/creatools_install/share/creatools_base_party_libraries_config.sh' if any (with accurate value for ???)
274 sed -i -e '/.*creatools_base_library_config.*/ d' ~/.bashrc
276 # - add line 'sh $installPrefix/creatools_install/share/creatools_base_libraries_config.sh' (with accurate value for ???)
277 echo source $installPrefix/share/creatools_base_library_config.sh >> ~/.bashrc