]> Creatis software - creaToolsTools.git/blob - Install/scripts/All.sh
99ae399eec6602e588bef53c09e2ebcd285e877e
[creaToolsTools.git] / Install / scripts / All.sh
1 #!/bin/sh
2
3 if [ $# = 0 ]
4 then
5 echo "Use it as :"
6 echo "sh All.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType>"
7   echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install
8 echo " "
9 echo "ex : sh All.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug"
10 exit 0
11 fi
12
13 echo $#
14 echo "----------"
15 echo $0
16 echo $1
17 echo $2
18 echo $3
19 echo $4
20 echo $5
21 echo "----------"
22
23 if [ $# != 5 ]
24 then 
25 echo "sh All.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType>"
26 echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install
27 echo " "
28 echo "ex : sh All.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug"
29 exit 0
30 fi
31
32 # @echo off
33
34 #allow user to choose the generation dir
35 #allow user to choose to generate the doc or not
36
37 generationdir=$1
38 cvsUserName=$3
39 installPrefix=$4
40 buildType=$5
41
42 scriptDir=$PWD
43 echo scriptDir
44 echo $scriptDir
45
46 mkdir $generationdir
47 mkdir $generationdir/creatools_source
48 mkdir $generationdir/creatools_bin
49
50  creasource=crea
51  bbtksource=bbtk
52  creamaracassource=creaMaracasVisu
53  creaenvironmentsource=creaEnvironment
54  creabrukersource=creaBruker
55  creaimagesource=creaImageIO
56  creacontourssource=creaContours
57  crearigidregistrationssource=creaRigidRegistration
58  bbtkgeditorsource=bbtkGEditor
59  creatoolssource=creaTools
60  
61 cd $generationdir
62
63 # the following stupid test is used at debug time; Please don't remove!
64 #if [ true = false ]
65 if [ true = true ]
66 then
67   sudo rm -rf creatools_bin/creaBin
68   sudo rm -rf creatools_bin/bbtkBin
69   sudo rm -rf creatools_bin/creaMaracasVisuBin
70   sudo rm -rf creatools_bin/creaEnvironmentBin
71   sudo rm -rf creatools_bin/creaBrukerBin
72   sudo rm -rf creatools_bin/creaImageIOBin
73   sudo rm -rf creatools_bin/creaContoursBin
74   sudo rm -rf creatools_bin/creaRigidRegistrationBin
75   sudo rm -rf creatools_bin/bbtkGEditorBin
76   sudo rm -rf creatools_bin/creaToolsBin
77
78   sudo rm -rf creatools_install/lib/creatools
79   sudo rm -rf creatools_install/lib64/creatools
80   sudo rm -rf creatools_install/bin/bb*
81   sudo rm -rf creatools_install/bin/crea*
82   sudo rm -rf creatools_install/include/bb*
83   sudo rm -rf creatools_install/include/crea*
84   sudo rm -rf creatools_install/share/bb*
85   sudo rm -rf creatools_install/share/crea*
86
87 #this is for the old versions EED
88   sudo rm -rf creatools_install/lib/crea*
89   sudo rm -rf creatools_install/lib/libbb*
90   sudo rm -rf creatools_install/lib/libcrea*
91   sudo rm -rf creatools_install/lib64/crea*
92   sudo rm -rf creatools_install/lib64/libbb*
93   sudo rm -rf creatools_install/lib64/libcrea*
94
95 fi
96
97 #if [ true = false ]
98 if [ true = true ]
99 then
100   sh $scriptDir/cvscheckout.sh $creasource                   $generationdir $cvsUserName
101   sh $scriptDir/cvscheckout.sh $bbtksource                   $generationdir $cvsUserName
102   sh $scriptDir/cvscheckout.sh $creamaracassource            $generationdir $cvsUserName
103   sh $scriptDir/cvscheckout.sh $creaenvironmentsource        $generationdir $cvsUserName
104   sh $scriptDir/cvscheckout.sh $creabrukersource             $generationdir $cvsUserName
105   sh $scriptDir/cvscheckout.sh $creaimagesource              $generationdir $cvsUserName
106   sh $scriptDir/cvscheckout.sh $creacontourssource           $generationdir $cvsUserName
107   sh $scriptDir/cvscheckout.sh $crearigidregistrationssource $generationdir $cvsUserName
108   sh $scriptDir/cvscheckout.sh $bbtkgeditorsource            $generationdir $cvsUserName
109   sh $scriptDir/cvscheckout.sh $creatoolssource              $generationdir $cvsUserName
110 fi
111
112 cd $scriptDir
113
114 # CREA
115 # the following stupid test is used at debug time; Please don't remove!
116 #if [ true = false ]
117 if [ true = true ]
118 then
119  sh cmakemod.sh         $creasource $generationdir $installPrefix $buildType 
120  sh creaVariables.sh    $creasource $generationdir $docgeneration
121  sh compilemod.sh       $buildType   $creasource $generationdir  
122  sh ctestmod.sh         $creasource $generationdir
123 fi
124  creadll=$generationdir/creatools_bin/creaBin
125  LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
126  
127  
128
129
130 # the following stupid test is used at debug time; Please don't remove!
131 #if [ true = false ]
132 if [ true = true ]
133 then
134 # BBTK
135  sh cmakemod.sh         $bbtksource $generationdir $installPrefix $buildType 
136  sh bbtkVariables.sh    $bbtksource $generationdir $docgeneration
137  sh compilemod.sh       $buildType $bbtksource $generationdir 
138  sh ctestmod.sh         $bbtksource $generationdir
139 fi
140  bbtkdll=$generationdir/creatools_bin/bbtkBin
141  LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
142
143 # the following stupid test is used at debug time; Please don't remove!
144 #if [ true = false ]
145 if [ true = true ]
146 then
147 # creaMaracasVisu
148  sh cmakemod.sh                 $creamaracassource $generationdir $installPrefix $buildType 
149  sh creaMaracasVariables.sh     $creamaracassource $generationdir $docgeneration
150  sh compilemod.sh               $buildType $creamaracassource $generationdir 
151  sh ctestmod.sh                 $creamaracassource $generationdir
152 fi
153
154  creamaracasdll=$generationdir/creatools_bin/creamaracasBin
155  LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
156
157 # the following stupid test is used at debug time; Please don't remove!
158 #if [ true = false ]
159 if [ true = true ]
160 then
161 # creaEnvironment
162  sh cmakemod.sh                 $creaenvironmentsource $generationdir $installPrefix $buildType 
163  sh creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration
164  sh compilemod.sh $buildType    $creaenvironmentsource $generationdir
165  sh ctestmod.sh                 $creaenvironmentsource $generationdir
166 fi
167  creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
168  LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
169
170 # the following stupid test is used at debug time; Please don't remove!
171 #if [ true = false ]
172 if [ true = true ]
173 then
174 # creaBruker
175  sh cmakemod.sh                 $creabrukersource $generationdir $installPrefix $buildType 
176  sh creaBrukerVariables.sh      $creabrukersource $generationdir $docgeneration
177  sh compilemod.sh $buildType    $creabrukersource  $generationdir
178  echo generationdir 
179  sh ctestmod.sh                 $creabrukersource $generationdir
180 fi
181  creabrukerdll=$generationdir/creatools_bin/creabrukerBin
182  LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
183
184 # the following stupid test is used at debug time; Please don't remove!
185 #if [ true = false ]
186 if [ true = true ]
187 then
188 # creaImageIO
189  sh cmakemod.sh                 $creaimagesource $generationdir $installPrefix $buildType 
190  sh creaImageIOVariables.sh     $creaimagesource $generationdir $docgeneration
191  sh compilemod.sh               $buildType $creaimagesource $generationdir
192  sh ctestmod.sh                 $creaimagesource $generationdir
193 fi
194  creaimagedll=$generationdir/creatools_bin/creaimageBin
195  LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
196
197 # the following stupid test is used at debug time; Please don't remove!
198 #if [ true = false ]
199 if [ true = true ]
200 then
201 # creaContours
202  sh cmakemod.sh                 $creacontourssource $generationdir $installPrefix $buildType 
203  sh creaContoursVariables.sh    $creacontourssource $generationdir $docgeneration
204  sh compilemod.sh               $buildType $creacontourssource $generationdir
205  sh ctestmod.sh                 $creacontourssource $generationdir
206 fi
207 # creacontourdll=$generationdir/creatools_bin/creacontoursBin
208 # LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
209
210 # creaRigidRegistration
211
212 # the following stupid test is used at debug time; Please don't remove!
213 #if [ true = false ]
214 if [ true = true ]
215 then
216  sh cmakemod.sh                         $crearigidregistrationssource $generationdir $installPrefix $buildType 
217  sh creaRigidRegistrationVariables.sh   $crearigidregistrationssource $generationdir $docgeneration
218  sh compilemod.sh                       $buildType $crearigidregistrationssource $generationdir
219  sh ctestmod.sh                         $crearigidregistrationssource $generationdir
220 fi
221 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
222 # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
223
224 # the following stupid test is used at debug time; Please don't remove!
225 #if [ true = false ]
226 if [ true = true ]
227 then
228 # bbtkGEditor
229  sh cmakemod.sh                 $bbtkgeditorsource $generationdir $installPrefix $buildType 
230  sh bbtkGEditorVariables.sh     $bbtkgeditorsource $generationdir $docgeneration
231  sh compilemod.sh               $buildType $bbtkgeditorsource $generationdir
232  sh ctestmod.sh                 $bbtkgeditorsource $generationdir
233 fi
234 # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
235 # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
236
237 # the following stupid test is used at debug time; Please don't remove!
238 #if [ true = false ]
239 if [ true = true ]
240 then
241 # creaTools
242  sh cmakemod.sh                    $creatoolssource $generationdir $installPrefix $buildType 
243  sh creaToolsVariables.sh          $creatoolssource $generationdir $docgeneration
244  sh compilemod.sh                  $buildType $creatoolssource $generationdir
245 fi
246 # sh ctestmod.sh $creatoolsbinary $generationdir
247 #  creatoolsdll=$generationdir/creatools_bin/creatoolsBin
248 #  LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
249
250 # shutdown /s
251 # exit /b