added -v/--version command line argument to output version information (Ticket #121)

This commit is contained in:
Volker Fischer 2020-04-20 20:27:07 +02:00
parent 00b11ee06a
commit 6883c30dec
2 changed files with 22 additions and 6 deletions

View file

@ -5,8 +5,17 @@
* store Show All Musicians setting in the ini-file * store Show All Musicians setting in the ini-file
* improved Mac installer, coded by doloopuntil
TODO offer the Jamulus ASIO settingspanel in case of an ASIO ERROR to fix, e.g., incorrect sample rate (https://sourceforge.net/p/llcon/discussion/533517/thread/777663cf94/#035f) * support to open ASIO driver setup(s) if startup failed due to incorrect driver settings (Ticket #117)
* added -v/--version command line argument to output version information (Ticket #121)
* bug fix: if names given with the -o option were too long, the server registration failed (Ticket #91)
TODO the server list filter seems not to work if --showallservers is used
TODO audio level changes if Buffer Delay is changed TODO audio level changes if Buffer Delay is changed
@ -15,9 +24,6 @@ TODO improve audio drop out behaviour with OPUS64 by tuning the coding rate (it
TODO try to find a way to catch Windows exceptions in case a 64 bit Jamulus tries to load a 32 bit Jack Audio ASIO dll TODO try to find a way to catch Windows exceptions in case a 64 bit Jamulus tries to load a 32 bit Jack Audio ASIO dll
TODO the server list filter seems not to work if --showallservers is used
TODO store Central Server jamulus.server start scripts on the Repo (one for Central Server, one for Central Server North America)

View file

@ -431,6 +431,15 @@ int main ( int argc, char** argv )
} }
// Version number ------------------------------------------------------
if ( ( !strcmp ( argv[i], "--version" ) ) ||
( !strcmp ( argv[i], "-v" ) ) )
{
tsConsole << CAboutDlg::GetVersionAndNameStr ( false ) << endl;
exit ( 1 );
}
// Help (usage) flag --------------------------------------------------- // Help (usage) flag ---------------------------------------------------
if ( ( !strcmp ( argv[i], "--help" ) ) || if ( ( !strcmp ( argv[i], "--help" ) ) ||
( !strcmp ( argv[i], "-h" ) ) || ( !strcmp ( argv[i], "-h" ) ) ||
@ -438,10 +447,10 @@ int main ( int argc, char** argv )
{ {
const QString strHelp = UsageArguments ( argv ); const QString strHelp = UsageArguments ( argv );
tsConsole << strHelp << endl; tsConsole << strHelp << endl;
exit ( 1 ); exit ( 1 );
} }
// Unknown option ------------------------------------------------------ // Unknown option ------------------------------------------------------
tsConsole << argv[0] << ": "; tsConsole << argv[0] << ": ";
tsConsole << "Unknown option '" << tsConsole << "Unknown option '" <<
@ -628,7 +637,7 @@ QString UsageArguments ( char **argv )
" -F, --fastupdate use 64 samples frame size mode (server only)\n" " -F, --fastupdate use 64 samples frame size mode (server only)\n"
" -g, --pingservers ping servers in list to keep NAT port open\n" " -g, --pingservers ping servers in list to keep NAT port open\n"
" (central server only)\n" " (central server only)\n"
" -h, -?, --help this help text\n" " -h, -?, --help display this help text and exit\n"
" -i, --inifile initialization file name\n" " -i, --inifile initialization file name\n"
" -j, --nojackconnect disable auto Jack connections (client only)\n" " -j, --nojackconnect disable auto Jack connections (client only)\n"
" -l, --log enable logging, set file name\n" " -l, --log enable logging, set file name\n"
@ -648,6 +657,7 @@ QString UsageArguments ( char **argv )
" recorded jams (server only)\n" " recorded jams (server only)\n"
" -s, --server start server\n" " -s, --server start server\n"
" -u, --numchannels maximum number of channels (server only)\n" " -u, --numchannels maximum number of channels (server only)\n"
" -v, --version output version information and exit\n"
" -w, --welcomemessage welcome message on connect (server only)\n" " -w, --welcomemessage welcome message on connect (server only)\n"
" -y, --history enable connection history and set file\n" " -y, --history enable connection history and set file\n"
" name (server only)\n" " name (server only)\n"