From cbd070dd5de9f5454f43c3383d9fa7a696d2153a Mon Sep 17 00:00:00 2001 From: Jonathan Bauer Date: Thu, 24 Mar 2011 16:36:44 +0100 Subject: usage info update --- src/main.cpp | 12 +++++++----- src/testApp.sh | 23 +++++++++++++++-------- 2 files changed, 22 insertions(+), 13 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index 2860e25..c4902c6 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -11,11 +11,13 @@ void printHelp() QTextStream qout(stdout); qout << QObject::tr("Usage: ./fbgui [OPTIONS]") << endl; qout << QObject::tr("Options:") << endl; - qout << "-u , --url= " << QObject::tr("Set which URL to load.") << endl; - qout << "-d , --download= " << QObject::tr("Specify the download directory.") << endl; - qout << "-c , --config= " << QObject::tr("Path to config file.") << endl; - qout << "-D , --debug= " << QObject::tr("Activate debug mode.") << endl; - qout << "-h, --help " << QObject::tr("Prints usage information.") << endl; + qout << "-c , --config= " << QObject::tr("Path to configuration file.") << endl; + qout << "-u , --url= " << QObject::tr("Sets the URL to be loaded.") << endl; + qout << "-d , --download= " << QObject::tr("Specify the download directory.") << endl; + qout << "-t " << QObject::tr("Specify location of the file triggering the URL load.") << endl; + qout << "-s " << QObject::tr("Specify location of the file containing the serial number.") << endl; + qout << "-D , --debug= " << QObject::tr("Activate debug mode. [0,1]") << endl; + qout << "-h, --help " << QObject::tr("Prints this help.") << endl; qout.flush(); exit(EXIT_SUCCESS); } diff --git a/src/testApp.sh b/src/testApp.sh index b5303c8..0ae691e 100755 --- a/src/testApp.sh +++ b/src/testApp.sh @@ -1,20 +1,27 @@ #!/bin/sh # Script now simply passes all arguments to the fbgui call. # Use: ./testApp.sh [OPTIONS] -# OPTIONS: -D, --debug -# -u , --url= -# -d , --download= absolute dir for downloads. -# -c , --config= path to config file. -# +# OPTIONS: +# -h, --help prints help +# -D , --debug= sets debug level [0,1] +# -u , --url= sets URL to load +# -d , --download= sets download directory (absolute) +# -c , --config= sets path to config file (absolute) +# -t , --trigger= sets path to file triggering URL load +# -s , --serial= sets path to serial number file +# +# Note: all path are expected to be absolute. +# rm -rf /tmp/fbgui script_path="$(cd "${0%/*}" 2>/dev/null; echo "$PWD"/"${0##*/}")" # to get the path only - not the script name - add working_path=`dirname "$script_path"` display_id=$(grep -n $(whoami) /etc/passwd| head -n 1|awk -F : '{print $1}') -# Start QT's virtual framebuffer with proper displayID + +# Start QT's virtual framebuffer with proper display_id /usr/local/Trolltech/Qt-4.7.2/bin/qvfb -width 1024 -height 768 -qwsdisplay :$display_id & -sleep 0.5 -# Start fbgui. +sleep 0.2 +# Start fbgui connecting to QVFb with display_id from above. $working_path/fbgui -display QVFb:$display_id $@ # Check if fbbrowser is not running, if so kill the qvfb. if [ $(ps aux | grep -v grep | grep -c fbgui) -eq 1 ] -- cgit v1.2.3-55-g7522