Commit graph

87 commits

Author SHA1 Message Date
Pentarctagon
ac39ffdcd3 Hash passwords server-side instead of client-side.
This removes the need for the Wesnoth client to need to know how to hash the password to match what is expected by the forum database.
2021-06-01 13:47:48 -05:00
Celtic Minstrel
7b7b904c99 Add --nobanner command-line argument 2021-03-13 20:49:26 -05:00
Celtic Minstrel
d2734973ed Add a command-line option that makes deprecated Lua stuff evaporate 2021-02-16 20:40:18 -05:00
Charles Dang
4d54b2a7fd Used std::optional directly since we support C++17 now 2021-01-17 11:48:14 +11:00
Charles Dang
2c06bd1e35 Cleaned up remaining cases of spaced closing template brackets 2021-01-07 21:43:08 +11:00
Pentarctagon
4c2b725ec0 Change all doxygen comments to the same format. 2020-12-31 23:59:28 -06:00
Charles Dang
cb537f781b
Converted uses of boost::optional to utils::optional (#5329) 2020-12-02 08:16:05 +11:00
Iris Morelle
8c71ec2adc Fix indentation 2020-11-09 21:22:00 -03:00
Steve Cotton
3f93c263a9 Improve user-friendliness of the validation options
* Fixes #4223, by making the --validate and --validate-* options imply --nocache.

* Fixes #4224, showing an error if you misspell the id argument to
  --validate-addon. The application doesn't (but should) quit automatically to
  avoid the user spending time on a non-functional validation run, however it
  does at least disable all add-ons, which should have the same end result.

* Shows a warning that --validate-addon needs the user to play the add-on, it
  doesn't automatically check the add-on. This was my misunderstanding when
  logging issue #4225, which has now been repurposed into a feature request for
  a new tool that does what I thought --validate-addon did.
2020-10-02 18:34:18 +02:00
Steve Cotton
63bb076b97
Support running multiple expected-to-pass unit tests (#4582)
This allows batching all of the tests that are expected to return status zero,
which is currently 161 tests, and running the batch with a single instance of
Wesnoth.  It doesn't include the changes to the run_wml_tests script to use
this new feature.

Timing on my PC:
* 4 seconds to run a single test on a debug build
* 90 seconds to run the whole batch of 161 on a debug build
* 1.2 seconds to run a single test on a release build
* 31.2 seconds to run the whole batch of 161 on a release build
2019-11-22 23:14:53 +01:00
Steve Cotton
6576293228 Remove the obsolete --timeout command-line option
This option has never been supported in any tagged release of Wesnoth:
* added in e5b3951054
* changed to only print a warning in c8699e2f05
2019-11-19 02:49:49 +01:00
Celtic Minstrel
5ac95eae08 Add --output option to redirect diff/patch output to a file of your choice 2019-08-30 23:23:10 -04:00
Celtic Minstrel
d4c6f1e5f0 Add a command-line interface to the WML diff functionalityNote that this is only useful for WML documents that do not require preprocessing. 2019-08-30 23:23:10 -04:00
Severin Glöckner
e8cc7f22bf commandline: remove --path option 2019-01-05 06:53:32 +01:00
Celtic Minstrel
8ef0c1734d Add several command-line options to invoke the schema validator 2018-11-03 17:09:25 -04:00
Celtic Minstrel
3a65a14bcb Implement validation of the core game config WML
Currently this is disabled by default
Use --validate command-line argument to enable

The following new features were added in the schema format:
* Union, intersection, and list types
* Keys can specify a union of known types on-the-fly
* Key and tag names can include wildcards (* and ?, glob-style)
* Tags support any_key=yes, which means unrecognized subtags will be ignored
* Tags and keys support deprecated=yes (unimplemented)
* Specify max=infinite instead of max=-1
2018-10-23 22:36:40 -04:00
josteph
d443df9be1 Commandline: Add --campaign-skip-story option
Fixes #3472

(cherry-picked from commit f7be872da2)
2018-10-07 03:25:19 +00:00
Martin Hrubý (hrubymar10)
674fda85b7 Migrate links to https if available - Fwd c18537edc0
(cherry-picked from commit bc4d22dc72)
2018-10-07 03:23:36 +00:00
Celtic Minstrel
6177d4ae0a Add a command-line option to show incomplete translations in the language list
(cherry-picked from commit fc74e782b7)
2018-10-07 03:21:24 +00:00
Charles Dang
e270a7c665 Formatting cleanup: > > to '>>`
Allowed since C++11. Might as well use it everywhere.
2018-02-21 12:11:21 +11:00
Matthias Krüger
a2168d2e24 codespell fixes to /src 2018-02-08 21:54:09 +11:00
Gregory A Lundberg
b5f76eff79
Bump copyright to 2018 2018-01-19 00:02:20 -06:00
Jyrki Vesterinen
dc5e8b36ea Restore --max-fps
@gfgtdf explained in IRC that it's often used to slow Wesnoth down (instead
of speeding it up, as I had assumed).

This should also allow unit tests to compile again.
2017-07-22 23:35:53 +03:00
Jyrki Vesterinen
4e4d7b5277 Rewrite the FPS cap implementation
The FPS cap, originally implemented in 2007, is very poorly done. It
doesn't take frame time variance into account, and is therefore almost
guaranteed to cause missed frames all the time. It doesn't increase timer
granularity on Windows, which causes SDL_Delay() to often take much longer
than intended. And it's hardcoded for 50 FPS, which fits poorly with 60 Hz
displays.

This new implementation fixes all those issues.

My experience is that the game feels much, much smoother with the new
implementation, perfectly competitive with 1.12. In my opinion, performance
is now at an acceptable level for a stable release.
2017-07-22 15:48:46 +03:00
Ignacio R. Morelle
98883d0d0c Add new --report/-R switch to generate an info dump for bug reports
This is intended to be used instead of the Game Version dialog's
clipboard text report in the event that Wesnoth cannot reach the
titlescreen or the dialog for some reason.

Unlike the --version info dump, it performs various calls to the
filesystem API which have potential side-effects on the environment
(namely, creating a user data directory structure if none existed before
running the command). It seems highly improper for a program's --version
switch to perform any actions other than printing text to its parent
terminal, hence I thought it would be better to add a new switch with a
more active phrasing, also reflected in its accompanying documentation.

Ultimately, this and its UI counterpart should be used by 1.14 players
as part of the bug reporting process, preferably as a mandatory step
before submitting new reports on GH or the forums.
2017-05-22 00:05:11 -04:00
Charles Dang
2101353d36 Convert include guards to the shorter #pragma once
Turns out I mistook @celticminstrel's opinion that we should use include guards over pragma (737916e).
Since all major compilers support `#pragma once`, there's no reason not to use it.

For future mergability reasons, this excludes src/spirit_po and src/xBRZ. It also excludes src/boost-patched.
2017-05-09 19:41:37 +11:00
Celtic Minstrel
b4dc11ce36 Belated 2017 copyright update 2017-03-19 10:05:38 -04:00
Charles Dang
a1f6884555 Refactor uses of boost::tuple to std::tuple or std::pair as appropriate 2016-07-25 17:26:24 +11:00
Charles Dang
168313bed9 Cleaned out some SDL_net-related detritus
This allows the main executable to build without SDL_net as a dependency.
2016-06-06 05:56:24 +11:00
Chris Beck
ba51524f6e update copyright to year 2016
using this shell script:

find src -type f -print0 | xargs -0 sed -i "s|Copyright (C) \([[:digit:]]*\)\([ ]*\)-\([ ]*\)2015|Copyright (C) \1\2-\32016|g"
2016-01-02 23:59:31 -05:00
Charles Dang
c15e2403f7 Remove option to manually set bpp from command line
# Conflicts:
#	src/game_launcher.cpp
2015-12-30 19:09:40 +11:00
Ignacio R. Morelle
57ae45387a New Year copyright update 2015-01-01 19:07:35 -03:00
Chris Beck
489074b0a4 add --mp-tests option and preproc defines, and mp unit tests folder
These tests are meant to be run in a networked context to check for
OOS and similar.
2014-12-19 19:47:27 -05:00
Chris Beck
f8f1979846 add --plugin option at command line (to replace script eventually)
This is still rough and will need to be cleaned up later.
2014-12-19 19:47:18 -05:00
Chris Beck
3193a67ce9 add option to allow "unsafe" lua scripts, with "package" package
This allows lua scripts to access the OS, the network, etc.
2014-11-09 20:47:27 -05:00
Chris Beck
4164a24a59 take cmdline arg for lua scripts to execute at application start
If a lua script is passed as an argument to wesnoth, wesnoth will
actually instantiate the application_lua_kernel defined in the
previous commits, initialize it, and run the script in that
environment.
2014-11-09 20:47:27 -05:00
Chris Beck
cd3e8cf333 add function to generate config from cmd line opts, for lua 2014-11-09 18:45:14 -05:00
Fabian Müller
c6e118f084 Add the "core" command line option.
This option specifies a [core]'s id which is to be loaded.
Not used yet.
2014-11-07 23:17:23 +01:00
Fabian Müller
ca0674d684 Add --noaddons command line option.
This option prevents any add-ons from being loaded.
2014-11-06 02:43:33 +01:00
gfgtdf
8a81fb526d Merge pull request #305 from gfgtdf/istream_fix
we now use boost::istreams instead of boost::filesystem::fstream because the later doesnt work with mingw.
we now use a custom codecvt instead of boost locale because we want to get better error messages for invalid utf8 strings using our _ERR streams
we now use unicode prgamm commandline args on windows..
2014-10-23 23:59:42 +02:00
gfgtdf
fa67d14571 use unicode programm args on windows 2014-10-23 14:49:18 +02:00
Chris Beck
ccc0ec67d9 add "render-image" CL option, to directly save output from IPF's
Example usage:
wesnoth --render-image "units/undead-skeletal/banebow-bow-attack-1.png~SCALE(144,144)" "banebow.bmp"
2014-10-22 18:11:55 -04:00
Ignacio R. Morelle
64af83f4f0 Simplify tuple command line arguments error handling
Reuse the boost::program_options::error class (which we already catch in
main()) instead of throwing a std::string, and simplify the throwing
logic accordingly.

There is no need to provide incredibly verbose error messages since the
user is expected to be able to read --help or the man page to get here
in the first place.
2014-07-07 20:34:31 -04:00
Ignacio R. Morelle
5490a55a3b Simplify --resolution error handling
Reuse the boost::program_options::error class (which we already catch in
main()) instead of throwing a std::string, and simplify the throwing
logic accordingly.

There is no need to provide incredibly verbose error messages since the
user is expected to be able to read --help or the man page to get here
in the first place.
2014-07-07 20:34:24 -04:00
Chris Beck
198b89b61f fixup includes in commandline_options 2014-06-25 02:16:23 -04:00
Chris Beck
f7ce1845f3 add "strict" logging option, to treat e.g. wml warnings as errors
When the game is run using e.g. "--log-strict=warning", then
writing anything to a log channel of severity warning or higher
will result in a game::game_error exception being thrown.

This will only happen the first time that such a write is
attempted, subsequent attempts to get the logging object will
pass without exception and such messages will be reported.
2014-05-14 21:39:20 -04:00
Chris Beck
99c15db910 unit tests show a gui if --showgui option is given 2014-05-08 12:16:09 -04:00
Alexander van Gessel
2da77a8ad0 Merge pull request #135 from cbeck88/wmltest
WML Unit Tests
2014-05-02 15:48:14 +02:00
gfgtdf
03721d9fe6 commandline option for precise timestamps 2014-04-27 20:01:49 +02:00
Chris Beck
4fb6cf5909 add replay validation to unit tests
after unit tests play, then unless --noreplaycheck flag is used,
they save a replay at the end of the scenario (using autosave
code path), without compression. then they try to load it and
play it to completion.
this is the initial attempt.
2014-04-08 18:11:41 -04:00