]> Creatis software - creaToolsTools.git/blob - Linux/scripts/CreaTools-compile.sh
#!/bin/sh -> #!/bin/bash (for Ubuntu pb)
[creaToolsTools.git] / Linux / scripts / CreaTools-compile.sh
1 #!/bin/bash
2
3 if [ ! -f $PWD/scripts/CreaTools-configure.sh ]
4 then 
5    echo
6    echo "..ERROR.."
7    echo "==================================================="
8    echo "REMEMBER !"
9    echo ""
10    echo "YOU NEED TO RUN 'Configure' (0) FIRST !"
11    echo "==================================================="
12    echo
13    echo
14    exit 0
15 fi
16
17 # Set all local variables
18  
19  source $PWD/scripts/CreaTools-configure.sh
20  source $PWD/scripts/CreaTools-names.sh
21
22    echo "------"
23    echo $PWD/scripts/CreaTools-configure.sh
24    echo --generationdir--
25    echo $generationdir
26    echo --docgeneration--
27    echo $docgeneration
28    echo --installPrefix--
29    echo $installPrefix
30    echo --buildType--
31    echo $buildType
32    echo --gdcmVersion--
33    echo $gdcmVersion
34    echo --sourcesFrom--
35    echo $sourcesFrom
36    echo --scriptDir--
37    echo $scriptDir
38    echo --start_point--
39    echo $start_point
40    echo "------"
41
42  if [ ! -e $generationdir/creatools_source ]
43  then 
44  echo missing  $generationdir/creatools_source
45    echo
46    echo "..ERROR.."
47    echo "==================================================="
48    echo "REMEMBER !"
49    echo ""
50    echo "YOU NEED TO RUN 'Load' (2) FIRST !"
51    echo "==================================================="
52    echo
53    echo
54    exit 0
55 fi
56
57  cd $generationdir
58  if [ -e creatools_bin ]
59  then
60     rm -rf creatools_bin
61  fi
62  mkdir creatools_bin
63
64 cd $scriptDir
65
66 # -------------------------
67 #        start_point =  2 : CREA
68 #-------------------------
69 if [ $start_point -le 2 ]
70 then
71 # CREA
72 # the following stupid test is used at debug time; Please don't remove!
73 #if [ true = false ]
74 if [ true = true ]
75 then
76  sh $scriptDir/cmakemod.sh                  $creasource $generationdir $installPrefix $buildType 
77  sh $scriptDir/creaVariables.sh             $creasource $generationdir $docgeneration
78  sh $scriptDir/compilemod.sh     $buildType $creasource $generationdir
79  sh $scriptDir/ctestmod.sh                  $creasource $generationdir
80 fi
81 fi
82  creadll=$generationdir/creatools_bin/creaBin
83  LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
84
85
86 # -------------------------
87 #        start_point =  3 : BBTK
88 #-------------------------
89 if [ $start_point -le 3 ]
90 then
91 # the following stupid test is used at debug time; Please don't remove!
92 #if [ true = false ]
93 if [ true = true ]
94 then
95 # BBTK
96 echo ========================================================= $bbtksource $generationdir $installPrefix $buildType
97  sh $scriptDir/cmakemod.sh               $bbtksource $generationdir $installPrefix $buildType
98  sh $scriptDir/bbtkVariables.sh          $bbtksource $generationdir $docgeneration $gdcmVersion
99  sh $scriptDir/compilemod.sh  $buildType $bbtksource $generationdir
100  sh $scriptDir/ctestmod.sh               $bbtksource $generationdir
101 fi
102 fi
103  bbtkdll=$generationdir/creatools_bin/bbtkBin
104  LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
105
106
107 # -------------------------
108 #        start_point =  4 : creaMaracasVisu
109 #-------------------------
110 if [ $start_point -le 4 ]
111 then
112 # the following stupid test is used at debug time; Please don't remove!
113 #if [ true = false ]
114 if [ true = true ]
115 then
116 # creaMaracasVisu
117  sh $scriptDir/cmakemod.sh              $creamaracassource $generationdir $installPrefix $buildType 
118  sh $scriptDir/creaMaracasVariables.sh  $creamaracassource $generationdir $docgeneration
119  sh $scriptDir/compilemod.sh $buildType $creamaracassource $generationdir
120  sh $scriptDir/ctestmod.sh              $creamaracassource $generationdir
121 fi
122 fi
123  creamaracasdll=$generationdir/creatools_bin/creamaracasBin
124  LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
125
126
127 # -------------------------
128 #        start_point =  5 : creaEnvironment
129 #-------------------------
130 if [ $start_point -le 5 ]
131 then
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 # creaEnvironment
137  sh $scriptDir/cmakemod.sh                 $creaenvironmentsource $generationdir $installPrefix $buildType 
138  sh $scriptDir/creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration
139  sh $scriptDir/compilemod.sh $buildType    $creaenvironmentsource $generationdir
140  sh $scriptDir/ctestmod.sh                 $creaenvironmentsource $generationdir
141 fi
142 fi
143  creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
144  LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
145
146
147 # -------------------------
148 #        start_point =  6 : creaBruker
149 #-------------------------
150 if [ $start_point -le 6 ]
151 then
152 # the following stupid test is used at debug time; Please don't remove!
153 #if [ true = false ]
154 if [ true = true ]
155 then
156 # creaBruker
157  sh $scriptDir/cmakemod.sh              $creabrukersource $generationdir $installPrefix $buildType 
158  sh $scriptDir/creaBrukerVariables.sh   $creabrukersource $generationdir $docgeneration $gdcmVersion
159  sh $scriptDir/compilemod.sh $buildType $creabrukersource $generationdir
160  sh $scriptDir/ctestmod.sh              $creabrukersource $generationdir
161 fi
162 fi
163  creabrukerdll=$generationdir/creatools_bin/creabrukerBin
164  LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
165
166
167 # -------------------------
168 #        start_point =  7 : creaImageIO
169 #-------------------------
170 if [ $start_point -le 7 ]
171 then
172  # the following stupid test is used at debug time; Please don't remove!
173 #if [ true = false ]
174 if [ true = true ]
175 then
176 # creaImageIO
177  sh $scriptDir/cmakemod.sh              $creaimagesource $generationdir $installPrefix $buildType 
178  sh $scriptDir/creaImageIOVariables.sh  $creaimagesource $generationdir $docgeneration $gdcmVersion
179  sh $scriptDir/compilemod.sh $buildType $creaimagesource $generationdir
180  sh $scriptDir/ctestmod.sh              $creaimagesource $generationdir
181 fi
182 fi
183  creaimagedll=$generationdir/creatools_bin/creaimageBin
184  LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
185
186
187 # -------------------------
188 #        start_point =  8 : creaContour
189 #-------------------------
190 if [ $start_point -le 8 ]
191 then
192 # the following stupid test is used at debug time; Please don't remove!
193 #if [ true = false ]
194 if [ true = true ]
195 then
196 # creaContours
197  sh $scriptDir/cmakemod.sh              $creacontourssource $generationdir $installPrefix $buildType 
198  sh $scriptDir/creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
199  sh $scriptDir/compilemod.sh $buildType $creacontourssource $generationdir
200  sh $scriptDir/ctestmod.sh              $creacontourssource $generationdir
201 fi
202 fi
203 # creacontourdll=$generationdir/creatools_bin/creacontoursBin
204 # LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
205
206
207 # -------------------------
208 #        start_point =  9 : creaRigidRegistration
209 #-------------------------
210 if [ $start_point -le 9 ]
211 then
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 $scriptDir/cmakemod.sh                         $crearigidregistrationssource $generationdir $installPrefix $buildType 
217  sh $scriptDir/creaRigidRegistrationVariables.sh   $crearigidregistrationssource $generationdir $docgeneration
218  sh $scriptDir/compilemod.sh            $buildType $crearigidregistrationssource $generationdir
219  sh $scriptDir/ctestmod.sh                         $crearigidregistrationssource $generationdir
220 fi
221 fi
222 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
223 # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
224
225
226 # -------------------------
227 #        start_point =  10 : bbtkGEditor
228 #-------------------------
229 if [ $start_point -le 10 ]
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 # bbtkGEditor
236  sh $scriptDir/cmakemod.sh              $bbtkgeditorsource $generationdir $installPrefix $buildType 
237  sh $scriptDir/bbtkGEditorVariables.sh  $bbtkgeditorsource $generationdir $docgeneration
238  sh $scriptDir/compilemod.sh $buildType $bbtkgeditorsource $generationdir
239  sh $scriptDir/ctestmod.sh              $bbtkgeditorsource $generationdir
240 fi
241 fi
242 # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
243 # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
244
245
246 # -------------------------
247 #        start_point =  11 : creaTools
248 #-------------------------
249 if [ $start_point -le 11 ]
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 # creaTools
256  sh $scriptDir/cmakemod.sh                $creatoolssource $generationdir $installPrefix $buildType 
257  sh $scriptDir/creaToolsVariables.sh      $creatoolssource $generationdir $docgeneration
258  sh $scriptDir/compilemod.sh   $buildType $creatoolssource $generationdir
259 fi
260 fi
261
262
263 # sh ctestmod.sh $creatoolsbinary $generationdir
264 #  creatoolsdll=$generationdir/creatools_bin/creatoolsBin
265 #  LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
266
267 # shutdown /s
268 # exit /b