Doomseeker
Wadseeker
Download
Tracker
Git
Docs
Main Page
Plugin API
Related Pages
Modules
Classes
Files
File List
File Members
All
Classes
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Groups
Pages
src
core
cmdargshelp.cpp
1
//------------------------------------------------------------------------------
2
// cmdargshelp.cpp
3
//------------------------------------------------------------------------------
4
//
5
// This library is free software; you can redistribute it and/or
6
// modify it under the terms of the GNU Lesser General Public
7
// License as published by the Free Software Foundation; either
8
// version 2.1 of the License, or (at your option) any later version.
9
//
10
// This library is distributed in the hope that it will be useful,
11
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
// Lesser General Public License for more details.
14
//
15
// You should have received a copy of the GNU Lesser General Public
16
// License along with this library; if not, write to the Free Software
17
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18
// 02110-1301 USA
19
//
20
//------------------------------------------------------------------------------
21
// Copyright (C) 2015 "Zalewa" <zalewapl@gmail.com>
22
//------------------------------------------------------------------------------
23
#include "cmdargshelp.h"
24
25
QString
CmdArgsHelp::argsHelp
()
26
{
27
QString help =
""
;
28
help += tr(
29
"--connect <protocol://ip[:port]>\n"
30
" Attempts to connect to the specified server.\n"
);
31
help += tr(
32
"--create-game\n"
33
" Launches Doomseeker in \"Create Game\" mode.\n"
);
34
help += tr(
35
"--datadir <directory>\n"
36
" Sets an explicit search location for\n"
37
" IP2C data along with plugins.\n"
38
" Can be specified multiple times.\n"
);
39
help += tr(
40
"--help\n"
41
" Prints this list of command line arguments.\n"
);
42
help += tr(
43
"--rcon [plugin] [ip]\n"
44
" Launch the rcon client for the specified ip.\n"
);
45
help += tr(
46
"--portable\n"
47
" Starts application in portable mode.\n"
48
" In portable mode Doomseeker saves all configuration files\n"
49
" to the directory where its executable resides.\n"
50
" Normally, configuration is saved to user's home directory.\n"
);
51
help += tr(
52
"--version-json [file|-]\n"
53
" Prints version info on Doomseeker and all\n"
54
" plugins in JSON format to specified file,\n"
55
" then closes the program. If file is not\n"
56
" specified or specified as '-', version info\n"
57
" is printed to stdout.\n"
);
58
help += tr(
59
"--verbose\n"
60
" Forces verbose logging to stderr.\n"
61
" This is the default in most cases.\n"
);
62
help += tr(
63
"--quiet\n"
64
" Forces no logging to stderr.\n"
65
" This is the default when dumping versions.\n"
);
66
return
help;
67
}
68
69
QString
CmdArgsHelp::availableCommands
()
70
{
71
QString help = tr(
"Available command line parameters:\n"
);
72
help +=
argsHelp
();
73
return
help;
74
}
75
76
QString
CmdArgsHelp::missingArgs
(
int
expectedArguments, QString option)
77
{
78
QString help = tr(
"doomseeker: expected %n argument(s) in option %1\n\n"
,
nullptr
, expectedArguments).arg(option);
79
help +=
availableCommands
();
80
return
help;
81
}
82
83
QString
CmdArgsHelp::unrecognizedOption
(QString option)
84
{
85
QString help = tr(
"doomseeker: unrecognized option '%1'\n\n"
).arg(option);
86
help +=
availableCommands
();
87
return
help;
88
}
Doomseeker © 2009-2023 The Doomseeker Team