#allow user to choose to generate the doc or not
generationdir=$1
+docGeneration=$2
cvsUserName=$3
installPrefix=$4
buildType=$5
fi
creadll=$generationdir/creatools_bin/creaBin
LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
-
# -------------------------
if [ true = true ]
then
# creaBruker
- sh cmakemod.sh $creabrukersource $generationdir $installPrefix $buildType
- sh creaBrukerVariables.sh $creabrukersource $generationdir $docgeneration $gdcmVersion
- sh compilemod.sh $buildType $creabrukersource $generationdir
+ sh cmakemod.sh $creabrukersource $generationdir $installPrefix $buildType
+ sh creaBrukerVariables.sh $creabrukersource $generationdir $docgeneration $gdcmVersion
+ sh compilemod.sh $buildType $creabrukersource $generationdir
echo generationdir
- sh ctestmod.sh $creabrukersource $generationdir
+ sh ctestmod.sh $creabrukersource $generationdir
fi
fi
creabrukerdll=$generationdir/creatools_bin/creabrukerBin
# creaImageIO
sh cmakemod.sh $creaimagesource $generationdir $installPrefix $buildType
sh creaImageIOVariables.sh $creaimagesource $generationdir $docgeneration $gdcmVersion
- sh compilemod.sh $buildType $creaimagesource $generationdir
+ sh compilemod.sh $buildType $creaimagesource $generationdir
sh ctestmod.sh $creaimagesource $generationdir
fi
fi
# creaContours
sh cmakemod.sh $creacontourssource $generationdir $installPrefix $buildType
sh creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
- sh compilemod.sh $buildType $creacontourssource $generationdir
+ sh compilemod.sh $buildType $creacontourssource $generationdir
sh ctestmod.sh $creacontourssource $generationdir
fi
fi
then
sh cmakemod.sh $crearigidregistrationssource $generationdir $installPrefix $buildType
sh creaRigidRegistrationVariables.sh $crearigidregistrationssource $generationdir $docgeneration
- sh compilemod.sh $buildType $crearigidregistrationssource $generationdir
+ sh compilemod.sh $buildType $crearigidregistrationssource $generationdir
sh ctestmod.sh $crearigidregistrationssource $generationdir
fi
fi
# bbtkGEditor
sh cmakemod.sh $bbtkgeditorsource $generationdir $installPrefix $buildType
sh bbtkGEditorVariables.sh $bbtkgeditorsource $generationdir $docgeneration
- sh compilemod.sh $buildType $bbtkgeditorsource $generationdir
+ sh compilemod.sh $buildType $bbtkgeditorsource $generationdir
sh ctestmod.sh $bbtkgeditorsource $generationdir
fi
fi
# creaTools
sh cmakemod.sh $creatoolssource $generationdir $installPrefix $buildType
sh creaToolsVariables.sh $creatoolssource $generationdir $docgeneration
- sh compilemod.sh $buildType $creatoolssource $generationdir
+ sh compilemod.sh $buildType $creatoolssource $generationdir
fi
fi
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 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
binfolder=$2/creatools_bin/$1Bin
cd $binfolder
+
# use GDCM1 as default !
-if [ $4 = "GDCM2" ]
+if [ $4 = GDCM2 ]
then
-boolgdcm2 = ON
-boolgdcm1 = OFF
+boolgdcm2=ON
+boolgdcm1=OFF
else
-boolgdcm2 = OFF
-boolgdcm1 = ON
+boolgdcm2=OFF
+boolgdcm1=ON
fi
-cmake -D --BUILD_ALL:BOOL=ON -D crea_DIR:PATH=$2/creatools_bin/creaBin CMakeCache.txt
-cmake -D BUILD_BBTK_DOC:BOOL=$3 -D BUILD_BBTK_DOC_GUIDES_HTML:BOOL=$3 -D BUILD_BBTK_DOC_GUIDES_PDF:BOOL=$3 -D BUILD_BBTK_DOC_DOXYGEN:BOOL=$3 -D BUILD_BBTK_DOC_PACKAGE:BOOL=$3 -D USE_GDCM2:BOOL=$boolgdcm2 -D USE_GDCM:BOOL=$boolgdcm1 CMakeCache.txt
+cmake -D --BUILD_ALL:BOOL=ON -D crea_DIR:PATH=$2/creatools_bin/creaBin -D USE_GDCM2:BOOL=$boolgdcm2 -D USE_GDCM:BOOL=$boolgdcm1 CMakeCache.txt
+cmake CMakeCache.txt
+cmake CMakeCache.txt
cmake CMakeCache.txt
cmake CMakeCache.txt
cmake CMakeCache.txt
+cmake CMakeCache.txt
+cmake -D --BUILD_ALL:BOOL=OFF -D BUILD_BBTK_DOC:BOOL=$3 -D BUILD_BBTK_DOC_GUIDES_HTML:BOOL=$3 -D BUILD_BBTK_DOC_GUIDES_PDF:BOOL=$3 -D BUILD_BBTK_DOC_DOXYGEN:BOOL=$3 -D BUILD_BBTK_DOC_PACKAGE:BOOL=$3 CMakeCache.txt
+
cd ..
dirInstall=$currentdir/creatools_bin/$1Bin
buildType=$4
+echo " "
+echo " "
+echo " "
+echo " "
+echo " ========================================================================== $1 ======================================================== "
+echo " "
+echo " "
+echo " "
+echo " "
if [ $buildType = "Debug" ]
then
-echo "=in ctestmod ===========================================$2/creatools_bin/$1Bin"
+
cd $2/creatools_bin/$1Bin
/usr/bin/ctest -D ExperimentalConfigure -D ExperimentalBuild
if [ $# = 0 ]
then
+
+echo "Run it as 'root':"
echo "Use it as :"
echo "sh make-install.sh <nameOfTheGenerationDirectory> <BooleanForDocGeneration> <userNameForCVS> <installPrefix> <buildType> <GDCM Version>"
echo "with 'installPrefix' : /usr/local or <directory where you want to generate>/creatools_install"
#allow user to choose to generate the doc or not
generationdir=$1
+docGeneration=$2
cvsUserName=$3
installPrefix=$4
buildType=$5
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 [ true = false ]
if [ true = true ]
then
- sh compilemod.sh $buildType $creasource $generationdir
+ sh installmod.sh $buildType $creasource $generationdir
fi
fi
if [ true = true ]
then
# BBTK
- sh compilemod.sh $buildType $bbtksource $generationdir
+ sh installmod.sh $buildType $bbtksource $generationdir
fi
fi
bbtkdll=$generationdir/creatools_bin/bbtkBin
if [ true = true ]
then
# creaMaracasVisu
- sh compilemod.sh $buildType $creamaracassource $generationdir
+ sh installmod.sh $buildType $creamaracassource $generationdir
fi
fi
creamaracasdll=$generationdir/creatools_bin/creamaracasBin
if [ true = true ]
then
# creaEnvironment
- sh compilemod.sh $buildType $creaenvironmentsource $generationdir
+ sh installmod.sh $buildType $creaenvironmentsource $generationdir
fi
fi
creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin
if [ true = true ]
then
# creaBruker
- sh compilemod.sh $buildType $creabrukersource $generationdir
+ sh installmod.sh $buildType $creabrukersource $generationdir
echo generationdir
fi
fi
if [ true = true ]
then
# creaImageIO
- sh compilemod.sh $buildType $creaimagesource $generationdir
+ sh installmod.sh $buildType $creaimagesource $generationdir
fi
fi
creaimagedll=$generationdir/creatools_bin/creaimageBin
if [ true = true ]
then
# creaContours
- sh compilemod.sh $buildType $creacontourssource $generationdir
+ sh installmod.sh $buildType $creacontourssource $generationdir
fi
fi
# creacontourdll=$generationdir/creatools_bin/creacontoursBin
#if [ true = false ]
if [ true = true ]
then
- sh compilemod.sh $buildType $crearigidregistrationssource $generationdir
+ sh installmod.sh $buildType $crearigidregistrationssource $generationdir
fi
fi
# crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin
if [ true = true ]
then
# bbtkGEditor
- sh compilemod.sh $buildType $bbtkgeditorsource $generationdir
+ sh installmod.sh $buildType $bbtkgeditorsource $generationdir
fi
fi
# bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin
if [ true = true ]
then
# creaTools
- sh compilemod.sh $buildType $creatoolssource $generationdir
+ sh installmod.sh $buildType $creatoolssource $generationdir
fi
fi
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
+rm $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
+touch $CREATOOLS_INSTALL_DIR/share/creatools_base_library_config.sh
+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
+touch $installPrefix/share/creatools_base_library_config.sh
+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
+echo export PATH='$'PATH:$installPrefix/bin >> $installPrefix/share/creatools_base_library_config.sh
+echo export LD_LIBRARY_PATH='$'LD_LIBRARY_PATH:$installPrefix/lib/creatools >> $installPrefix/share/creatools_base_library_config.sh
+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 ???)
#allow user to choose to generate the doc or not
generationdir=$1
+docGeneration=$2
cvsUserName=$3
installPrefix=$4
buildType=$5
start_point=0
-
-
-# ----------------------------------
-# start_point = 0 : checkout all
-#-----------------------------------
-if [ $start_point -le 0 ]
-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
-fi
-fi
-
# --------------------------------
-# start_point = 1 : remove everything but source files
+# start_point = 0 : remove everything
#---------------------------------
-if [ $start_point -le 1 ]
+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
- sudo rm -rf creatools_bin
+ rm -rf creatools_bin
mkdir $generationdir/creatools_bin
- sudo rm -rf creatools_source
+ rm -rf creatools_source
mkdir $generationdir/creatools_source
-
- sudo rm -rf creatools_install/lib/creatools
- sudo rm -rf creatools_install/lib64/creatools
- sudo rm -rf creatools_install/bin/bb*
- sudo rm -rf creatools_install/bin/crea*
- sudo rm -rf creatools_install/include/bb*
- sudo rm -rf creatools_install/include/crea*
- sudo rm -rf creatools_install/share/bb*
- sudo rm -rf creatools_install/share/crea*
-
-#this is for the old versions EED
- sudo rm -rf creatools_install/lib/crea*
- sudo rm -rf creatools_install/lib/libbb*
- sudo rm -rf creatools_install/lib/libcrea*
- sudo rm -rf creatools_install/lib64/crea*
- sudo rm -rf creatools_install/lib64/libbb*
- sudo rm -rf creatools_install/lib64/libcrea*
fi
fi
-
# ----------------------------------
# start_point = 1 : checkout all
#-----------------------------------
fi
fi
+
+
cd $scriptDir
fi
creadll=$generationdir/creatools_bin/creaBin
LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH
-
+
# -------------------------
# BBTK
sh cmakemod.sh $bbtksource $generationdir $installPrefix $buildType
sh bbtkVariables.sh $bbtksource $generationdir $docgeneration $gdcmVersion
- sh compilemod.sh $buildType $bbtksource $generationdir
+ sh compilemod.sh $buildType $bbtksource $generationdir
sh ctestmod.sh $bbtksource $generationdir
fi
fi
bbtkdll=$generationdir/creatools_bin/bbtkBin
LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH
+ exit 0
# -------------------------
# start_point = 4 : creaMaracasVisu
if [ true = true ]
then
# creaBruker
- sh cmakemod.sh $creabrukersource $generationdir $installPrefix $buildType
- sh creaBrukerVariables.sh $creabrukersource $generationdir $docgeneration $gdcmVersion
- sh compilemod.sh $buildType $creabrukersource $generationdir
+ sh cmakemod.sh $creabrukersource $generationdir $installPrefix $buildType
+ sh creaBrukerVariables.sh $creabrukersource $generationdir $docgeneration $gdcmVersion
+ sh compilemod.sh $buildType $creabrukersource $generationdir
echo generationdir
- sh ctestmod.sh $creabrukersource $generationdir
+ sh ctestmod.sh $creabrukersource $generationdir
fi
fi
creabrukerdll=$generationdir/creatools_bin/creabrukerBin
# creaImageIO
sh cmakemod.sh $creaimagesource $generationdir $installPrefix $buildType
sh creaImageIOVariables.sh $creaimagesource $generationdir $docgeneration $gdcmVersion
- sh compilemod.sh $buildType $creaimagesource $generationdir
+ sh compilemod.sh $buildType $creaimagesource $generationdir
sh ctestmod.sh $creaimagesource $generationdir
fi
fi
# creaContours
sh cmakemod.sh $creacontourssource $generationdir $installPrefix $buildType
sh creaContoursVariables.sh $creacontourssource $generationdir $docgeneration
- sh compilemod.sh $buildType $creacontourssource $generationdir
+ sh compilemod.sh $buildType $creacontourssource $generationdir
sh ctestmod.sh $creacontourssource $generationdir
fi
fi
then
sh cmakemod.sh $crearigidregistrationssource $generationdir $installPrefix $buildType
sh creaRigidRegistrationVariables.sh $crearigidregistrationssource $generationdir $docgeneration
- sh compilemod.sh $buildType $crearigidregistrationssource $generationdir
+ sh compilemod.sh $buildType $crearigidregistrationssource $generationdir
sh ctestmod.sh $crearigidregistrationssource $generationdir
fi
fi
# bbtkGEditor
sh cmakemod.sh $bbtkgeditorsource $generationdir $installPrefix $buildType
sh bbtkGEditorVariables.sh $bbtkgeditorsource $generationdir $docgeneration
- sh compilemod.sh $buildType $bbtkgeditorsource $generationdir
+ sh compilemod.sh $buildType $bbtkgeditorsource $generationdir
sh ctestmod.sh $bbtkgeditorsource $generationdir
fi
fi
# creaTools
sh cmakemod.sh $creatoolssource $generationdir $installPrefix $buildType
sh creaToolsVariables.sh $creatoolssource $generationdir $docgeneration
- sh compilemod.sh $buildType $creatoolssource $generationdir
+ sh compilemod.sh $buildType $creatoolssource $generationdir
fi
fi
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 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
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 source $installPrefix/share/creatools_base_library_config.sh >> ~/.bashrc
+echo [ -f "$installPrefix/share/creatools_base_library_config.sh" ] && source $installPrefix/share/creatools_base_library_config.sh >> ~/.bashrc
# shutdown /s