Commit 76a28922 authored by Jan Möbius's avatar Jan Möbius
Browse files

Set remote tcp port via command line option (not yet used in tcp plugin!)

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@12682 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 7a71f81c
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
enum {OPT_HELP , OPT_STEREO, OPT_BATCH ,OPT_CONSOLE_LOG , OPT_DEBUGGING, OPT_FULLSCREEN, enum {OPT_HELP , OPT_STEREO, OPT_BATCH ,OPT_CONSOLE_LOG , OPT_DEBUGGING, OPT_FULLSCREEN,
OPT_HIDDDEN_LOGGER , OPT_NOSPLASH ,OPT_HIDDDEN_TOOLBOX , OPT_LOAD_POLYMESHES, OPT_HIDDDEN_LOGGER , OPT_NOSPLASH ,OPT_HIDDDEN_TOOLBOX , OPT_LOAD_POLYMESHES,
OPT_REMOTE}; OPT_REMOTE, OPT_REMOTE_PORT};
CSimpleOpt::SOption g_rgOptions[] = { CSimpleOpt::SOption g_rgOptions[] = {
{ OPT_DEBUGGING , (char*) "--debug" , SO_NONE }, { OPT_DEBUGGING , (char*) "--debug" , SO_NONE },
...@@ -151,6 +151,7 @@ CSimpleOpt::SOption g_rgOptions[] = { ...@@ -151,6 +151,7 @@ CSimpleOpt::SOption g_rgOptions[] = {
{ OPT_HIDDDEN_TOOLBOX , (char*) "-t" , SO_NONE }, { OPT_HIDDDEN_TOOLBOX , (char*) "-t" , SO_NONE },
{ OPT_LOAD_POLYMESHES , (char*) "-p" , SO_NONE }, { OPT_LOAD_POLYMESHES , (char*) "-p" , SO_NONE },
{ OPT_REMOTE , (char*) "--remote-control" , SO_NONE }, { OPT_REMOTE , (char*) "--remote-control" , SO_NONE },
{ OPT_REMOTE_PORT , (char*) "--remote-port" , SO_REQ_SEP },
SO_END_OF_OPTIONS // END SO_END_OF_OPTIONS // END
}; };
...@@ -259,6 +260,8 @@ bool remoteControl = false; ...@@ -259,6 +260,8 @@ bool remoteControl = false;
bool parseCommandLineOptions(CSimpleOpt& args){ bool parseCommandLineOptions(CSimpleOpt& args){
QString port;
// while there are arguments left to process // while there are arguments left to process
while (args.Next()) { while (args.Next()) {
...@@ -295,6 +298,11 @@ bool parseCommandLineOptions(CSimpleOpt& args){ ...@@ -295,6 +298,11 @@ bool parseCommandLineOptions(CSimpleOpt& args){
case OPT_REMOTE: case OPT_REMOTE:
OpenFlipper::Options::remoteControl(true); OpenFlipper::Options::remoteControl(true);
break; break;
case OPT_REMOTE_PORT:
port = args.OptionArg();
std::cerr << "Got option : " << port.toStdString() << std::endl;
OpenFlipper::Options::remoteControl(port.toInt());
break;
case OPT_HELP: case OPT_HELP:
showHelp(); showHelp();
return 0; return 0;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment