]> Creatis software - creaToolsTools.git/blob - Linux/scripts/CreaTools-compile.sh
Some more checking, to protect against unaware user.
[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
58 cd $scriptDir
59
60 # -------------------------
61 #        start_point =  2 : CREA
62 #-------------------------
63 if [ $start_point -le 2 ]
64 then
65 # CREA
66 # the following stupid test is used at debug time; Please don't remove!
67 #if [ true = false ]
68 if [ true = true ]
69 then
70  sh $scriptDir/cmakemod.sh                  $creasource $generationdir $installPrefix $buildType 
71  sh $scriptDir/creaVariables.sh             $creasource $generationdir $docgeneration
72  sh $scriptDir/compilemod.sh     $buildType $creasource $generationdir
73  sh $scriptDir/ctestmod.sh                  $creasource $generationdir
74 fi
75 fi
76  creadll=$generationdir/creatools_bin/creaBin
77  LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
78
79 exit 0
80
81 # -------------------------
82 #        start_point =  3 : BBTK
83 #-------------------------
84 if [ $start_point -le 3 ]
85 then
86 # the following stupid test is used at debug time; Please don't remove!
87 #if [ true = false ]
88 if [ true = true ]
89 then
90 # BBTK
91  sh $scriptDir/cmakemod.sh       $bbtksource $generationdir $installPrefix $buildType
92  sh $scriptDir/bbtkVariables.sh  $bbtksource $generationdir $docgeneration $gdcmVersion
93  sh $scriptDir/compilemod.sh     $buildType  $bbtksource $generationdir
94  sh $scriptDir/ctestmod.sh       $bbtksource $generationdir
95 fi
96 fi
97  bbtkdll=$generationdir/creatools_bin/bbtkBin
98  LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
99
100
101 # -------------------------
102 #        start_point =  4 : creaMaracasVisu
103 #-------------------------
104 if [ $start_point -le 4 ]
105 then
106 # the following stupid test is used at debug time; Please don't remove!
107 #if [ true = false ]
108 if [ true = true ]
109 then
110 # creaMaracasVisu
111  sh $scriptDir/cmakemod.sh                $creamaracassource $generationdir $installPrefix $buildType 
112  sh $scriptDir/creaMaracasVariables.sh    $creamaracassource $generationdir $docgeneration
113  sh $scriptDir/compilemod.sh              $buildType $creamaracassource $generationdir
114  sh $scriptDir/ctestmod.sh                $creamaracassource $generationdir
115 fi
116 fi
117  creamaracasdll=$generationdir/creatools_bin/creamaracasBin
118  LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
119
120
121 # -------------------------
122 #        start_point =  5 : creaEnvironment
123 #-------------------------
124 if [ $start_point -le 5 ]
125 then
126 # the following stupid test is used at debug time; Please don't remove!
127 #if [ true = false ]
128 if [ true = true ]
129 then
130 # creaEnvironment
131  sh $scriptDir/cmakemod.sh                 $creaenvironmentsource $generationdir $installPrefix $buildType 
132  sh $scriptDir/creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration
133  sh $scriptDir/compilemod.sh $buildType    $creaenvironmentsource $generationdir
134  sh $scriptDir/ctestmod.sh                 $creaenvironmentsource $generationdir
135 fi
136 fi
137  creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
138  LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
139
140
141 # -------------------------
142 #        start_point =  6 : creaBruker
143 #-------------------------
144 if [ $start_point -le 6 ]
145 then
146 # the following stupid test is used at debug time; Please don't remove!
147 #if [ true = false ]
148 if [ true = true ]
149 then
150 # creaBruker
151  sh $scriptDir/cmakemod.sh              $creabrukersource $generationdir $installPrefix $buildType 
152  sh $scriptDir/creaBrukerVariables.sh   $creabrukersource $generationdir $docgeneration $gdcmVersion
153  sh $scriptDir/compilemod.sh $buildType $creabrukersource $generationdir
154  sh $scriptDir/ctestmod.sh              $creabrukersource $generationdir
155 fi
156 fi
157  creabrukerdll=$generationdir/creatools_bin/creabrukerBin
158  LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
159
160
161 # -------------------------
162 #        start_point =  7 : creaImageIO
163 #-------------------------
164 if [ $start_point -le 7 ]
165 then
166  # the following stupid test is used at debug time; Please don't remove!
167 #if [ true = false ]
168 if [ true = true ]
169 then
170 # creaImageIO
171  sh $scriptDir/cmakemod.sh              $creaimagesource $generationdir $installPrefix $buildType 
172  sh $scriptDir/creaImageIOVariables.sh  $creaimagesource $generationdir $docgeneration $gdcmVersion
173  sh $scriptDir/compilemod.sh $buildType $creaimagesource $generationdir
174  sh $scriptDir/ctestmod.sh              $creaimagesource $generationdir
175 fi
176 fi
177  creaimagedll=$generationdir/creatools_bin/creaimageBin
178  LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
179
180
181 # -------------------------
182 #        start_point =  8 : creaContour
183 #-------------------------
184 if [ $start_point -le 8 ]
185 then
186 # the following stupid test is used at debug time; Please don't remove!
187 #if [ true = false ]
188 if [ true = true ]
189 then
190 # creaContours
191  sh $scriptDir/cmakemod.sh              $creacontourssource $generationdir $installPrefix $buildType 
192  sh $scriptDir/creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
193  sh $scriptDir/compilemod.sh $buildType $creacontourssource $generationdir
194  sh $scriptDir/ctestmod.sh              $creacontourssource $generationdir
195 fi
196 fi
197 # creacontourdll=$generationdir/creatools_bin/creacontoursBin
198 # LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
199
200
201 # -------------------------
202 #        start_point =  9 : creaRigidRegistration
203 #-------------------------
204 if [ $start_point -le 9 ]
205 then
206 # the following stupid test is used at debug time; Please don't remove!
207 #if [ true = false ]
208 if [ true = true ]
209 then
210  sh $scriptDir/cmakemod.sh                         $crearigidregistrationssource $generationdir $installPrefix $buildType 
211  sh $scriptDir/creaRigidRegistrationVariables.sh   $crearigidregistrationssource $generationdir $docgeneration
212  sh $scriptDir/compilemod.sh            $buildType $crearigidregistrationssource $generationdir
213  sh $scriptDir/ctestmod.sh                         $crearigidregistrationssource $generationdir
214 fi
215 fi
216 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
217 # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
218
219
220 # -------------------------
221 #        start_point =  10 : bbtkGEditor
222 #-------------------------
223 if [ $start_point -le 10 ]
224 then
225 # the following stupid test is used at debug time; Please don't remove!
226 #if [ true = false ]
227 if [ true = true ]
228 then
229 # bbtkGEditor
230  sh $scriptDir/cmakemod.sh              $bbtkgeditorsource $generationdir $installPrefix $buildType 
231  sh $scriptDir/bbtkGEditorVariables.sh  $bbtkgeditorsource $generationdir $docgeneration
232  sh $scriptDir/compilemod.sh $buildType $bbtkgeditorsource $generationdir
233  sh $scriptDir/ctestmod.sh              $bbtkgeditorsource $generationdir
234 fi
235 fi
236 # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
237 # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
238
239
240 # -------------------------
241 #        start_point =  11 : creaTools
242 #-------------------------
243 if [ $start_point -le 11 ]
244 then
245 # the following stupid test is used at debug time; Please don't remove!
246 #if [ true = false ]
247 if [ true = true ]
248 then
249 # creaTools
250  sh $scriptDir/cmakemod.sh                $creatoolssource $generationdir $installPrefix $buildType 
251  sh $scriptDir/creaToolsVariables.sh      $creatoolssource $generationdir $docgeneration
252  sh $scriptDir/compilemod.sh   $buildType $creatoolssource $generationdir
253 fi
254 fi
255
256
257 # sh ctestmod.sh $creatoolsbinary $generationdir
258 #  creatoolsdll=$generationdir/creatools_bin/creatoolsBin
259 #  LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
260
261 # shutdown /s
262 # exit /b