From 3455159186bc209620afdc52ef4892875c931968 Mon Sep 17 00:00:00 2001 From: Bernard Jungen Date: Sat, 18 Apr 2009 17:11:43 +0200 Subject: [PATCH] Add "Compile & run" option to main application menu This allows a developer to quickly test his changes without using the CLI. --- ROX-Filer/AppInfo.xml | 3 +++ ROX-Filer/AppRun | 11 +++++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ROX-Filer/AppInfo.xml b/ROX-Filer/AppInfo.xml index 2b7ab468..c77f1de4 100644 --- a/ROX-Filer/AppInfo.xml +++ b/ROX-Filer/AppInfo.xml @@ -97,5 +97,8 @@ + + + diff --git a/ROX-Filer/AppRun b/ROX-Filer/AppRun index 063ba6b1..32e000c3 100755 --- a/ROX-Filer/AppRun +++ b/ROX-Filer/AppRun @@ -11,6 +11,8 @@ if [ "x$MAKE" = x ]; then MAKE=make export MAKE fi +BIN="$APP_DIR/$PROG" + case $1 in --debug) shift ; if [ "$#" = 0 ] ; then @@ -22,6 +24,13 @@ case $1 in --massif) shift ; DEBUGGER="valgrind --tool=massif --alloc-fn=g_malloc --alloc-fn=g_realloc --alloc-fn=g_malloc0 --alloc-fn=g_try_malloc --alloc-fn=g_mem_chunk_alloc";; --calltree) shift ; DEBUGGER="calltree";; --leaks) shift ; DEBUGGER="valgrind --num-callers=8 --leak-check=yes";; + --xmake-and-run-new) + if [ -x "$BIN" ]; then + cd "$APP_DIR/src" && xterm -hold -e $MAKE + else + xterm -hold -e "$0" --compile + fi + exec "$BIN" -n ~ ;; --compile) shift if [ ! -d "$APP_DIR/src" ] ; then @@ -46,8 +55,6 @@ case $1 in exit 1 esac -BIN="$APP_DIR/$PROG" - if [ -x "$BIN" ]; then exec $DEBUGGER "$BIN" $DEBUG_OPTIONS "$@" else -- 2.11.4.GIT