diff options
author | Rainer Keller <rainer.keller@theqtcompany.com> | 2015-01-26 10:45:15 +0100 |
---|---|---|
committer | Rainer Keller <rainer.keller@theqtcompany.com> | 2015-01-30 10:03:52 +0200 |
commit | ddbf08f7403e4faca5acc9e99e873ebbc8e4bf52 (patch) | |
tree | 78f9f3ee294c1f16ee28ff84fd382342d750c60a | |
parent | df46e63c4600afa118250967675c8f76398e90a6 (diff) |
Add usage help message
Change-Id: I1fe67283fe29aaf67baccd80f4f5d4fc043230f8
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@theqtcompany.com>
-rw-r--r-- | main.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -44,6 +44,25 @@ static int serverSocket = -1; static const char socketPath[] = "#Boot2Qt_appcontroller"; +static void usage() +{ + printf("appcontroller [--debug-gdb] [--debug-qml] [--port-range <range>] [--stop] [--launch] [--show-platfrom] [--make-default] [--remove-default] [--print-debug] [--version] [--detach] [executable] [arguments]\n" + "\n" + "--port-range <range> Port range to use for debugging connections\n" + "--debug-gdb Start GDB debugging\n" + "--debug-qml Start QML debugging\n" + "--stop Stop already running application\n" + "--launch Start application without stopping already running application\n" + "--show-platform Show platform information\n" + "--make-default Make this application the default on boot\n" + "--remove-default Restore the default application\n" + "--print-debug Print debug messages to stdout on Android\n" + "--version Print version information\n" + "--detach Start application as usual, then go into background\n" + "--help, -h, -help Show this help\n" + ); +} + static void setupAddressStruct(struct sockaddr_un &address) { address.sun_family = AF_UNIX; @@ -285,6 +304,9 @@ int main(int argc, char **argv) return 0; } else if (arg == "--detach") { detach = true; + } else if (arg == "--help" || arg == "-help" || arg == "-h") { + usage(); + return 0; } else { args.prepend(arg); break; |