]> Creatis software - creaToolsTools.git/blob - Linux/scripts/CreaTools-compile.sh
fixes
[creaToolsTools.git] / Linux / scripts / CreaTools-compile.sh
1 #!/bin/sh
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  sh $scriptDir/cmakemod.sh               $bbtksource $generationdir $installPrefix $buildType
97  sh $scriptDir/bbtkVariables.sh          $bbtksource $generationdir $docgeneration $gdcmVersion
98  sh $scriptDir/compilemod.sh  $buildType $bbtksource $generationdir
99  sh $scriptDir/ctestmod.sh               $bbtksource $generationdir
100 fi
101 fi
102  bbtkdll=$generationdir/creatools_bin/bbtkBin
103  LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
104
105
106 # -------------------------
107 #        start_point =  4 : creaMaracasVisu
108 #-------------------------
109 if [ $start_point -le 4 ]
110 then
111 # the following stupid test is used at debug time; Please don't remove!
112 #if [ true = false ]
113 if [ true = true ]
114 then
115 # creaMaracasVisu
116  sh $scriptDir/cmakemod.sh              $creamaracassource $generationdir $installPrefix $buildType 
117  sh $scriptDir/creaMaracasVariables.sh  $creamaracassource $generationdir $docgeneration
118  sh $scriptDir/compilemod.sh $buildType $creamaracassource $generationdir
119  sh $scriptDir/ctestmod.sh              $creamaracassource $generationdir
120 fi
121 fi
122  creamaracasdll=$generationdir/creatools_bin/creamaracasBin
123  LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
124
125
126 # -------------------------
127 #        start_point =  5 : creaEnvironment
128 #-------------------------
129 if [ $start_point -le 5 ]
130 then
131 # the following stupid test is used at debug time; Please don't remove!
132 #if [ true = false ]
133 if [ true = true ]
134 then
135 # creaEnvironment
136  sh $scriptDir/cmakemod.sh                 $creaenvironmentsource $generationdir $installPrefix $buildType 
137  sh $scriptDir/creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration
138  sh $scriptDir/compilemod.sh $buildType    $creaenvironmentsource $generationdir
139  sh $scriptDir/ctestmod.sh                 $creaenvironmentsource $generationdir
140 fi
141 fi
142  creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
143  LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
144
145
146 # -------------------------
147 #        start_point =  6 : creaBruker
148 #-------------------------
149 if [ $start_point -le 6 ]
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 # creaBruker
156  sh $scriptDir/cmakemod.sh              $creabrukersource $generationdir $installPrefix $buildType 
157  sh $scriptDir/creaBrukerVariables.sh   $creabrukersource $generationdir $docgeneration $gdcmVersion
158  sh $scriptDir/compilemod.sh $buildType $creabrukersource $generationdir
159  sh $scriptDir/ctestmod.sh              $creabrukersource $generationdir
160 fi
161 fi
162  creabrukerdll=$generationdir/creatools_bin/creabrukerBin
163  LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
164
165
166 # -------------------------
167 #        start_point =  7 : creaImageIO
168 #-------------------------
169 if [ $start_point -le 7 ]
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 # creaImageIO
176  sh $scriptDir/cmakemod.sh              $creaimagesource $generationdir $installPrefix $buildType 
177  sh $scriptDir/creaImageIOVariables.sh  $creaimagesource $generationdir $docgeneration $gdcmVersion
178  sh $scriptDir/compilemod.sh $buildType $creaimagesource $generationdir
179  sh $scriptDir/ctestmod.sh              $creaimagesource $generationdir
180 fi
181 fi
182  creaimagedll=$generationdir/creatools_bin/creaimageBin
183  LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
184
185
186 # -------------------------
187 #        start_point =  8 : creaContour
188 #-------------------------
189 if [ $start_point -le 8 ]
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 # creaContours
196  sh $scriptDir/cmakemod.sh              $creacontourssource $generationdir $installPrefix $buildType 
197  sh $scriptDir/creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
198  sh $scriptDir/compilemod.sh $buildType $creacontourssource $generationdir
199  sh $scriptDir/ctestmod.sh              $creacontourssource $generationdir
200 fi
201 fi
202 # creacontourdll=$generationdir/creatools_bin/creacontoursBin
203 # LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
204
205
206 # -------------------------
207 #        start_point =  9 : creaRigidRegistration
208 #-------------------------
209 if [ $start_point -le 9 ]
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  sh $scriptDir/cmakemod.sh                         $crearigidregistrationssource $generationdir $installPrefix $buildType 
216  sh $scriptDir/creaRigidRegistrationVariables.sh   $crearigidregistrationssource $generationdir $docgeneration
217  sh $scriptDir/compilemod.sh            $buildType $crearigidregistrationssource $generationdir
218  sh $scriptDir/ctestmod.sh                         $crearigidregistrationssource $generationdir
219 fi
220 fi
221 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
222 # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
223
224
225 # -------------------------
226 #        start_point =  10 : bbtkGEditor
227 #-------------------------
228 if [ $start_point -le 10 ]
229 then
230 # the following stupid test is used at debug time; Please don't remove!
231 #if [ true = false ]
232 if [ true = true ]
233 then
234 # bbtkGEditor
235  sh $scriptDir/cmakemod.sh              $bbtkgeditorsource $generationdir $installPrefix $buildType 
236  sh $scriptDir/bbtkGEditorVariables.sh  $bbtkgeditorsource $generationdir $docgeneration
237  sh $scriptDir/compilemod.sh $buildType $bbtkgeditorsource $generationdir
238  sh $scriptDir/ctestmod.sh              $bbtkgeditorsource $generationdir
239 fi
240 fi
241 # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
242 # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
243
244
245 # -------------------------
246 #        start_point =  11 : creaTools
247 #-------------------------
248 if [ $start_point -le 11 ]
249 then
250 # the following stupid test is used at debug time; Please don't remove!
251 #if [ true = false ]
252 if [ true = true ]
253 then
254 # creaTools
255  sh $scriptDir/cmakemod.sh                $creatoolssource $generationdir $installPrefix $buildType 
256  sh $scriptDir/creaToolsVariables.sh      $creatoolssource $generationdir $docgeneration
257  sh $scriptDir/compilemod.sh   $buildType $creatoolssource $generationdir
258 fi
259 fi
260
261
262 # sh ctestmod.sh $creatoolsbinary $generationdir
263 #  creatoolsdll=$generationdir/creatools_bin/creatoolsBin
264 #  LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
265
266 # shutdown /s
267 # exit /b