X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Linux%2Fscripts%2FCreaTools-compile.sh;h=72b7311b4835b89832ef97c02e12869ba877ad84;hb=6d26f492da9eea9c4c53600995316af84cca6c1d;hp=e53bc0711f67148b8caaac7703e6f7a826557da0;hpb=a0b3560b65656c6c2601dced3aeddebd66c0ea6d;p=creaToolsTools.git diff --git a/Linux/scripts/CreaTools-compile.sh b/Linux/scripts/CreaTools-compile.sh index e53bc07..72b7311 100644 --- a/Linux/scripts/CreaTools-compile.sh +++ b/Linux/scripts/CreaTools-compile.sh @@ -1,3 +1,27 @@ +# --------------------------------------------------------------------- +# +# Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image +# pour la Santé) +# Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton +# +# This software is governed by the CeCILL-B license under French law and +# abiding by the rules of distribution of free software. You can use, +# modify and/ or redistribute the software under the terms of the CeCILL-B +# license as circulated by CEA, CNRS and INRIA at the following URL +# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html +# or in the file LICENSE.txt. +# +# As a counterpart to the access to the source code and rights to copy, +# modify and redistribute granted by the license, users are provided only +# with a limited warranty and the software's author, the holder of the +# economic rights, and the successive licensors have only limited +# liability. +# +# The fact that you are presently reading this means that you have had +# knowledge of the CeCILL-B license and that you accept its terms. +# ------------------------------------------------------------------------ + + #!/bin/bash if [ ! -f $PWD/scripts/CreaTools-configure.sh ] @@ -23,14 +47,20 @@ fi echo $PWD/scripts/CreaTools-configure.sh echo --generationdir-- echo $generationdir + echo --corenumber-- + echo $corenumber echo --docgeneration-- echo $docgeneration echo --installPrefix-- echo $installPrefix - echo --buildType-- + echo --installPrefixThird-- + echo $installPrefixThird + echo --buildType-- echo $buildType echo --gdcmVersion-- echo $gdcmVersion + echo "--ETC_BASHRC--" + echo $ETC_BASHRC echo --sourcesFrom-- echo $sourcesFrom echo --scriptDir-- @@ -39,6 +69,22 @@ fi echo $start_point echo "------" +if [ ! -f $installPrefixThird/share/creatools_third_party_library_config.sh ] +then + echo missing $installPrefixThird/share/creatools_third_party_library_config.sh + echo + echo "..ERROR.." + echo "===================================================" + echo "REMEMBER !" + echo "" + echo "YOU NEED TO RUN 'Install Third Party Libraries' (1) FIRST !" + echo "===================================================" + echo + echo "Hit any key to continue" + read a + exit 0 +fi + if [ ! -e $generationdir/creatools_source ] then echo missing $generationdir/creatools_source @@ -54,6 +100,22 @@ fi exit 0 fi + +if [ ! -f $installPrefixThird/share/creatools_third_party_library_config.sh ] +then + echo missing $installPrefixThird/share/creatools_third_party_library_config.sh + echo + echo "..ERROR.." + echo "===================================================" + echo "REMEMBER !" + echo "" + echo "YOU NEED TO RUN 'Load' (2) FIRST !" + echo "===================================================" + echo + echo + exit 0 +fi + cd $generationdir if [ -e creatools_bin ] then @@ -71,153 +133,207 @@ then # CREA # the following stupid test is used at debug time; Please don't remove! #if [ true = false ] -if [ true = true ] -then - bash $scriptDir/cmakemod.sh $creasource $generationdir $installPrefix $buildType - bash $scriptDir/creaVariables.sh $creasource $generationdir $docgeneration - bash $scriptDir/compilemod.sh $buildType $creasource $generationdir - bash $scriptDir/ctestmod.sh $creasource $generationdir + if [ true = true ] + then + bash $scriptDir/cmakemod.sh $creasource $generationdir $installPrefix $buildType + bash $scriptDir/creaVariables.sh $creasource $generationdir $docgeneration + bash $scriptDir/compilemod.sh $buildType $creasource $generationdir $corenumber + bash $scriptDir/ctestmod.sh $creasource $generationdir + fi fi +creadll=$generationdir/creatools_bin/creaBin +if [ $OperatingSystem = "MacOS" ] +then + #duplicate form creaTools_name.sh?? //FCY + DYLD_LIBRARY_PATH=$creadll:$DYLD_LIBRARY_$PATH +else + LD_LIBRARY_PATH=$creadll:$LD_LIBRARY_$PATH fi - creadll=$generationdir/creatools_bin/creaBin - LD_LIBRARY_PATH=$creadll:LD_LIBRARY_$PATH - + export crea_DIR=$generationdir/creatools_bin/creaBin # ------------------------- # start_point = 3 : BBTK #------------------------- if [ $start_point -le 3 ] then -# the following stupid test is used at debug time; Please don't remove! -#if [ true = false ] -if [ true = true ] -then -# BBTK -echo ========================================================= $bbtksource $generationdir $installPrefix $buildType - bash $scriptDir/cmakemod.sh $bbtksource $generationdir $installPrefix $buildType - bash $scriptDir/bbtkVariables.sh $bbtksource $generationdir $docgeneration $gdcmVersion - bash $scriptDir/compilemod.sh $buildType $bbtksource $generationdir - bash $scriptDir/ctestmod.sh $bbtksource $generationdir -fi + # the following stupid test is used at debug time; Please don't remove! + #if [ true = false ] + if [ true = true ] + then + # BBTK + echo ========================================================= $bbtksource $generationdir $installPrefix $buildType + bash $scriptDir/cmakemod.sh $bbtksource $generationdir $installPrefix $buildType + bash $scriptDir/bbtkVariables.sh $bbtksource $generationdir $docgeneration $gdcmVersion + bash $scriptDir/compilemod.sh $buildType $bbtksource $generationdir $corenumber + bash $scriptDir/compilemod.sh $buildType $bbtksource $generationdir $corenumber + bash $scriptDir/ctestmod.sh $bbtksource $generationdir + fi fi - bbtkdll=$generationdir/creatools_bin/bbtkBin - LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH +bbtkdll=$generationdir/creatools_bin/bbtkBin +if [ $OperatingSystem = "MacOS" ] +then + #duplicate form creaTools_name.sh?? //FCY + DYLD_LIBRARY_PATH=$bbtkdll:$DYLD_LIBRARY_PATH +else + LD_LIBRARY_PATH=$bbtkdll:$LD_LIBRARY_PATH +fi +export BBTK_DIR=$generationdir/creatools_bin/bbtkBin # ------------------------- # start_point = 4 : creaMaracasVisu #------------------------- if [ $start_point -le 4 ] then -# the following stupid test is used at debug time; Please don't remove! -#if [ true = false ] -if [ true = true ] -then -# creaMaracasVisu - bash $scriptDir/cmakemod.sh $creamaracassource $generationdir $installPrefix $buildType - bash $scriptDir/creaMaracasVariables.sh $creamaracassource $generationdir $docgeneration - bash $scriptDir/compilemod.sh $buildType $creamaracassource $generationdir - bash $scriptDir/ctestmod.sh $creamaracassource $generationdir -fi + # the following stupid test is used at debug time; Please don't remove! + #if [ true = false ] + if [ true = true ] + then + # creaMaracasVisu + bash $scriptDir/cmakemod.sh $creamaracassource $generationdir $installPrefix $buildType + bash $scriptDir/creaMaracasVariables.sh $creamaracassource $generationdir $docgeneration + bash $scriptDir/compilemod.sh $buildType $creamaracassource $generationdir $corenumber + bash $scriptDir/ctestmod.sh $creamaracassource $generationdir + fi fi - creamaracasdll=$generationdir/creatools_bin/creamaracasBin - LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_PATH + creamaracasdll=$generationdir/creatools_bin/creaMaracasVisuBin +if [ $OperatingSystem = "MacOS" ] +then + #duplicate form creaTools_name.sh?? //FCY + DYLD_LIBRARY_PATH=$creamaracasdll:$DYLD_LIBRARY_$PATH +else + LD_LIBRARY_PATH=$creamaracasdll:$LD_LIBRARY_$PATH +fi + + export creaMaracasVisu_DIR=$generationdir/creatools_bin/creaMaracasVisuBin # ------------------------- # start_point = 5 : creaEnvironment #------------------------- if [ $start_point -le 5 ] then -# the following stupid test is used at debug time; Please don't remove! -#if [ true = false ] -if [ true = true ] -then -# creaEnvironment - bash $scriptDir/cmakemod.sh $creaenvironmentsource $generationdir $installPrefix $buildType - bash $scriptDir/creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration - bash $scriptDir/compilemod.sh $buildType $creaenvironmentsource $generationdir - bash $scriptDir/ctestmod.sh $creaenvironmentsource $generationdir + # the following stupid test is used at debug time; Please don't remove! + #if [ true = false ] + if [ true = true ] + then + # creaEnvironment + bash $scriptDir/cmakemod.sh $creaenvironmentsource $generationdir $installPrefix $buildType + bash $scriptDir/creaenvironmentVariables.sh $creaenvironmentsource $generationdir $docgeneration + bash $scriptDir/compilemod.sh $buildType $creaenvironmentsource $generationdir $corenumber + bash $scriptDir/ctestmod.sh $creaenvironmentsource $generationdir + fi fi +creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin + +if [ $OperatingSystem = "MacOS" ] +then + #duplicate form creaTools_name.sh?? //FCY + DYLD_LIBRARY_PATH=$creaenvironmentdll:$DYLD_LIBRARY_$PATH +else + LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_$PATH fi - creaenvironmentdll=$generationdir/creatools_bin/creaenvironmentBin - LD_LIBRARY_PATH=$creaenvironmentdll:$LD_LIBRARY_PATH + export creaEnvironment_DIR=$generationdir/creatools_bin/creaEnvironmentBin # ------------------------- # start_point = 6 : creaBruker #------------------------- if [ $start_point -le 6 ] then -# the following stupid test is used at debug time; Please don't remove! -#if [ true = false ] -if [ true = true ] -then -# creaBruker - bash $scriptDir/cmakemod.sh $creabrukersource $generationdir $installPrefix $buildType - bash $scriptDir/creaBrukerVariables.sh $creabrukersource $generationdir $docgeneration $gdcmVersion - bash $scriptDir/compilemod.sh $buildType $creabrukersource $generationdir - bash $scriptDir/ctestmod.sh $creabrukersource $generationdir + # the following stupid test is used at debug time; Please don't remove! + #if [ true = false ] + if [ true = true ] + then + # creaBruker + bash $scriptDir/cmakemod.sh $creabrukersource $generationdir $installPrefix $buildType + bash $scriptDir/creaBrukerVariables.sh $creabrukersource $generationdir $docgeneration $gdcmVersion + bash $scriptDir/compilemod.sh $buildType $creabrukersource $generationdir $corenumber + bash $scriptDir/ctestmod.sh $creabrukersource $generationdir + fi fi -fi - creabrukerdll=$generationdir/creatools_bin/creabrukerBin - LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_PATH - +creabrukerdll=$generationdir/creatools_bin/creabrukerBin + +if [ $OperatingSystem = "MacOS" ] +then + #duplicate form creaTools_name.sh?? //FCY + DYLD_LIBRARY_PATH=$creabrukerdll:$DYLD_LIBRARY_$PATH +else + LD_LIBRARY_PATH=$creabrukerdll:$LD_LIBRARY_$PATH +fi + + export creaBruker_DIR=$generationdir/creatools_bin/creaBrukerBin # ------------------------- # start_point = 7 : creaImageIO #------------------------- if [ $start_point -le 7 ] then - # the following stupid test is used at debug time; Please don't remove! -#if [ true = false ] -if [ true = true ] -then -# creaImageIO - bash $scriptDir/cmakemod.sh $creaimagesource $generationdir $installPrefix $buildType - bash $scriptDir/creaImageIOVariables.sh $creaimagesource $generationdir $docgeneration $gdcmVersion - bash $scriptDir/compilemod.sh $buildType $creaimagesource $generationdir - bash $scriptDir/ctestmod.sh $creaimagesource $generationdir + # the following stupid test is used at debug time; Please don't remove! + #if [ true = false ] + if [ true = true ] + then + # creaImageIO + bash $scriptDir/cmakemod.sh $creaimagesource $generationdir $installPrefix $buildType + bash $scriptDir/creaImageIOVariables.sh $creaimagesource $generationdir $docgeneration $gdcmVersion + bash $scriptDir/compilemod.sh $buildType $creaimagesource $generationdir $corenumber + bash $scriptDir/ctestmod.sh $creaimagesource $generationdir + fi fi +creaimagedll=$generationdir/creatools_bin/creaimageBin + +if [ $OperatingSystem = "MacOS" ] +then + #duplicate form creaTools_name.sh?? //FCY + DYLD_LIBRARY_PATH=$creaimagedll:$DYLD_LIBRARY_$PATH +else + LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_$PATH fi - creaimagedll=$generationdir/creatools_bin/creaimageBin - LD_LIBRARY_PATH=$creaimagedll:$LD_LIBRARY_PATH +export creaImageIO_DIR=$generationdir/creatools_bin/creaImageIOBin # ------------------------- # start_point = 8 : creaContour #------------------------- if [ $start_point -le 8 ] then -# the following stupid test is used at debug time; Please don't remove! -#if [ true = false ] -if [ true = true ] -then -# creaContours - bash $scriptDir/cmakemod.sh $creacontourssource $generationdir $installPrefix $buildType - bash $scriptDir/creaContoursVariables.sh $creacontourssource $generationdir $docgeneration - bash $scriptDir/compilemod.sh $buildType $creacontourssource $generationdir - bash $scriptDir/ctestmod.sh $creacontourssource $generationdir + # the following stupid test is used at debug time; Please don't remove! + #if [ true = false ] + if [ true = true ] + then + # creaContours + bash $scriptDir/cmakemod.sh $creacontourssource $generationdir $installPrefix $buildType + bash $scriptDir/creaContoursVariables.sh $creacontourssource $generationdir $docgeneration + bash $scriptDir/compilemod.sh $buildType $creacontourssource $generationdir $corenumber + bash $scriptDir/ctestmod.sh $creacontourssource $generationdir + fi fi + creacontourdll=$generationdir/creatools_bin/creacontoursBin + +if [ $OperatingSystem = "MacOS" ] +then + #duplicate form creaTools_name.sh?? //FCY + DYLD_LIBRARY_PATH=$creacontoursdll:$DYLD_LIBRARY_$PATH +else + LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_$PATH fi -# creacontourdll=$generationdir/creatools_bin/creacontoursBin -# LD_LIBRARY_PATH=$creacontoursdll:$LD_LIBRARY_PATH + export creaContours_DIR=$generationdir/creatools_bin/creaContoursBin # ------------------------- # start_point = 9 : creaRigidRegistration #------------------------- if [ $start_point -le 9 ] then -# the following stupid test is used at debug time; Please don't remove! -#if [ true = false ] -if [ true = true ] -then - bash $scriptDir/cmakemod.sh $crearigidregistrationssource $generationdir $installPrefix $buildType - bash $scriptDir/creaRigidRegistrationVariables.sh $crearigidregistrationssource $generationdir $docgeneration - bash $scriptDir/compilemod.sh $buildType $crearigidregistrationssource $generationdir - bash $scriptDir/ctestmod.sh $crearigidregistrationssource $generationdir -fi + # the following stupid test is used at debug time; Please don't remove! + #if [ true = false ] + if [ true = true ] + then + bash $scriptDir/cmakemod.sh $crearigidregistrationssource $generationdir $installPrefix $buildType + bash $scriptDir/creaRigidRegistrationVariables.sh $crearigidregistrationssource $generationdir $docgeneration + bash $scriptDir/compilemod.sh $buildType $crearigidregistrationssource $generationdir $corenumber + bash $scriptDir/ctestmod.sh $crearigidregistrationssource $generationdir + fi fi # crearigidregistrationdll=$generationdir/creatools_bin/crearigidregistrationBin # LD_LIBRARY_PATH=$crearigidregistrationdll:$LD_LIBRARY_PATH @@ -228,35 +344,53 @@ fi #------------------------- if [ $start_point -le 10 ] then -# the following stupid test is used at debug time; Please don't remove! -#if [ true = false ] -if [ true = true ] -then -# bbtkGEditor - bash $scriptDir/cmakemod.sh $bbtkgeditorsource $generationdir $installPrefix $buildType - bash $scriptDir/bbtkGEditorVariables.sh $bbtkgeditorsource $generationdir $docgeneration - bash $scriptDir/compilemod.sh $buildType $bbtkgeditorsource $generationdir - bash $scriptDir/ctestmod.sh $bbtkgeditorsource $generationdir -fi + # the following stupid test is used at debug time; Please don't remove! + #if [ true = false ] + if [ true = true ] + then + # bbtkGEditor + bash $scriptDir/cmakemod.sh $bbtkgeditorsource $generationdir $installPrefix $buildType + bash $scriptDir/bbtkGEditorVariables.sh $bbtkgeditorsource $generationdir $docgeneration + bash $scriptDir/compilemod.sh $buildType $bbtkgeditorsource $generationdir $corenumber + bash $scriptDir/ctestmod.sh $bbtkgeditorsource $generationdir + fi fi # bbtkgeditordll=$generationdir/creatools_bin/bbtkgeditorBin # LD_LIBRARY_PATH=$bbtkgeditordll:$LD_LIBRARY_PATH # ------------------------- -# start_point = 11 : creaTools +# start_point = 11 : libido #------------------------- -if [ $start_point -le 11 ] -then -# the following stupid test is used at debug time; Please don't remove! -#if [ true = false ] -if [ true = true ] +#if [ $start_point -le 11 ] +#then + ## the following stupid test is used at debug time; Please don't remove! + ##if [ true = false ] + #if [ true = true ] + #then + ## creaTools + # bash $scriptDir/cmakemod.sh $libidosource $generationdir $installPrefix $buildType + # bash $scriptDir/libidoVariables.sh $libidosource $generationdir $docgeneration + # bash $scriptDir/compilemod.sh $buildType $libidosource $generationdir $corenumber + #fi +#fi + + + +# ------------------------- +# start_point = 12 : creaTools +#------------------------- +if [ $start_point -le 12 ] then -# creaTools - bash $scriptDir/cmakemod.sh $creatoolssource $generationdir $installPrefix $buildType - bash $scriptDir/creaToolsVariables.sh $creatoolssource $generationdir $docgeneration - bash $scriptDir/compilemod.sh $buildType $creatoolssource $generationdir -fi + # the following stupid test is used at debug time; Please don't remove! + #if [ true = false ] + if [ true = true ] + then + # creaTools + bash $scriptDir/cmakemod.sh $creatoolssource $generationdir $installPrefix $buildType + bash $scriptDir/creaToolsVariables.sh $creatoolssource $generationdir $docgeneration + bash $scriptDir/compilemod.sh $buildType $creatoolssource $generationdir $corenumber + fi fi @@ -264,5 +398,54 @@ fi # creatoolsdll=$generationdir/creatools_bin/creatoolsBin # LD_LIBRARY_PATH=$creatoolssdll:$LD_LIBRARY_PATH + +# ------------------------- +# start_point = 13 : creaMiniTools +#------------------------- +if [ $start_point -le 13 ] +then + # the following stupid test is used at debug time; Please don't remove! + #if [ true = false ] + if [ true = true ] + then + # creaMiniTools + bash $scriptDir/cmakemod.sh $creaminitoolssource $generationdir $installPrefix $buildType + bash $scriptDir/creaMiniToolsVariables.sh $creaminitoolssource $generationdir $docgeneration + bash $scriptDir/compilemod.sh $buildType $creaminitoolssource $generationdir $corenumber + fi +fi + + +# ------------------------- +# start_point = 14 : creaVtk +#------------------------- +if [ $start_point -le 14 ] +then + # the following stupid test is used at debug time; Please don't remove! + #if [ true = false ] + if [ true = true ] + then + # creaVtk + bash $scriptDir/cmakemod.sh $creavtksource $generationdir $installPrefix $buildType + bash $scriptDir/creaVtkVariables.sh $creavtksource $generationdir $docgeneration + bash $scriptDir/compilemod.sh $buildType $creavtksource $generationdir $corenumber + bash $scriptDir/ctestmod.sh $creavtksource $generationdir + fi +fi + creavtkdll=$generationdir/creatools_bin/creaVtkBin + +if [ $OperatingSystem = "MacOS" ] +then + #duplicate form creaTools_name.sh?? //FCY + DYLD_LIBRARY_PATH=$creavtkdll:$DYLD_LIBRARY_$PATH +else + LD_LIBRARY_PATH=$creavtkdll:$LD_LIBRARY_$PATH +fi + + export creaVtk_DIR=$generationdir/creatools_bin/creaVtkBin + + + + # shutdown /s # exit /b