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