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