deployAtxToRi.sh 1.6 KB
Newer Older
Kevin Kershaw's avatar
Kevin Kershaw committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
#  File:        deployAtxToRi.sh
#  Author:      Nick Nielsen <n.nielsen@cablelabs.com>
#  Date:        Fri Jul 17 16:27:13 2009
#  Description: 
#  This is a batch script that can be used to easily install the ATX 
#  application in the OpenCable tru2way Reference Implementation (RI) stack
#  simulator's execution environment.  

if [ -z "$1" ] ; then 
    echo "Usage:  ./deployAtxToRi.sh [DIR]"
    echo "   where [DIR] is the base directory of the RI to which the ATX"
    echo "   should be deployed (the directory containing the runRI.bat script)."
    exit -1
fi

if [ ! -d "$1" ] ; then
    echo "ERROR: $1 is an invalid directory."
    exit -1
fi

if [ ! -f "$1/runRI.bat" ] ; then
    echo "ERROR: $1 does not contain a valid RI installation (must contain "
    echo "       the \"runRI.bat\" script."
    exit -1
fi

XLET="ATX20/org/cablelabs/ocap/ofa/tests/Host20AppTest.class"

if [ ! -f "$XLET" ] ; then 
    echo "INTERNAL ERROR: the $XLET does not exist!!"
    exit -1
fi

DIR="$1/ocap/bin/CableLabs/simulator/Win32/debug/env/ATX20"
rm -rf "$DIR"
mkdir -p "$DIR"

cp -r ./ATX20/* $DIR/

echo "ATX successfully deployed to: $DIR"
echo
echo "To execute this application in the RI, you must add an entry to the"
echo "ocap-ri\ocap\bin\CableLabs\simulator\Win32\debug\env\hostapp.properties file."
echo 
echo "Here is an example of such an entry:"
echo
echo app.0.application_name=ATX
echo app.0.initial_class_name=org.cablelabs.ocap.ofa.tests.Host20AppTest
echo app.0.application_identifier=0x000000015207
echo app.0.application_control_code=AUTOSTART
echo app.0.visibility=VISIBLE
echo app.0.base_directory=/syscwd/ATX20