]> Creatis software - creaToolsTools.git/blob - Linux/scripts/CreaTools-compile.sh
New (new) way to install, all-in-one
[creaToolsTools.git] / Linux / scripts / CreaTools-compile.sh
1 #!/bin/sh
2
3 # Set all local variables
4
5
6 source $PWD/scripts/CreaTools-configure.sh
7 source $PWD/scripts/CreaTools-names.sh
8
9 echo "------"
10 echo $PWD/scripts/CreaTools-configure.sh
11 echo --generationdir--
12 echo $generationdir
13 echo --docgeneration--
14 echo $docgeneration
15 echo --installPrefix--
16 echo $installPrefix
17 echo --buildType--
18 echo $buildType
19 echo --gdcmVersion--
20 echo $gdcmVersion
21 echo --sourcesFrom--
22 echo $sourcesFrom
23 echo --scriptDir--
24 echo $scriptDir
25 echo --start_point--
26 echo $start_point
27 echo "------"
28
29
30
31
32
33
34
35 # Remove! JPRx
36 # start_point=2
37
38
39
40
41
42
43
44 mkdir $generationdir
45 mkdir $generationdir/creatools_source
46 mkdir $generationdir/creatools_bin
47  
48 cd $generationdir
49
50
51 # --------------------------------
52 #         start_point = 0 : remove everything that was created before
53 #---------------------------------
54 if [ $start_point -le 0 ]
55 then
56 # the following stupid test is used at debug time; Please don't remove!
57 #if [ true = false ]
58 if [ true = true ]
59 then
60   rm -rf creatools_bin
61   mkdir $generationdir/creatools_bin
62   rm -rf creatools_source
63   mkdir $generationdir/creatools_source
64 fi
65 fi
66
67 # ----------------------------------
68 #         start_point =  1 : Load all sources
69 #-----------------------------------
70
71
72 if [ $start_point -le 1 ]
73 then
74    if [ true = true ]
75    #if [ true = false ]
76    then
77 #
78       if [ $sourcesFrom = CVS ]
79       then
80          sh $scriptDir/cvscheckout.sh $creasource                   $generationdir $cvsUserName
81          sh $scriptDir/cvscheckout.sh $bbtksource                   $generationdir $cvsUserName
82          sh $scriptDir/cvscheckout.sh $creamaracassource            $generationdir $cvsUserName
83          sh $scriptDir/cvscheckout.sh $creaenvironmentsource        $generationdir $cvsUserName
84          sh $scriptDir/cvscheckout.sh $creabrukersource             $generationdir $cvsUserName
85          sh $scriptDir/cvscheckout.sh $creaimagesource              $generationdir $cvsUserName
86          sh $scriptDir/cvscheckout.sh $creacontourssource           $generationdir $cvsUserName
87          sh $scriptDir/cvscheckout.sh $crearigidregistrationssource $generationdir $cvsUserName
88          sh $scriptDir/cvscheckout.sh $bbtkgeditorsource            $generationdir $cvsUserName
89          sh $scriptDir/cvscheckout.sh $creatoolssource              $generationdir $cvsUserName
90       fi
91
92       if [ $sourcesFrom = HTML ]
93       then
94          cd $generationdir/creatools_source
95          wwwtargz=http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/nightly/
96
97          wget $wwwtargz/crea.tgz
98          wget $wwwtargz/bbtk.tgz
99          wget $wwwtargz/creaMaracasVisu.tgz
100          wget $wwwtargz/creaEnvironment.tgz
101          wget $wwwtargz/creaBruker.tgz
102          wget $wwwtargz/creaImageIO.tgz
103          wget $wwwtargz/creaContours.tgz
104          wget $wwwtargz/creaRigidRegistration.tgz
105          wget $wwwtargz/bbtkGEditor.tgz
106          wget $wwwtargz/creaTools.tgz
107                          
108          tar xvzf crea.tgz
109          tar xvzf bbtk.tgz
110          tar xvzf creaMaracasVisu.tgz
111          tar xvzf creaEnvironment.tgz            
112          tar xvzf creaBruker.tgz
113          tar xvzf creaImageIO.tgz
114          tar xvzf creaContours.tgz
115          tar xvzf creaRigidRegistration.tgz
116          tar xvzf bbtkGEditor.tgz
117          tar xvzf creaTools.tgz
118
119          rm -f *.tgz
120       fi
121    fi
122 fi
123
124 cd $scriptDir
125
126 # -------------------------
127 #        start_point =  2 : CREA
128 #-------------------------
129 if [ $start_point -le 2 ]
130 then
131 # CREA
132 # the following stupid test is used at debug time; Please don't remove!
133 #if [ true = false ]
134 if [ true = true ]
135 then
136  sh $scriptDir/cmakemod.sh                  $creasource $generationdir $installPrefix $buildType 
137  sh $scriptDir/creaVariables.sh             $creasource $generationdir $docgeneration
138  sh $scriptDir/compilemod.sh     $buildType $creasource $generationdir
139  sh $scriptDir/ctestmod.sh                  $creasource $generationdir
140 fi
141 fi
142  creadll=$generationdir/creatools_bin/creaBin
143  LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
144
145
146 # -------------------------
147 #        start_point =  3 : BBTK
148 #-------------------------
149 if [ $start_point -le 3 ]
150 then
151 # the following stupid test is used at debug time; Please don't remove!
152 #if [ true = false ]
153 if [ true = true ]
154 then
155 # BBTK
156  sh $scriptDir/cmakemod.sh       $bbtksource $generationdir $installPrefix $buildType
157  sh $scriptDir/bbtkVariables.sh  $bbtksource $generationdir $docgeneration $gdcmVersion
158  sh $scriptDir/compilemod.sh     $buildType  $bbtksource $generationdir
159  sh $scriptDir/ctestmod.sh       $bbtksource $generationdir
160 fi
161 fi
162  bbtkdll=$generationdir/creatools_bin/bbtkBin
163  LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
164
165
166 # -------------------------
167 #        start_point =  4 : creaMaracasVisu
168 #-------------------------
169 if [ $start_point -le 4 ]
170 then
171 # the following stupid test is used at debug time; Please don't remove!
172 #if [ true = false ]
173 if [ true = true ]
174 then
175 # creaMaracasVisu
176  sh $scriptDir/cmakemod.sh                $creamaracassource $generationdir $installPrefix $buildType 
177  sh $scriptDir/creaMaracasVariables.sh    $creamaracassource $generationdir $docgeneration
178  sh $scriptDir/compilemod.sh              $buildType $creamaracassource $generationdir
179  sh $scriptDir/ctestmod.sh                $creamaracassource $generationdir
180 fi
181 fi
182  creamaracasdll=$generationdir/creatools_bin/creamaracasBin
183  LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
184
185
186 # -------------------------
187 #        start_point =  5 : creaEnvironment
188 #-------------------------
189 if [ $start_point -le 5 ]
190 then
191 # the following stupid test is used at debug time; Please don't remove!
192 #if [ true = false ]
193 if [ true = true ]
194 then
195 # creaEnvironment
196  sh $scriptDir/cmakemod.sh                 $creaenvironmentsource $generationdir $installPrefix $buildType 
197  sh $scriptDir/creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration
198  sh $scriptDir/compilemod.sh $buildType    $creaenvironmentsource $generationdir
199  sh $scriptDir/ctestmod.sh                 $creaenvironmentsource $generationdir
200 fi
201 fi
202  creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
203  LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
204
205
206 # -------------------------
207 #        start_point =  6 : creaBruker
208 #-------------------------
209 if [ $start_point -le 6 ]
210 then
211 # the following stupid test is used at debug time; Please don't remove!
212 #if [ true = false ]
213 if [ true = true ]
214 then
215 # creaBruker
216  sh $scriptDir/cmakemod.sh              $creabrukersource $generationdir $installPrefix $buildType 
217  sh $scriptDir/creaBrukerVariables.sh   $creabrukersource $generationdir $docgeneration $gdcmVersion
218  sh $scriptDir/compilemod.sh $buildType $creabrukersource $generationdir
219  sh $scriptDir/ctestmod.sh              $creabrukersource $generationdir
220 fi
221 fi
222  creabrukerdll=$generationdir/creatools_bin/creabrukerBin
223  LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
224
225
226 # -------------------------
227 #        start_point =  7 : creaImageIO
228 #-------------------------
229 if [ $start_point -le 7 ]
230 then
231  # the following stupid test is used at debug time; Please don't remove!
232 #if [ true = false ]
233 if [ true = true ]
234 then
235 # creaImageIO
236  sh $scriptDir/cmakemod.sh              $creaimagesource $generationdir $installPrefix $buildType 
237  sh $scriptDir/creaImageIOVariables.sh  $creaimagesource $generationdir $docgeneration $gdcmVersion
238  sh $scriptDir/compilemod.sh $buildType $creaimagesource $generationdir
239  sh $scriptDir/ctestmod.sh              $creaimagesource $generationdir
240 fi
241 fi
242  creaimagedll=$generationdir/creatools_bin/creaimageBin
243  LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
244
245
246 # -------------------------
247 #        start_point =  8 : creaContour
248 #-------------------------
249 if [ $start_point -le 8 ]
250 then
251 # the following stupid test is used at debug time; Please don't remove!
252 #if [ true = false ]
253 if [ true = true ]
254 then
255 # creaContours
256  sh $scriptDir/cmakemod.sh              $creacontourssource $generationdir $installPrefix $buildType 
257  sh $scriptDir/creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
258  sh $scriptDir/compilemod.sh $buildType $creacontourssource $generationdir
259  sh $scriptDir/ctestmod.sh              $creacontourssource $generationdir
260 fi
261 fi
262 # creacontourdll=$generationdir/creatools_bin/creacontoursBin
263 # LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
264
265
266 # -------------------------
267 #        start_point =  9 : creaRigidRegistration
268 #-------------------------
269 if [ $start_point -le 9 ]
270 then
271 # the following stupid test is used at debug time; Please don't remove!
272 #if [ true = false ]
273 if [ true = true ]
274 then
275  sh $scriptDir/cmakemod.sh                         $crearigidregistrationssource $generationdir $installPrefix $buildType 
276  sh $scriptDir/creaRigidRegistrationVariables.sh   $crearigidregistrationssource $generationdir $docgeneration
277  sh $scriptDir/compilemod.sh            $buildType $crearigidregistrationssource $generationdir
278  sh $scriptDir/ctestmod.sh                         $crearigidregistrationssource $generationdir
279 fi
280 fi
281 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
282 # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
283
284
285 # -------------------------
286 #        start_point =  10 : bbtkGEditor
287 #-------------------------
288 if [ $start_point -le 10 ]
289 then
290 # the following stupid test is used at debug time; Please don't remove!
291 #if [ true = false ]
292 if [ true = true ]
293 then
294 # bbtkGEditor
295  sh $scriptDir/cmakemod.sh              $bbtkgeditorsource $generationdir $installPrefix $buildType 
296  sh $scriptDir/bbtkGEditorVariables.sh  $bbtkgeditorsource $generationdir $docgeneration
297  sh $scriptDir/compilemod.sh $buildType $bbtkgeditorsource $generationdir
298  sh $scriptDir/ctestmod.sh              $bbtkgeditorsource $generationdir
299 fi
300 fi
301 # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
302 # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
303
304
305 # -------------------------
306 #        start_point =  11 : creaTools
307 #-------------------------
308 if [ $start_point -le 11 ]
309 then
310 # the following stupid test is used at debug time; Please don't remove!
311 #if [ true = false ]
312 if [ true = true ]
313 then
314 # creaTools
315  sh $scriptDir/cmakemod.sh                $creatoolssource $generationdir $installPrefix $buildType 
316  sh $scriptDir/creaToolsVariables.sh      $creatoolssource $generationdir $docgeneration
317  sh $scriptDir/compilemod.sh   $buildType $creatoolssource $generationdir
318 fi
319 fi
320
321
322 # sh ctestmod.sh $creatoolsbinary $generationdir
323 #  creatoolsdll=$generationdir/creatools_bin/creatoolsBin
324 #  LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
325
326 # shutdown /s
327 # exit /b