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