commandline: remove --path option
This commit is contained in:
parent
e9b65753aa
commit
e8cc7f22bf
5 changed files with 5 additions and 25 deletions
|
@ -232,9 +232,6 @@ uses
|
|||
.I password
|
||||
when connecting to a server, ignoring other preferences. Unsafe.
|
||||
.TP
|
||||
.B --path
|
||||
prints the name of the game data directory and exits.
|
||||
.TP
|
||||
.BI --plugin \ script
|
||||
(experimental) load a
|
||||
.I script
|
||||
|
|
|
@ -108,7 +108,6 @@ commandline_options::commandline_options (const std::vector<std::string>& args)
|
|||
nomusic(false),
|
||||
nosound(false),
|
||||
new_widgets(false),
|
||||
path(false),
|
||||
preprocess(false),
|
||||
preprocess_defines(),
|
||||
preprocess_input_macros(),
|
||||
|
@ -187,9 +186,8 @@ commandline_options::commandline_options (const std::vector<std::string>& args)
|
|||
("nomusic", "runs the game without music.")
|
||||
("nosound", "runs the game without sounds and music.")
|
||||
("password", po::value<std::string>(), "uses <password> when connecting to a server, ignoring other preferences.")
|
||||
("path", "prints the path to the data directory and exits.")
|
||||
("plugin", po::value<std::string>(), "(experimental) load a script which defines a wesnoth plugin. similar to --script below, but lua file should return a function which will be run as a coroutine and periodically woken up with updates.")
|
||||
("render-image", po::value<two_strings>()->multitoken(), "takes two arguments: <image> <output>. Like screenshot, but instead of a map, takes a valid wesnoth 'image path string' with image path functions, and writes it to a .png file."
|
||||
("plugin", po::value<std::string>(), "(experimental) load a script which defines a wesnoth plugin. similar to --script below, but Lua file should return a function which will be run as a coroutine and periodically woken up with updates.")
|
||||
("render-image", po::value<two_strings>()->multitoken(), "takes two arguments: <image> <output>. Like screenshot, but instead of a map, takes a valid Wesnoth 'image path string' with image path functions, and writes it to a .png file."
|
||||
#ifdef _WIN32
|
||||
" Implies --wconsole."
|
||||
#endif // _WIN32
|
||||
|
@ -205,11 +203,11 @@ commandline_options::commandline_options (const std::vector<std::string>& args)
|
|||
" Implies --wconsole."
|
||||
#endif // _WIN32
|
||||
)
|
||||
("script", po::value<std::string>(), "(experimental) file containing a lua script to control the client")
|
||||
("script", po::value<std::string>(), "(experimental) file containing a Lua script to control the client")
|
||||
("server,s", po::value<std::string>()->implicit_value(std::string()), "connects to the host <arg> if specified or to the first host in your preferences.")
|
||||
("strict-validation", "makes validation errors fatal")
|
||||
("translations-over", po::value<unsigned int>(), "Specify the standard for determining whether a translation is complete.")
|
||||
("unsafe-scripts", "makes the \'package\' package available to lua scripts, so that they can load arbitrary packages. Do not do this with untrusted scripts! This action gives lua the same permissions as the wesnoth executable.")
|
||||
("unsafe-scripts", "makes the \'package\' package available to Lua scripts, so that they can load arbitrary packages. Do not do this with untrusted scripts! This action gives ua the same permissions as the Wesnoth executable.")
|
||||
("userconfig-dir", po::value<std::string>(), "sets the path of the user config directory to $HOME/<arg> or My Documents\\My Games\\<arg> for Windows. You can specify also an absolute path outside the $HOME or My Documents\\My Games directory. Defaults to $HOME/.config/wesnoth on X11 and to the userdata-dir on other systems.")
|
||||
("userconfig-path", "prints the path of the user config directory and exits.")
|
||||
("userdata-dir", po::value<std::string>(), "sets the path of the userdata directory to $HOME/<arg> or My Documents\\My Games\\<arg> for Windows. You can specify also an absolute path outside the $HOME or My Documents\\My Games directory.")
|
||||
|
@ -267,7 +265,7 @@ commandline_options::commandline_options (const std::vector<std::string>& args)
|
|||
("parm", po::value<std::vector<std::string>>()->composing(), "sets additional parameters for this side. <arg> should have format side:name:value.")
|
||||
("scenario", po::value<std::string>(), "selects a multiplayer scenario. The default scenario is \"multiplayer_The_Freelands\".")
|
||||
("side", po::value<std::vector<std::string>>()->composing(), "selects a faction of the current era for this side by id. <arg> should have format side:value.")
|
||||
("turns", po::value<std::string>(), "sets the number of turns. The default is \"50\".")
|
||||
("turns", po::value<std::string>(), "sets the number of turns. By default no turn limit is set.")
|
||||
;
|
||||
|
||||
po::options_description testing_opts("Testing options");
|
||||
|
@ -425,8 +423,6 @@ commandline_options::commandline_options (const std::vector<std::string>& args)
|
|||
nogui = true;
|
||||
if (vm.count("parm"))
|
||||
multiplayer_parm = parse_to_uint_string_string_tuples_(vm["parm"].as<std::vector<std::string>>());
|
||||
if (vm.count("path"))
|
||||
path = true;
|
||||
if (vm.count("preprocess"))
|
||||
{
|
||||
preprocess = true;
|
||||
|
|
|
@ -143,8 +143,6 @@ public:
|
|||
bool nosound;
|
||||
/// True if --new-widgets was given on the command line. Hidden option to enable the new widget toolkit.
|
||||
bool new_widgets;
|
||||
/// True if --path was given on the command line. Prints the path to data directory and exits.
|
||||
bool path;
|
||||
/// True if --preprocess was given on the command line. Starts Wesnoth in preprocessor-only mode.
|
||||
bool preprocess;
|
||||
/// Defines that were given to the --preprocess option.
|
||||
|
|
|
@ -65,7 +65,6 @@ BOOST_AUTO_TEST_CASE (test_empty_options)
|
|||
BOOST_CHECK(!co.nomusic);
|
||||
BOOST_CHECK(!co.nosound);
|
||||
BOOST_CHECK(!co.new_widgets);
|
||||
BOOST_CHECK(!co.path);
|
||||
BOOST_CHECK(!co.preprocess);
|
||||
BOOST_CHECK(!co.preprocess_defines);
|
||||
BOOST_CHECK(!co.preprocess_input_macros);
|
||||
|
@ -142,7 +141,6 @@ BOOST_AUTO_TEST_CASE (test_default_options)
|
|||
BOOST_CHECK(!co.nomusic);
|
||||
BOOST_CHECK(!co.nosound);
|
||||
BOOST_CHECK(!co.new_widgets);
|
||||
BOOST_CHECK(!co.path);
|
||||
BOOST_CHECK(!co.preprocess);
|
||||
BOOST_CHECK(!co.preprocess_defines);
|
||||
BOOST_CHECK(!co.preprocess_input_macros);
|
||||
|
@ -214,7 +212,6 @@ BOOST_AUTO_TEST_CASE (test_full_options)
|
|||
"--nogui",
|
||||
"--parm=7:parmfoo:valfoo",
|
||||
"--parm=8:parmbar:valbar",
|
||||
"--path",
|
||||
"--preprocess", "preppathfoo", "preptargfoo",
|
||||
"--preprocess-defines=DEFFOO,DEFBAR",
|
||||
"--preprocess-input-macros=inmfoo",
|
||||
|
@ -300,7 +297,6 @@ BOOST_AUTO_TEST_CASE (test_full_options)
|
|||
BOOST_CHECK(co.nomusic);
|
||||
BOOST_CHECK(co.nosound);
|
||||
BOOST_CHECK(co.new_widgets);
|
||||
BOOST_CHECK(co.path);
|
||||
BOOST_CHECK(co.preprocess && co.preprocess_path && co.preprocess_target);
|
||||
BOOST_CHECK(*co.preprocess_path == "preppathfoo" && *co.preprocess_target == "preptargfoo");
|
||||
BOOST_CHECK(co.preprocess_defines && co.preprocess_defines->size() == 2);
|
||||
|
@ -372,7 +368,6 @@ BOOST_AUTO_TEST_CASE (test_positional_options)
|
|||
BOOST_CHECK(!co.nomusic);
|
||||
BOOST_CHECK(!co.nosound);
|
||||
BOOST_CHECK(!co.new_widgets);
|
||||
BOOST_CHECK(!co.path);
|
||||
BOOST_CHECK(!co.preprocess);
|
||||
BOOST_CHECK(!co.preprocess_defines);
|
||||
BOOST_CHECK(!co.preprocess_input_macros);
|
||||
|
|
|
@ -469,11 +469,6 @@ static int process_command_args(const commandline_options& cmdline_opts)
|
|||
return 0;
|
||||
}
|
||||
|
||||
if(cmdline_opts.path) {
|
||||
std::cout << game_config::path << "\n";
|
||||
return 0;
|
||||
}
|
||||
|
||||
if(cmdline_opts.log_precise_timestamps) {
|
||||
lg::precise_timestamps(true);
|
||||
}
|
||||
|
@ -1036,7 +1031,6 @@ int main(int argc, char** argv)
|
|||
if(args[k] == "--wconsole" ||
|
||||
args[k] == "--help" ||
|
||||
args[k] == "--logdomains" ||
|
||||
args[k] == "--path" ||
|
||||
args[k] == "--render-image" ||
|
||||
args[k] == "--report" ||
|
||||
args[k] == "-R" ||
|
||||
|
|
Loading…
Add table
Reference in a new issue