X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=AcessNative%2FRunNative;h=406573db0d20b68b544347d7071819907ad69e60;hb=6274aaa8894e14462a36c69090e2f9235f130e31;hp=255cf83fa5485c9657d9ff2935f08b2e62c25857;hpb=feb0895318d823867b858ec841589ca3ab81f510;p=tpg%2Facess2.git diff --git a/AcessNative/RunNative b/AcessNative/RunNative index 255cf83f..406573db 100755 --- a/AcessNative/RunNative +++ b/AcessNative/RunNative @@ -1,14 +1,42 @@ -#!/bin/sh +#!/bin/bash # # Execute the specified root application using the ARCH=native build # _=$PWD; cd $(dirname $0); DIR=$PWD; cd $_ DISTROOT=$(dirname $DIR)/Usermode/Output/native/ VTERM=/Devices/pts/vt0 +echo $DISTROOT + +KERNEL_PID=$$ +function cleanup { + trap '' SIGINT + echo Cleaning up $KERNEL_PID + kill -INT $KERNEL_PID +} + +trap cleanup SIGINT # 1. Start up AcessKernel # - Set DISTROOT to the output directory of ARCH=native # - Don't start a root application -${DIR}/AcessKernel --distroot $DISTROOT > ${DIR}/log/native_AcessKernel.log & +${DIR}/AcessKernel --distroot $DISTROOT > ${DIR}/log/native_AcessKernel.log 2>&1 & +KERNEL_PID=$! +echo Kernel is $KERNEL_PID sleep 1 -LD_LIBRARY_PATH=${DIR}:${DISTROOT}Libs AN_PREOPEN=$VTERM:$VTERM:$VTERM ${DBG} ${DISTROOT}Apps/AxWin/4.0/AxWinServer + +APP=gui4 + +case $APP in +gui4) + LD_LIBRARY_PATH=${DIR}:${DISTROOT}Libs AN_PREOPEN=$VTERM:$VTERM:$VTERM ${DBG} ${DISTROOT}Apps/AxWin/4.0/AxWinServer + ;; +gui3) + LD_LIBRARY_PATH=${DIR}:${DISTROOT}Libs AN_PREOPEN=$VTERM:$VTERM:$VTERM ${DBG} ${DISTROOT}Apps/AxWin/3.0/AxWinWM + ;; +*) + echo "Unknown application '$APP'" +esac + +trap '' SIGINT +cleanup +