6 SCR_DIR=`readlink -f $0 | xargs dirname`
7 PROJECT_ROOT=$(readlink -f $SCR_DIR/../../..)
18 [ -n "$msg" ] && echo -e "\n${msg}\n"
28 echo "------------------------------------------------------"
29 echo " AGENTS-ORIENTED TESTING SETUP installation "
30 echo "------------------------------------------------------"
32 [ -d $PROJECT_ROOT/build/Release ] && VARIANT=Release
33 [ -d $PROJECT_ROOT/build/Debug ] && VARIANT=Debug
34 [ -z "$VARIANT" ] && _exit "Cannot locate neither 'Release' nor 'Debug' variant !"
35 build_type_letter=$(echo $VARIANT | cut -c1 | tr '[:upper:]' '[:lower:]')
37 version__dflt=v"`date +'%y'`.`date +'%m'`.`date +'%d'`$build_type_letter"
38 INSTALL_AOTS__dflt=$HOME/3rdParty/anna-aots-builds/v"`date +'%y'`.`date +'%m'`.`date +'%d'`$build_type_letter"
40 echo "Choose the target path for installation [$INSTALL_AOTS__dflt]:"
41 echo " (enter a non-existent directory)"
43 [ -z "$INSTALL_AOTS" ] && INSTALL_AOTS=$INSTALL_AOTS__dflt
44 INSTALL_AOTS=`readlink -m $INSTALL_AOTS`
45 [ -d $INSTALL_AOTS ] && _exit "The target installation directory ($INSTALL_AOTS) already exists ! (if you want to reinstall, remove it first)"
48 echo "Stage 1: Deploying resources ......................"
50 mkdir -p $INSTALL_AOTS
51 cp -r $SCR_DIR/deployments/aots/* $INSTALL_AOTS
53 # VARIABLES ######################################
55 LDIR=${PROJECT_ROOT}/example/diameter/launcher
56 BIN_DIR=${PROJECT_ROOT}/build/$VARIANT/bin
57 LIB_DIR=${PROJECT_ROOT}/build/$VARIANT/lib
60 ADML=${INSTALL_AOTS}/agents/ADML
62 DYNLIBS=${ADML}/dynlibs
63 ##################################################
66 echo "Variant: $VARIANT"
70 mkdir -p ${ADML}/counters
71 mkdir -p ${ADML}/test-reports
74 cp ${PROJECT_ROOT}/example/diameter/launcher/resources/scripts/operation_signal.sh ${ADML}/operation.sh
78 cp ${PROJECT_ROOT}/include/anna/diameter/codec/message.dtd ${DTDs}
79 cp ${PROJECT_ROOT}/include/anna/diameter/stack/dictionary.dtd ${DTDs}
80 cp ${PROJECT_ROOT}/example/diameter/launcher/resources/services_examples/services.dtd ${DTDs}
82 # Main Launcher and dynamic libraries:
83 cp ${BIN_DIR}/anna_diameter_launcher ${ADML}/ADML
84 cp -r $LIB_DIR/dynamic/launcher ${DYNLIBS}
85 cp $LIB_DIR/libanna_testing_shared.so ${DYNLIBS}
87 # Get stuff from leaf directories:
88 cd $LIB_DIR/dynamic/launcher
89 leafs=( $(find . -type d -links 2) )
92 cd ${PROJECT_ROOT}/dynamic/launcher
93 for dir in ${leafs[@]}
95 cp $dir/*.xml ${DYNLIBS}/$dir 2>/dev/null
96 cp $dir/dynamic.suffix ${DYNLIBS}/$dir 2>/dev/null
97 cp -r $dir/services ${DYNLIBS}/$dir 2>/dev/null
101 # ADML dynamic libs selection script:
102 cp ${LDIR}/resources/scripts/select_dynlib.sh ${DYNLIBS}/select.sh
104 # Default dynamic library:
106 ln -sf default/libanna_launcher_procedure_default_shared.so