Usermode/ld-acess - Clean up loadlib.c, improved debug
[tpg/acess2.git] / AcessNative / RunNative
1 #!/bin/bash
2 #
3 # Execute the specified root application using the ARCH=native build
4 #
5 _=$PWD; cd $(dirname $0); DIR=$PWD; cd $_
6 DISTROOT=$(dirname $DIR)/Usermode/Output/native/
7 VTERM=/Devices/pts/vt0
8 echo $DISTROOT
9
10 KERNEL_PID=$$
11 function cleanup {
12         trap '' SIGINT
13         echo Cleaning up $KERNEL_PID
14         kill -INT $KERNEL_PID
15 }
16
17 trap cleanup SIGINT
18
19 # 1. Start up AcessKernel
20 # - Set DISTROOT to the output directory of ARCH=native
21 # - Don't start a root application
22 ${DIR}/AcessKernel --distroot $DISTROOT > ${DIR}/log/native_AcessKernel.log 2>&1 &
23 KERNEL_PID=$!
24 echo Kernel is $KERNEL_PID
25 sleep 1
26
27 APP=gui4
28
29 case $APP in
30 gui4)
31         LD_LIBRARY_PATH=${DIR}:${DISTROOT}Libs AN_PREOPEN=$VTERM:$VTERM:$VTERM ${DBG} ${DISTROOT}Apps/AxWin/4.0/AxWinServer
32         ;;
33 gui3)
34         LD_LIBRARY_PATH=${DIR}:${DISTROOT}Libs AN_PREOPEN=$VTERM:$VTERM:$VTERM ${DBG} ${DISTROOT}Apps/AxWin/3.0/AxWinWM
35         ;;
36 *)
37         echo "Unknown application '$APP'"
38 esac
39
40 trap '' SIGINT
41 cleanup
42

UCC git Repository :: git.ucc.asn.au