echo
echo " Choose what you want to do :"
echo
- echo " Configure : 0"
- echo " Install Third Party Libraries : 1"
- echo " Compile the CreaTools : 2"
- echo " Install the CreaTools : 3"
- echo " Uninstall the CreaTools : 4"
+ echo " Configure : 0"
+ echo " Install Third Party Libraries : 1"
+ echo " Get the 'CreaTools' source files : 2"
+ echo " Compile the CreaTools : 3"
+ echo " Install the CreaTools : 4"
+ echo " Uninstall the CreaTools : 5"
echo
- echo " Exit : 9"
+ echo " Exit : 9"
echo
echo
echo
case $i in
0)
suitable=XXX
- ls -l scripts/CreaTools-configure.sh
+ #ls -l scripts/CreaTools-configure.sh
if [ -f scripts/CreaTools-configure.sh ]
then
while [[ "$suitable" != "YES" && \
read suitable
if [ "$suitable" = "" ]
then
- $suitable="YES"
+ suitable="YES"
fi
done
else
- $suitable="NO"
+ suitable="NO"
fi
if [ "$suitable" = "NO" ]
then
generationdir="/tmp/myGenerationDir"
fi
- echo "you said : [" $generationdir "]"su
+ echo "you said : [" $generationdir "]"
echo
echo
while [ "$linuxUserName" == "" ]
do
echo "Have a look at the following line to know 'Login User Name'/'Login Group Name'"
- ls -l ~/.bashrc
+ ls -l menu.sh
echo "Login User Name (mandatory!)"
read linuxUserName
echo "you said : [" $linuxUserName "]"
do
#echo "Have a look at the following line to know 'Login User Name'/'Login Group Name'"
#echo "Login Group Name (mandatory!)"
+ echo "Login Group Name (mandatory!)"
read linuxGroupName
echo "you said : [" $linuxGroupName "]"
done
echo "------------------------------------"
exit 0
;;
-
+
2)
- echo "========================== 2"
+ echo "========================== 3"
+ sh scripts/CreaTools-load.sh
+
+ ;;
+
+
+
+ 3)
+ echo "========================== 3"
sh scripts/CreaTools-compile.sh
# To allow (*very* aware) user to patch code, later
- chown -R $generationdir/creatools_source $linuxUserName
- chgrp -R $generationdir/creatools_source $linuxGroupName
+ chown -R $linuxUserName $generationdir/creatools_source
+ chgrp -R $linuxGroupName $generationdir/creatools_source
# Too much time consuming
- #chown -R $generationdir/creatools_source $linuxUserName
- #chgrp -R $generationdir/creatools_source $linuxGroupName
+ #chown -R $linuxUserName $generationdir/creatools_source
+ #chgrp -R $linuxGroupName $generationdir/creatools_source
;;
- 3)
- echo "========================= 3"
+ 4)
+ echo "========================= 4"
sh scripts/CreaTools-install.sh
;;
- 4)
- echo "========================= 4"
+ 5)
+ echo "========================= 5"
sh scripts/CreaTools-uninstall.sh
;;
;;
*)
- echo "Your answer must be in {0, 1, 2, 3, 4, 9} (was $i)"
+ echo "Your answer must be in {0, 1, 2, 3, 4, 5, 9} (was $i)"
;;
esac
#!/bin/sh
-# Set all local variables
-
-
-source $PWD/scripts/CreaTools-configure.sh
-source $PWD/scripts/CreaTools-names.sh
-
-echo "------"
-echo $PWD/scripts/CreaTools-configure.sh
-echo --generationdir--
-echo $generationdir
-echo --docgeneration--
-echo $docgeneration
-echo --installPrefix--
-echo $installPrefix
-echo --buildType--
-echo $buildType
-echo --gdcmVersion--
-echo $gdcmVersion
-echo --sourcesFrom--
-echo $sourcesFrom
-echo --scriptDir--
-echo $scriptDir
-echo --start_point--
-echo $start_point
-echo "------"
-
-
-
-
-
-
-
-# Remove! JPRx
-# start_point=2
-
-
-
-
-
-
+if [ ! -f $PWD/scripts/CreaTools-configure.sh ]
+then
+ echo
+ echo "..ERROR.."
+ echo "==================================================="
+ echo "REMEMBER !"
+ echo ""
+ echo "YOU NEED TO RUN 'Configure' (0) FIRST !"
+ echo "==================================================="
+ echo
+ echo
+ exit 0
+fi
-mkdir $generationdir
-mkdir $generationdir/creatools_source
-mkdir $generationdir/creatools_bin
+# Set all local variables
-cd $generationdir
-
-
-# --------------------------------
-# start_point = 0 : remove everything that was created before
-#---------------------------------
-if [ $start_point -le 0 ]
-then
-# the following stupid test is used at debug time; Please don't remove!
-#if [ true = false ]
-if [ true = true ]
-then
- rm -rf creatools_bin
- mkdir $generationdir/creatools_bin
- rm -rf creatools_source
- mkdir $generationdir/creatools_source
+ source $PWD/scripts/CreaTools-configure.sh
+ source $PWD/scripts/CreaTools-names.sh
+
+ echo "------"
+ echo $PWD/scripts/CreaTools-configure.sh
+ echo --generationdir--
+ echo $generationdir
+ echo --docgeneration--
+ echo $docgeneration
+ echo --installPrefix--
+ echo $installPrefix
+ echo --buildType--
+ echo $buildType
+ echo --gdcmVersion--
+ echo $gdcmVersion
+ echo --sourcesFrom--
+ echo $sourcesFrom
+ echo --scriptDir--
+ echo $scriptDir
+ echo --start_point--
+ echo $start_point
+ echo "------"
+
+ if [ ! -e $generationdir/creatools_source ]
+ then
+ echo missing $generationdir/creatools_source
+ echo
+ echo "..ERROR.."
+ echo "==================================================="
+ echo "REMEMBER !"
+ echo ""
+ echo "YOU NEED TO RUN 'Load' (2) FIRST !"
+ echo "==================================================="
+ echo
+ echo
+ exit 0
fi
-fi
-
-# ----------------------------------
-# start_point = 1 : Load all sources
-#-----------------------------------
-
-
-if [ $start_point -le 1 ]
-then
- if [ true = true ]
- #if [ true = false ]
- then
-#
- if [ $sourcesFrom = CVS ]
- then
- sh $scriptDir/cvscheckout.sh $creasource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $bbtksource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $creamaracassource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $creaenvironmentsource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $creabrukersource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $creaimagesource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $creacontourssource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $crearigidregistrationssource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $bbtkgeditorsource $generationdir $cvsUserName
- sh $scriptDir/cvscheckout.sh $creatoolssource $generationdir $cvsUserName
- fi
-
- if [ $sourcesFrom = HTML ]
- then
- cd $generationdir/creatools_source
- wwwtargz=http://www.creatis.insa-lyon.fr/software/public/creatools/creaTools/nightly/
- wget $wwwtargz/crea.tgz
- wget $wwwtargz/bbtk.tgz
- wget $wwwtargz/creaMaracasVisu.tgz
- wget $wwwtargz/creaEnvironment.tgz
- wget $wwwtargz/creaBruker.tgz
- wget $wwwtargz/creaImageIO.tgz
- wget $wwwtargz/creaContours.tgz
- wget $wwwtargz/creaRigidRegistration.tgz
- wget $wwwtargz/bbtkGEditor.tgz
- wget $wwwtargz/creaTools.tgz
-
- tar xvzf crea.tgz
- tar xvzf bbtk.tgz
- tar xvzf creaMaracasVisu.tgz
- tar xvzf creaEnvironment.tgz
- tar xvzf creaBruker.tgz
- tar xvzf creaImageIO.tgz
- tar xvzf creaContours.tgz
- tar xvzf creaRigidRegistration.tgz
- tar xvzf bbtkGEditor.tgz
- tar xvzf creaTools.tgz
-
- rm -f *.tgz
- fi
- fi
-fi
cd $scriptDir
creadll=$generationdir/creatools_bin/creaBin
LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
+exit 0
# -------------------------
# start_point = 3 : BBTK
#!/bin/sh
+ if [ ! -f $PWD/scripts/CreaTools-configure.sh ]
+ then
+ echo
+ echo "..ERROR.."
+ echo "==================================================="
+ echo "REMEMBER !"
+ echo ""
+ echo "YOU NEED TO RUN 'Configure' (0) First !"
+ echo "==================================================="
+ echo
+ echo
+ exit 0
+fi
source $PWD/scripts/CreaTools-configure.sh
-echo "------"
-echo $PWD/scripts/CreaTools-configure.sh
-echo generationdir
-echo $generationdir
-echo docgeneration
-echo $docgeneration
-echo installPrefix
-echo $installPrefix
-echo buildType
-echo $buildType
-echo gdcmVersion
-echo $gdcmVersion
-echo sourcesFrom
-echo $sourcesFrom
-echo scriptDir
-echo $scriptDir
-echo start_point
-echo $start_point
-echo "------"
+ echo "------"
+ echo $PWD/scripts/CreaTools-configure.sh
+ echo --generationdir--
+ echo $generationdir
+ echo --docgeneration--
+ echo $docgeneration
+ echo --installPrefix--
+ echo $installPrefix
+ echo --buildType--
+ echo $buildType
+ echo --gdcmVersion--
+ echo $gdcmVersion
+ echo --sourcesFrom--
+ echo $sourcesFrom
+ echo --scriptDir--
+ echo $scriptDir
+ echo --start_point--
+ echo $start_point
+ echo "------"
+
scriptDir=$PWD
sourcesDir=$generationdir/thirdparty_sources
mkdir $sourcesDir
mkdir $binDir
-rm $installPrefix/share/creatools_third_party_library_config.sh
+if [ -f $installPrefix/share/creatools_third_party_library_config.sh ]
+then
+ rm $installPrefix/share/creatools_third_party_library_config.sh
+fi
# the following stupid test is used at debug time; Please don't remove!
if [ true = true ]
if [ $buildType = "Debug" ]
then
-debug="ON"
+ debug="ON"
else
-debug="OFF"
+ debug="OFF"
fi