--- /dev/null
+#!/bin/sh
+
+
+# UNUSED, RIGHT NOW. # JPR
+
+# used by make.sh and make-install.sh (that replace All.sh)
+# use 'source configure.sh'
+
+if [ $# = 0 ]
+then
+echo "Use it as :"
+echo "sh make-install.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType> <GDCM Version> <creaTools sources>"
+echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install"
+echo "with 'GDCM Version' : GDCM1 / GDCM2"
+echo "with 'creaTools sources' : where do you want to get them from ? CVS / HTML"
+echo " "
+echo "ex : sh make-install.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2 HTML"
+exit 0
+fi
+
+echo $#
+echo "----------"
+echo $0
+echo $1
+echo $2
+echo $3
+echo $4
+echo $5
+echo $6
+echo $7
+echo "----------"
+
+if [ $# != 7 ]
+then
+echo "sh make-install.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType> <GDCM Version> <creaTools sources> "
+echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install"
+echo "with 'GDCM Version' : GDCM1 / GDCM2"
+echo "with 'creaTools sources' : where do you want to get them from ? CVS / HTML"
+echo " "
+echo "ex : sh make-install.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2 HTML"
+exit 0
+fi
+
+# @echo off
+
+#allow user to choose the generation dir
+#allow user to choose to generate the doc or not
+
+generationdir=$1
+docGeneration=$2
+cvsUserName=$3
+installPrefix=$4
+buildType=$5
+gdcmVersion=$6
+sourcesFrom=$7
+
+scriptDir=$PWD
+
+
+
+ creadll=$generationdir/creatools_bin/creaBin
+LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
+ bbtkdll=$generationdir/creatools_bin/bbtkBin
+LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
+ creamaracasdll=$generationdir/creatools_bin/creamaracasBin
+LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH
+ creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
+LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH
+ creabrukerdll=$generationdir/creatools_bin/creabrukerBin
+LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH
+ creaimagedll=$generationdir/creatools_bin/creaimageBin
+LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH
+ creacontourdll=$generationdir/creatools_bin/creacontoursBin
+LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH
+ crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
+LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH
+ bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
+LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH
+ creatoolsdll=$generationdir/creatools_bin/creatoolsBin
+LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
+
+
echo "Run it as 'root':"
echo "Use it as :"
-echo "sh make-install.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType> <GDCM Version>"
+echo "sh make-install.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType> <GDCM Version> <creaTools sources>"
echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install"
echo "with 'GDCM Version' : GDCM1 / GDCM2"
+echo "with 'creaTools sources' : where do you want to get them from ? CVS / HTML"
echo " "
-echo "ex : sh make-install.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2"
+echo "ex : sh make-install.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2 HTML"
exit 0
fi
echo $4
echo $5
echo $6
+echo $7
echo "----------"
-if [ $# != 6 ]
+if [ $# != 7 ]
then
-echo "sh make-install.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType> <GDCM Version>"
+echo "sh make-install.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType> <GDCM Version> <creaTools sources> "
echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install"
+echo "with 'GDCM Version' : GDCM1 / GDCM2"
+echo "with 'creaTools sources' : where do you want to get them from ? CVS / HTML"
echo " "
-echo "ex : sh make-install.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2"
+echo "ex : sh make-install.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2 HTML"
exit 0
fi
installPrefix=$4
buildType=$5
gdcmVersion=$6
+sourcesFrom=$7
scriptDir=$PWD
-echo scriptDir
-echo $scriptDir
-
-
-# /// \TODO check if directories exist.
-# /// \ exit 0 if they don't (message: run install.sh first!")
-#mkdir $generationdir
-#mkdir $generationdir/creatools_source
-#mkdir $generationdir/creatools_bin
creasource=crea
bbtksource=bbtk
start_point=0
-# --------------------------------
-# start_point = 1 : remove everything hat was installed before
-#---------------------------------
-if [ $start_point -le 1 ]
-then
-# the following stupid test is used at debug time; Please don't remove!
-#if [ true = false ]
-if [ true = true ]
-then
-
- rm -rf creatools_install/lib/creatools
- rm -rf creatools_install/lib64/creatools
- rm -rf creatools_install/bin/bb*
- rm -rf creatools_install/bin/crea*
- rm -rf creatools_install/include/bb*
- rm -rf creatools_install/include/crea*
- rm -rf creatools_install/share/bb*
- rm -rf creatools_install/share/crea*
-
-#this is for the old versions EED
- rm -rf creatools_install/lib/crea*
- rm -rf creatools_install/lib/libbb*
- rm -rf creatools_install/lib/libcrea*
- rm -rf creatools_install/lib64/crea*
- rm -rf creatools_install/lib64/libbb*
- rm -rf creatools_install/lib64/libcrea*
-fi
-fi
-
cd $scriptDir
if [ $# = 0 ]
then
echo "Use it as :"
-echo "sh make.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType> <GDCM Version>"
+echo "sh make-install.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType> <GDCM Version> <creaTools sources>"
echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install"
echo "with 'GDCM Version' : GDCM1 / GDCM2"
+echo "with 'creaTools sources' : where do you want to get them from ? CVS / HTML"
echo " "
-echo "ex : sh make.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2"
+echo "ex : sh make-install.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2 HTML"
exit 0
fi
echo $4
echo $5
echo $6
+echo $7
echo "----------"
if [ $# != 6 ]
then
-echo "sh make.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType> <GDCM Version>"
+echo "Use it as :"
+echo "sh make-install.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType> <GDCM Version> <creaTools sources>"
echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install"
+echo "with 'GDCM Version' : GDCM1 / GDCM2"
+echo "with 'creaTools sources' : where do you want to get them from ? CVS / HTML"
echo " "
-echo "ex : sh make.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2"
+echo "ex : sh make-install.sh /tmp/gendir OFF jpr /tmp/gendir/creatools_install Debug GDCM2 HTML"
exit 0
fi
#allow user to choose the generation dir
#allow user to choose to generate the doc or not
+#allow user to choose where he wants to get the sources from : CVS / HTML
generationdir=$1
docGeneration=$2
installPrefix=$4
buildType=$5
gdcmVersion=$6
+sourcesFrom=$7
scriptDir=$PWD
-echo scriptDir
-echo $scriptDir
-
-mkdir $generationdir
-mkdir $generationdir/creatools_source
-mkdir $generationdir/creatools_bin
creasource=crea
bbtksource=bbtk
bbtkgeditorsource=bbtkGEditor
creatoolssource=creaTools
+mkdir $generationdir
+mkdir $generationdir/creatools_source
+mkdir $generationdir/creatools_bin
+
cd $generationdir
# start_point : used at debug time : start point of the script
start_point=0
# --------------------------------
-# start_point = 0 : remove everything
+# start_point = 0 : remove everything that was created before
#---------------------------------
if [ $start_point -le 0 ]
then
fi
# ----------------------------------
-# start_point = 1 : checkout all
+# start_point = 1 : Load all sources
#-----------------------------------
if [ $start_point -le 1 ]
then
-#if [ true = false ]
-if [ true = true ]
-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
+ 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
+ echo
+ echo
+ echo
+ echo "Fix the name of the place with tar.gz file "
+ echo
+ echo
+ echo
+ exit 0
+ wget http://www.creatis.insa-lyon.fr/~davila/CreaTools/XXXXXXXX.tgz
+ tar xvzf XXXXXXX.tgz
+
+ fi
+ fi
fi
-fi
-
cd $scriptDir
-
# -------------------------
# start_point = 2 : CREA
#-------------------------
#if [ true = false ]
if [ true = true ]
then
- sh cmakemod.sh $creasource $generationdir $installPrefix $buildType
- sh creaVariables.sh $creasource $generationdir $docgeneration
- sh compilemod.sh $buildType $creasource $generationdir
- sh ctestmod.sh $creasource $generationdir
+ sh cmakemod.sh $creasource $generationdir $installPrefix $buildType
+ sh creaVariables.sh $creasource $generationdir $docgeneration
+ sh compilemod.sh $buildType $creasource $generationdir
+ sh ctestmod.sh $creasource $generationdir
fi
fi
creadll=$generationdir/creatools_bin/creaBin
if [ true = true ]
then
# BBTK
- sh cmakemod.sh $bbtksource $generationdir $installPrefix $buildType
- sh bbtkVariables.sh $bbtksource $generationdir $docgeneration $gdcmVersion
- sh compilemod.sh $buildType $bbtksource $generationdir
- sh ctestmod.sh $bbtksource $generationdir
+ sh cmakemod.sh $bbtksource $generationdir $installPrefix $buildType
+ sh bbtkVariables.sh $bbtksource $generationdir $docgeneration $gdcmVersion
+ sh compilemod.sh $buildType $bbtksource $generationdir
+ sh ctestmod.sh $bbtksource $generationdir
fi
fi
bbtkdll=$generationdir/creatools_bin/bbtkBin
if [ true = true ]
then
# creaMaracasVisu
- sh cmakemod.sh $creamaracassource $generationdir $installPrefix $buildType
- sh creaMaracasVariables.sh $creamaracassource $generationdir $docgeneration
- sh compilemod.sh $buildType $creamaracassource $generationdir
- sh ctestmod.sh $creamaracassource $generationdir
+ sh cmakemod.sh $creamaracassource $generationdir $installPrefix $buildType
+ sh creaMaracasVariables.sh $creamaracassource $generationdir $docgeneration
+ sh compilemod.sh $buildType $creamaracassource $generationdir
+ sh ctestmod.sh $creamaracassource $generationdir
fi
fi
creamaracasdll=$generationdir/creatools_bin/creamaracasBin
then
# creaBruker
sh cmakemod.sh $creabrukersource $generationdir $installPrefix $buildType
- sh creaBrukerVariables.sh $creabrukersource $generationdir $docgeneration $gdcmVersion
+ sh creaBrukerVariables.sh $creabrukersource $generationdir $docgeneration $gdcmVersion
sh compilemod.sh $buildType $creabrukersource $generationdir
- echo generationdir
sh ctestmod.sh $creabrukersource $generationdir
fi
fi
if [ true = true ]
then
# creaImageIO
- sh cmakemod.sh $creaimagesource $generationdir $installPrefix $buildType
- sh creaImageIOVariables.sh $creaimagesource $generationdir $docgeneration $gdcmVersion
+ sh cmakemod.sh $creaimagesource $generationdir $installPrefix $buildType
+ sh creaImageIOVariables.sh $creaimagesource $generationdir $docgeneration $gdcmVersion
sh compilemod.sh $buildType $creaimagesource $generationdir
- sh ctestmod.sh $creaimagesource $generationdir
+ sh ctestmod.sh $creaimagesource $generationdir
fi
fi
creaimagedll=$generationdir/creatools_bin/creaimageBin
if [ true = true ]
then
# creaContours
- sh cmakemod.sh $creacontourssource $generationdir $installPrefix $buildType
- sh creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
- sh compilemod.sh $buildType $creacontourssource $generationdir
- sh ctestmod.sh $creacontourssource $generationdir
+ sh cmakemod.sh $creacontourssource $generationdir $installPrefix $buildType
+ sh creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
+ sh compilemod.sh $buildType $creacontourssource $generationdir
+ sh ctestmod.sh $creacontourssource $generationdir
fi
fi
# creacontourdll=$generationdir/creatools_bin/creacontoursBin
#if [ true = false ]
if [ true = true ]
then
- sh cmakemod.sh $crearigidregistrationssource $generationdir $installPrefix $buildType
- sh creaRigidRegistrationVariables.sh $crearigidregistrationssource $generationdir $docgeneration
- sh compilemod.sh $buildType $crearigidregistrationssource $generationdir
- sh ctestmod.sh $crearigidregistrationssource $generationdir
+ sh cmakemod.sh $crearigidregistrationssource $generationdir $installPrefix $buildType
+ sh creaRigidRegistrationVariables.sh $crearigidregistrationssource $generationdir $docgeneration
+ sh compilemod.sh $buildType $crearigidregistrationssource $generationdir
+ sh ctestmod.sh $crearigidregistrationssource $generationdir
fi
fi
# crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
if [ true = true ]
then
# bbtkGEditor
- sh cmakemod.sh $bbtkgeditorsource $generationdir $installPrefix $buildType
- sh bbtkGEditorVariables.sh $bbtkgeditorsource $generationdir $docgeneration
+ sh cmakemod.sh $bbtkgeditorsource $generationdir $installPrefix $buildType
+ sh bbtkGEditorVariables.sh $bbtkgeditorsource $generationdir $docgeneration
sh compilemod.sh $buildType $bbtkgeditorsource $generationdir
- sh ctestmod.sh $bbtkgeditorsource $generationdir
+ sh ctestmod.sh $bbtkgeditorsource $generationdir
fi
fi
# bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
if [ true = true ]
then
# creaTools
- sh cmakemod.sh $creatoolssource $generationdir $installPrefix $buildType
- sh creaToolsVariables.sh $creatoolssource $generationdir $docgeneration
- sh compilemod.sh $buildType $creatoolssource $generationdir
+ sh cmakemod.sh $creatoolssource $generationdir $installPrefix $buildType
+ sh creaToolsVariables.sh $creatoolssource $generationdir $docgeneration
+ sh compilemod.sh $buildType $creatoolssource $generationdir
fi
fi
# creatoolsdll=$generationdir/creatools_bin/creatoolsBin
# LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH
-
-CREATOOLS_INSTALL_DIR=$installPrefix
-sudo rm $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
-sudo touch $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
-sudo chmod 666 $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
-
-#######################################
-
-sudo touch $installPrefix/share/creatools_base_library_config.sh
-sudo chmod 666 $installPrefix/share/creatools_base_library_config.sh
-
-
-sudo echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
-sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
-sudo echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib64/creatools >> $installPrefix/share/creatools_base_library_config.sh
-
-# modify .bashrc
-# - remove line 'sh $installPrefix/creatools_install/share/creatools_base_party_libraries_config.sh' if any (with accurate value for ???)
-sed -i -e '/.*creatools_base_library_config.*/ d' ~/.bashrc
-
-# - add line 'sh $installPrefix/creatools_install/share/creatools_base_libraries_config.sh' (with accurate value for ???)
-echo [ -f "$installPrefix/share/creatools_base_library_config.sh" ] && source $installPrefix/share/creatools_base_library_config.sh >> ~/.bashrc
-
-
# shutdown /s
# exit /b