]> Creatis software - creaToolsTools.git/blob - Install/scripts/All.sh
b6a44215c8b4beaf0b78ef784cadd41c1f9881ba
[creaToolsTools.git] / Install / scripts / All.sh
1 #!/bin/sh
2
3 if [ $# = 0 ]
4 then
5 echo "Use it as :"
6 echo "sh All.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType>"
7 echo " "
8 echo "ex : sh All.sh /tmp/gendir OFF jpr /home/jpr/myInstallDirectory Debug"
9 exit 0
10 fi
11
12 echo $#
13 echo "----------"
14 echo $0
15 echo $1
16 echo $2
17 echo $3
18 echo $4
19 echo $5
20 echo "----------"
21
22 if [ $# != 5 ]
23 then 
24 echo "sh All.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType>"
25 echo " "
26 echo "ex : sh All.sh /tmp/gendir OFF jpr /home/jpr/myInstallDirectory Debug"
27 exit 0
28 fi
29
30 # @echo off
31
32 #allow user to choose the generation dir
33 #allow user to choose to generate the doc or not
34
35 generationdir=$1
36 cvsUserName=$3
37 installPrefix=$4
38 buildType=$5
39
40 scriptDir=$PWD
41 echo scriptDir
42 echo $scriptDir
43
44 mkdir $generationdir
45 mkdir $generationdir/creatools_source
46 mkdir $generationdir/creatools_bin
47
48  creasource=crea
49  bbtksource=bbtk
50  creamaracassource=creaMaracasVisu
51  creaenvironmentsource=creaEnvironment
52  creabrukersource=creaBruker
53  creaimagesource=creaImageIO
54  creacontourssource=creaContours
55  crearigidregistrationssource=creaRigidRegistration
56  bbtkgeditorsource=bbtkGEditor
57  creatoolssource=creaTools
58  
59 cd $generationdir
60
61 # the following stupid test is used at debug time; Please don't remove!
62 #if [ true = false ]
63 if [ true = true ]
64 then
65
66 sudo rm -rf creatools_bin/creaBin
67 sudo rm -rf creatools_bin/bbtkBin
68 sudo rm -rf creatools_bin/creamaracasBin
69 sudo rm -rf creatools_bin/creaEnvironmentBin
70 sudo rm -rf creatools_bin/creaBrukerBin
71 sudo rm -rf creatools_bin/creaImageIOBin
72 sudo rm -rf creatools_bin/creaContoursBin
73 sudo rm -rf creatools_bin/creaRigidRegistrationBin
74 sudo rm -rf creatools_bin/bbtkGEditorBin
75 sudo rm -rf creatools_bin/creaToolsBin
76
77 sh $scriptDir/cvscheckout.sh $creasource                   $generationdir $cvsUserName
78 sh $scriptDir/cvscheckout.sh $bbtksource                   $generationdir $cvsUserName
79 sh $scriptDir/cvscheckout.sh $creamaracassource            $generationdir $cvsUserName
80 sh $scriptDir/cvscheckout.sh $creaenvironmentsource        $generationdir $cvsUserName
81 sh $scriptDir/cvscheckout.sh $creabrukersource             $generationdir $cvsUserName
82 sh $scriptDir/cvscheckout.sh $creaimagesource              $generationdir $cvsUserName
83 sh $scriptDir/cvscheckout.sh $creacontourssource           $generationdir $cvsUserName
84 sh $scriptDir/cvscheckout.sh $crearigidregistrationssource $generationdir $cvsUserName
85 sh $scriptDir/cvscheckout.sh $bbtkgeditorsource            $generationdir $cvsUserName
86 sh $scriptDir/cvscheckout.sh $creatoolssource              $generationdir $cvsUserName
87
88 fi
89
90 cd $scriptDir
91
92 # CREA
93 # the following stupid test is used at debug time; Please don't remove!
94 #if [ true = false ]
95 if [ true = true ]
96 then
97  sh cmakemod.sh         $creasource $generationdir $installPrefix $buildType 
98  sh creaVariables.sh    $creasource $generationdir $docgeneration
99  sh compilemod.sh       $buildType   $creasource $generationdir  
100  sh ctestmod.sh         $creasource $generationdir
101 fi
102  creadll=$generationdir/creatools_bin/creaBin
103  LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
104
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 # BBTK
110  sh cmakemod.sh         $bbtksource $generationdir $installPrefix $buildType 
111  sh bbtkVariables.sh    $bbtksource $generationdir $docgeneration
112  sh compilemod.sh       $buildType $bbtksource $generationdir 
113  sh ctestmod.sh         $bbtksource $generationdir
114 fi
115  bbtkdll=$generationdir/creatools_bin/bbtkBin
116  LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
117
118 # the following stupid test is used at debug time; Please don't remove!
119 #if [ true = false ]
120 if [ true = true ]
121 then
122 # creaMaracasVisu
123  sh cmakemod.sh                 $creamaracassource $generationdir $installPrefix $buildType 
124  sh creaMaracasVariables.sh     $creamaracassource $generationdir $docgeneration
125  sh compilemod.sh               $buildType $creamaracassource $generationdir 
126  sh ctestmod.sh                 $creamaracassource $generationdir
127 fi
128
129  creamaracasdll=$generationdir/creatools_bin/creamaracasBin
130  LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
131
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 cmakemod.sh                 $creaenvironmentsource $generationdir $installPrefix $buildType 
138  sh creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration
139  sh compilemod.sh $buildType    $creaenvironmentsource $generationdir
140  sh ctestmod.sh                 $creaenvironmentsource $generationdir
141 fi
142  creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
143  LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
144
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 cmakemod.sh                 $creabrukersource $generationdir $installPrefix $buildType 
151  sh creaBrukerVariables.sh      $creabrukersource $generationdir $docgeneration
152  sh compilemod.sh $buildType    $creabrukersource  $generationdir
153  echo generationdir 
154  sh ctestmod.sh                 $creabrukersource $generationdir
155 fi
156  creabrukerdll=$generationdir/creatools_bin/creabrukerBin
157  LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
158
159 # the following stupid test is used at debug time; Please don't remove!
160 #if [ true = false ]
161 if [ true = true ]
162 then
163 # creaImageIO
164  sh cmakemod.sh                 $creaimagesource $generationdir $installPrefix $buildType 
165  sh creaImageIOVariables.sh     $creaimagesource $generationdir $docgeneration
166  sh compilemod.sh               $buildType $creaimagesource $generationdir
167  sh ctestmod.sh                 $creaimagesource $generationdir
168 fi
169  creaimagedll=$generationdir/creatools_bin/creaimageBin
170  LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
171
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 # creaContours
177  sh cmakemod.sh                 $creacontourssource $generationdir $installPrefix $buildType 
178  sh creaContoursVariables.sh    $creacontourssource $generationdir $docgeneration
179  sh compilemod.sh               $buildType $creacontourssource $generationdir
180  sh ctestmod.sh                 $creacontourssource $generationdir
181 fi
182 # creacontourdll=$generationdir/creatools_bin/creacontoursBin
183 # LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
184
185 # creaRigidRegistration
186
187 # the following stupid test is used at debug time; Please don't remove!
188 #if [ true = false ]
189 if [ true = true ]
190 then
191  sh cmakemod.sh                         $crearigidregistrationssource $generationdir $installPrefix $buildType 
192  sh creaRigidRegistrationVariables.sh   $crearigidregistrationssource $generationdir $docgeneration
193  sh compilemod.sh                       $buildType $crearigidregistrationssource $generationdir
194  sh ctestmod.sh                         $crearigidregistrationssource $generationdir
195 fi
196 # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
197 # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
198
199 # the following stupid test is used at debug time; Please don't remove!
200 #if [ true = false ]
201 if [ true = true ]
202 then
203 # bbtkGEditor
204  sh cmakemod.sh                 $bbtkgeditorsource $generationdir $installPrefix $buildType 
205  sh bbtkGEditorVariables.sh     $bbtkgeditorsource $generationdir $docgeneration
206  sh compilemod.sh               $buildType $bbtkgeditorsource $generationdir
207  sh ctestmod.sh                 $bbtkgeditorsource $generationdir
208 fi
209 # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
210 # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
211
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 # creaTools
217  sh cmakemod.sh                    $creatoolssource $generationdir $installPrefix $buildType 
218  sh creaToolsVariables.sh          $creatoolssource $generationdir $docgeneration
219  sh compilemod.sh                  $buildType $creatoolssource $generationdir
220 fi
221 # sh ctestmod.sh $creatoolsbinary $generationdir
222 #  creatoolsdll=$generationdir/creatools_bin/creatoolsBin
223 #  LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
224
225 # shutdown /s
226 # exit /b