diff options
author | Jonathan Bauer | 2011-03-24 16:36:44 +0100 |
---|---|---|
committer | Jonathan Bauer | 2011-03-24 16:36:44 +0100 |
commit | cbd070dd5de9f5454f43c3383d9fa7a696d2153a (patch) | |
tree | 1605ec5a5239973dbd0ae2b1cf2caf3bfc0c6d12 /src | |
parent | 2nd batch (diff) | |
download | fbgui-cbd070dd5de9f5454f43c3383d9fa7a696d2153a.tar.gz fbgui-cbd070dd5de9f5454f43c3383d9fa7a696d2153a.tar.xz fbgui-cbd070dd5de9f5454f43c3383d9fa7a696d2153a.zip |
usage info update
Diffstat (limited to 'src')
-rw-r--r-- | src/main.cpp | 12 | ||||
-rwxr-xr-x | src/testApp.sh | 23 |
2 files changed, 22 insertions, 13 deletions
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>, --url=<URL> " << QObject::tr("Set which URL to load.") << endl; - qout << "-d <dir>, --download=<dir> " << QObject::tr("Specify the download directory.") << endl; - qout << "-c <path>, --config=<path> " << QObject::tr("Path to config file.") << endl; - qout << "-D <level>, --debug=<level> " << QObject::tr("Activate debug mode.") << endl; - qout << "-h, --help " << QObject::tr("Prints usage information.") << endl; + qout << "-c <path>, --config=<path> " << QObject::tr("Path to configuration file.") << endl; + qout << "-u <URL>, --url=<URL> " << QObject::tr("Sets the URL to be loaded.") << endl; + qout << "-d <path>, --download=<path> " << QObject::tr("Specify the download directory.") << endl; + qout << "-t <path, --trigger=<path> " << QObject::tr("Specify location of the file triggering the URL load.") << endl; + qout << "-s <path, --serial=<path> " << QObject::tr("Specify location of the file containing the serial number.") << endl; + qout << "-D <level>, --debug=<level> " << 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>, --url=<url> -# -d <dir>, --download=<dir> absolute dir for downloads. -# -c <path>, --config=<path> path to config file. -# +# OPTIONS: +# -h, --help prints help +# -D <level>, --debug=<level> sets debug level [0,1] +# -u <url>, --url=<url> sets URL to load +# -d <dir>, --download=<dir> sets download directory (absolute) +# -c <path>, --config=<path> sets path to config file (absolute) +# -t <path>, --trigger=<path> sets path to file triggering URL load +# -s <path>, --serial=<path> 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 ] |