]> Creatis software - creaToolsTools.git/blob - Linux/scripts/CreaTools-compile.sh
Old uncommited patches
[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 --installPrefixThird--
31    echo $installPrefixThird   
32    echo --buildType-- 
33    echo $buildType
34    echo --gdcmVersion--
35    echo $gdcmVersion
36    echo --sourcesFrom--
37    echo $sourcesFrom
38    echo --scriptDir--
39    echo $scriptDir
40    echo --start_point--
41    echo $start_point
42    echo "------"
43
44 if [ ! -f $installPrefixThird/share/creatools_third_party_library_config.sh ]
45 then
46  echo missing  $installPrefixThird/share/creatools_third_party_library_config.sh
47    echo
48    echo "..ERROR.."
49    echo "==================================================="
50    echo "REMEMBER !"
51    echo ""
52    echo "YOU NEED TO RUN 'Install Third Party Libraries' (1) FIRST !"
53    echo "==================================================="
54    echo
55    echo "Hit any key to continue"
56    read a
57    exit 0
58 fi
59
60  if [ ! -e $generationdir/creatools_source ]
61  then 
62  echo missing  $generationdir/creatools_source
63    echo
64    echo "..ERROR.."
65    echo "==================================================="
66    echo "REMEMBER !"
67    echo ""
68    echo "YOU NEED TO RUN 'Load' (2) FIRST !"
69    echo "==================================================="
70    echo
71    echo
72    exit 0
73 fi
74
75
76 if [ ! -f $installPrefixThird/share/creatools_third_party_library_config.sh ]
77 then
78  echo missing  $installPrefixThird/share/creatools_third_party_library_config.sh
79    echo
80    echo "..ERROR.."
81    echo "==================================================="
82    echo "REMEMBER !"
83    echo ""
84    echo "YOU NEED TO RUN 'Load' (2) FIRST !"
85    echo "==================================================="
86    echo
87    echo
88    exit 0
89 fi
90
91  cd $generationdir
92  if [ -e creatools_bin ]
93  then
94     rm -rf creatools_bin
95  fi
96  mkdir creatools_bin
97
98 cd $scriptDir
99
100 # -------------------------
101 #        start_point =  2 : CREA
102 #-------------------------
103 if [ $start_point -le 2 ]
104 then
105 # CREA
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  bash $scriptDir/cmakemod.sh                  $creasource $generationdir $installPrefix $buildType 
111  bash $scriptDir/creaVariables.sh             $creasource $generationdir $docgeneration
112  bash $scriptDir/compilemod.sh     $buildType $creasource $generationdir
113  bash $scriptDir/ctestmod.sh                  $creasource $generationdir
114 fi
115 fi
116  creadll=$generationdir/creatools_bin/creaBin
117  LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
118  export crea_DIR=$generationdir/creatools_bin/creaBin
119
120 # -------------------------
121 #        start_point =  3 : BBTK
122 #-------------------------
123 if [ $start_point -le 3 ]
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 # BBTK
130 echo ========================================================= $bbtksource $generationdir $installPrefix $buildType
131  bash $scriptDir/cmakemod.sh               $bbtksource $generationdir $installPrefix $buildType
132  bash $scriptDir/bbtkVariables.sh          $bbtksource $generationdir $docgeneration $gdcmVersion
133  bash $scriptDir/compilemod.sh  $buildType $bbtksource $generationdir
134  bash $scriptDir/ctestmod.sh               $bbtksource $generationdir
135 fi
136 fi
137  bbtkdll=$generationdir/creatools_bin/bbtkBin
138  LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
139  export BBTK_DIR=$generationdir/creatools_bin/bbtkBin
140
141 # -------------------------
142 #        start_point =  4 : creaMaracasVisu
143 #-------------------------
144 if [ $start_point -le 4 ]
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 # creaMaracasVisu
151  bash $scriptDir/cmakemod.sh              $creamaracassource $generationdir $installPrefix $buildType 
152  bash $scriptDir/creaMaracasVariables.sh  $creamaracassource $generationdir $docgeneration
153  bash $scriptDir/compilemod.sh $buildType $creamaracassource $generationdir
154  bash $scriptDir/ctestmod.sh              $creamaracassource $generationdir
155 fi
156 fi
157  creamaracasdll=$generationdir/creatools_bin/creaMaracasVisuBin
158  LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
159  export creaMaracasVisu_DIR=$generationdir/creatools_bin/creaMaracasVisuBin
160
161 # -------------------------
162 #        start_point =  5 : creaEnvironment
163 #-------------------------
164 if [ $start_point -le 5 ]
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 # creaEnvironment
171  bash $scriptDir/cmakemod.sh                 $creaenvironmentsource $generationdir $installPrefix $buildType 
172  bash $scriptDir/creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration
173  bash $scriptDir/compilemod.sh $buildType    $creaenvironmentsource $generationdir
174  bash $scriptDir/ctestmod.sh                 $creaenvironmentsource $generationdir
175 fi
176 fi
177  creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
178  LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
179  export creaEnvironment_DIR=$generationdir/creatools_bin/creaEnvironmentBin
180
181 # -------------------------
182 #        start_point =  6 : creaBruker
183 #-------------------------
184 if [ $start_point -le 6 ]
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 # creaBruker
191  bash $scriptDir/cmakemod.sh              $creabrukersource $generationdir $installPrefix $buildType 
192  bash $scriptDir/creaBrukerVariables.sh   $creabrukersource $generationdir $docgeneration $gdcmVersion
193  bash $scriptDir/compilemod.sh $buildType $creabrukersource $generationdir
194  bash $scriptDir/ctestmod.sh              $creabrukersource $generationdir
195 fi
196 fi
197  creabrukerdll=$generationdir/creatools_bin/creabrukerBin
198  LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
199  export creaBruker_DIR=$generationdir/creatools_bin/creaBrukerBin
200
201 # -------------------------
202 #        start_point =  7 : creaImageIO
203 #-------------------------
204 if [ $start_point -le 7 ]
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 # creaImageIO
211  bash $scriptDir/cmakemod.sh              $creaimagesource $generationdir $installPrefix $buildType 
212  bash $scriptDir/creaImageIOVariables.sh  $creaimagesource $generationdir $docgeneration $gdcmVersion
213  bash $scriptDir/compilemod.sh $buildType $creaimagesource $generationdir
214  bash $scriptDir/ctestmod.sh              $creaimagesource $generationdir
215 fi
216 fi
217  creaimagedll=$generationdir/creatools_bin/creaimageBin
218  LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
219 export creaImageIO_DIR=$generationdir/creatools_bin/creaImageIOBin
220
221 # -------------------------
222 #        start_point =  8 : creaContour
223 #-------------------------
224 if [ $start_point -le 8 ]
225 then
226 # the following stupid test is used at debug time; Please don't remove!
227 #if [ true = false ]
228 if [ true = true ]
229 then
230 # creaContours
231  bash $scriptDir/cmakemod.sh              $creacontourssource $generationdir $installPrefix $buildType 
232  bash $scriptDir/creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
233  bash $scriptDir/compilemod.sh $buildType $creacontourssource $generationdir
234  bash $scriptDir/ctestmod.sh              $creacontourssource $generationdir
235 fi
236 fi
237  creacontourdll=$generationdir/creatools_bin/creacontoursBin
238  LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
239  export creaContours_DIR=$generationdir/creatools_bin/creaContoursBin
240
241 # -------------------------
242 #        start_point =  9 : creaRigidRegistration
243 #-------------------------
244 if [ $start_point -le 9 ]
245 then
246 # the following stupid test is used at debug time; Please don't remove!
247 #if [ true = false ]
248 if [ true = true ]
249 then
250  bash $scriptDir/cmakemod.sh                         $crearigidregistrationssource $generationdir $installPrefix $buildType 
251  bash $scriptDir/creaRigidRegistrationVariables.sh   $crearigidregistrationssource $generationdir $docgeneration
252  bash $scriptDir/compilemod.sh            $buildType $crearigidregistrationssource $generationdir
253  bash $scriptDir/ctestmod.sh                         $crearigidregistrationssource $generationdir
254 fi
255 fi
256 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
257 # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
258
259
260 # -------------------------
261 #        start_point =  10 : bbtkGEditor
262 #-------------------------
263 if [ $start_point -le 10 ]
264 then
265 # the following stupid test is used at debug time; Please don't remove!
266 #if [ true = false ]
267 if [ true = true ]
268 then
269 # bbtkGEditor
270  bash $scriptDir/cmakemod.sh              $bbtkgeditorsource $generationdir $installPrefix $buildType 
271  bash $scriptDir/bbtkGEditorVariables.sh  $bbtkgeditorsource $generationdir $docgeneration
272  bash $scriptDir/compilemod.sh $buildType $bbtkgeditorsource $generationdir
273  bash $scriptDir/ctestmod.sh              $bbtkgeditorsource $generationdir
274 fi
275 fi
276 # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
277 # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
278
279
280 # -------------------------
281 #        start_point =  11 : creaTools
282 #-------------------------
283 if [ $start_point -le 11 ]
284 then
285 # the following stupid test is used at debug time; Please don't remove!
286 #if [ true = false ]
287 if [ true = true ]
288 then
289 # creaTools
290  bash $scriptDir/cmakemod.sh                $creatoolssource $generationdir $installPrefix $buildType 
291  bash $scriptDir/creaToolsVariables.sh      $creatoolssource $generationdir $docgeneration
292  bash $scriptDir/compilemod.sh   $buildType $creatoolssource $generationdir
293 fi
294 fi
295
296
297 # bash ctestmod.sh $creatoolsbinary $generationdir
298 #  creatoolsdll=$generationdir/creatools_bin/creatoolsBin
299 #  LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
300
301 # shutdown /s
302 # exit /b