0 Members and 2 Guests are viewing this topic.
As for sending files to TIEmu, when TIEmu is started:dbus-send --dest=org.ticalc.lpg.tiemu.TiEmuDBus /org/ticalc/lpg/tiemu/TiEmuDBus \ org.ticalc.lpg.tiemu.TiEmuDBus.send_file string:foo.89zqdbus org.ticalc.lpg.tiemu.TiEmuDBus /org/ticalc/lpg/tiemu/TiEmuDBus send_file foo.89zA script which handles starting TIEmu if it's not started yet, sending files to it, and executing a program:#!/bin/bash if qdbus | grep "^ *org.ticalc.lpg.tiemu.TiEmuDBus" > /dev/null ; then : else tiemu & qdbus | grep "^ *org.ticalc.lpg.tiemu.TiEmuDBus" > /dev/null fi while [ $? -ne 0 ] ; do sleep 1 qdbus | grep "^ *org.ticalc.lpg.tiemu.TiEmuDBus" > /dev/null done READY=`qdbus org.ticalc.lpg.tiemu.TiEmuDBus /org/ticalc/lpg/tiemu/TiEmuDBus ready_for_transfers` if [ $? -ne 0 ] ; then echo 'error: ready_for_tranfers failed' exit 1 fi while [ "$READY" == "false" ] ; do sleep 1 READY=`qdbus org.ticalc.lpg.tiemu.TiEmuDBus /org/ticalc/lpg/tiemu/TiEmuDBus ready_for_transfers` if [ $? -ne 0 ] ; then echo 'error: ready_for_tranfers failed' exit 1 fi done while [ -n "$1" ] ; do case "$1" in *.89[a-z]|*.9[2x][a-z]|*.v2[a-z]) SUCCESS=`qdbus org.ticalc.lpg.tiemu.TiEmuDBus /org/ticalc/lpg/tiemu/TiEmuDBus send_file "$1"` if [ $? -ne 0 -o "$SUCCESS" == "false" ] ; then echo 'error: send_file failed' exit 1 fi ;; *) SUCCESS=`qdbus org.ticalc.lpg.tiemu.TiEmuDBus /org/ticalc/lpg/tiemu/TiEmuDBus execute_command "$1"` if [ $? -ne 0 -o "$SUCCESS" == "false" ] ; then echo 'error: execute_command failed' exit 1 fi ;; esac shift done exit 0#Usage:#./tiemudbus.sh tigcc-projects/bgammon/bgammon.89[yz] 'bgammon()'