727 Commits

Author SHA1 Message Date
loonycyborg
74ee51e2fa
scons: Disable -isystem conversion if sys.platform == "win32"
msys2 pkg-config adds root system include path among -I flags and
passing it with -isystem isn't supported by gcc, and
the workaround of passing --dont-define-prefix to pkg-config doesn't
work on msys2's "subsystem" install of scons because posix style
absolute paths aren't handled properly when expanding CPPPATH.
Most likely related to https://github.com/msys2/MINGW-packages/issues/10761
2022-10-23 00:06:07 +03:00
Pentarctagon
f3ca89d5f4 Set correct pango required version in cmake/scons. 2022-09-09 10:28:15 -05:00
Wedge009
9fccea96ea SDL: Increase requirement to 2.0.10.
SDL_RenderCopyF and SDL_RenderCopyExF are only available from SDL 2.0.10 onwards.
2022-06-20 11:51:41 -05:00
Tommy
57f32eaa9f Add options to scons and cmake to force coloured compiled output.
In CMake this is the FORCE_COLOR_OUTPUT option. In SCons this is the
force_color option. They both pass -fdiagnostics-color=always to gcc,
or -fcolor-diagnostics to clang.

This is useful when building with Ninja, or running piped CI tools.
2022-06-10 16:45:38 +12:00
Pentarctagon
9929d3ca1c Remove some unused scons code. 2022-05-03 20:36:00 -05:00
Pentarctagon
0aa8dc3c6c Have cmake also execute the conftests. 2022-05-03 18:10:46 -05:00
Pentarctagon
f44acd68c2 Add build support for webp images. 2022-03-12 13:47:46 -06:00
Pentarctagon
d32cfb88c4 Update instructions and add warning to scons/cmake. 2022-03-09 15:01:37 -06:00
Larkin Nickle
902f7d37c4 SConstruct: need to link against socket library on SunOS
Tested on OpenIndiana 2021.10
2021-12-12 20:20:29 -06:00
Pentarctagon
e53d9c321d
Update gcov options. 2021-06-09 02:51:17 -05:00
Pentarctagon
f4e6e1861f
Add -fno-omit-frame-pointer for perf. 2021-06-09 00:59:43 -05:00
Pentarctagon
4b35be4bb0 Combine profile build into release build. 2021-06-08 21:23:38 -05:00
loonycyborg
f59f5a4091
Load system certificate store manually on Windows because boost.asio doesn't 2021-05-22 01:06:10 +03:00
loonycyborg
1c4c5d4d1e
Drop compatibility for boost 1.65 2021-05-06 17:09:13 +03:00
loonycyborg
b72b7a05ed
Add TLS codepath to server_base 2021-05-06 17:09:10 +03:00
Grzegorz Halat
c0db7311bb Bump SDL2 version to 2.0.8 2021-04-27 04:53:27 -04:00
loonycyborg
5d8c476396
scons: remove file existence check from InstallData
It was breaking install of generated files. Also adjusted manpage
install which was relying on this behavior.
This helps with issue #5692
2021-04-25 03:11:56 +03:00
loonycyborg
546355f32e
scons: look for systemctl instead of systemd when determining default value of "systemd" option
This is a more reliable way to detect distro with systemd support.
"systemd" binary may not be in PATH while systemctl would have to be.
This helps with part of issue #5692
2021-04-25 02:07:28 +03:00
Pentarctagon
6db64459d2 Remove checks for stuff that aren't used anymore. 2021-03-14 22:42:59 -05:00
Iris Morelle
2dfdc0061d Remove SDL_ttf wrapper API
This removes the build-time dependencies on SDL_ttf and FriBidi,
alongside the SDL_ttf wrappers, the SDL_ttf text surface class, the
SDL_ttf render cache, and the SDL_ttf (de)initialization code.
2021-03-13 13:51:47 -03:00
Pentarctagon
b974423e2e Add optional fuh to campaignd. 2021-03-12 16:12:09 -06:00
Severin Glöckner
37dfcad927 Hide warnings from GCC if compiling with LTO
This adds the change from d643edc (in scons) and 941433e (in cmake) to the linking step as well, but only when using LTO

closes  #5350
2021-01-18 13:53:05 -06:00
Pentarctagon
90946ca262 Update to require C++17.
This then also bumps the minimum GCC version to 7.
2021-01-16 17:05:47 -06:00
Sergey Popov
3933ebab5c
Use coroutines via boost::asio::spawn to improve overall code structure in servers (#5341)
* Convert server_base class to use coroutine instead of handlers

* Rework wesnothd's client login to use coroutine

* Merge 3 player handling functions into a single coroutine

* update cmakelists too

* Implement send_doc_queued in terms of coroutine

* Use brace initialization for making asio buffers

* Implement campaignd's request handling in coroutine

* Brace-initialize entire vector

* Remove old handler based send/receive helpers

* Document coroutine send/receive helpers

* Made coro_send_doc() helper take wml doc by reference

In most cases there is no need to rely on shared pointers to ensure
object lifetime if using coroutines since even when coroutine is
suspended args are still kept alive by its context.

* Document coro_send_file()

* Silence deprecation warning to fix build on earlier versions of boost

* Explicitly check for boost.context to allow linking against static boost libs

* Add boost.coroutine to flatpak manifest

* Port winapi TransmitFile codepath to coroutines

* Exception safety fix

* Add boost.scope_exit to vcpkg

* Fix build with pre-1.66 boost

* Move coro_* helpers into server_base class

Those helpers were in .ipp solely because they were templated on handler
types, this is no longer true after coroutine based rework.

* Make server_base::coro_send_file non-inline

* CleanUp Xcode project

Co-authored-by: Martin Hrubý (hrubymar10) <hrubymar10@gmail.com>
2020-12-30 19:08:34 +03:00
Pentarctagon
0409c22ae2
Update cmake/scons for boost 1.65 minimum. 2020-12-19 01:54:46 -06:00
loonycyborg
85c9988f5e Remove "python_devel" from custom tools too 2020-12-14 15:59:14 +03:00
loonycyborg
4f5a713934 Drop load of unused scons tool "python_devel" 2020-12-14 15:47:41 +03:00
Pentarctagon
058bbf594f
Increase Boost minimum version for BOOST_DATA_TEST_CASE usage. 2020-11-27 13:03:42 -06:00
loonycyborg
a15732aac3 Fix debug build on mingw platform 2020-11-19 19:45:06 +03:00
Iris Morelle
227738cb6f campaignd: Command line processing w/ Boost.program_options
This also adds a few utility switches which people are probably already
familiarized with from the game proper. Most notably this means I don't
need to alter and recompile campaignd any time I want different logging
settings.

There's some functionality commented out in this commit while I figure
out how to wire it into the campaignd server class.
2020-11-09 21:22:00 -03:00
Pentarctagon
dbd230c1d6 Bump minimum gcc requirement to 5.4. 2020-10-23 09:23:12 -05:00
Pentarctagon
467e4312b9 Add support for executing async queries.
Making the logging correctly handle multiple threads writing to the same stream at the same time will be handled separately later.
2020-10-14 19:38:49 -05:00
Steve Cotton
c9511d7ba0
Drop support for the l10n-track file (#4722)
The file only had a run-time effect if it listed any files as "fuzzy", which it
hasn't since the last change in 2015. However, that isn't a reason for removing
it.

The reason for removing it is that it doesn't make sense to automatically mark
images as fuzzy when an image changes, because fuzzy is often much better than
untranslated. This is different to the logic for strings, where a single word
can negate the meaning of a sentence. The decision has to be a manual process,
and at that point it might as well be done with the source-control tool's
delete-file function.

Even considering the previous times that l10n-track was used, I can't see a
scenario where it would be useful.

* Scenario: a screenshot needs to be replaced. In this case the new images are
  going to be screenshots too. If the old images are out of date, better to
  just delete them instead of needing the fuzzy mechanism; either option would
  have the same effect of showing the up-to-date-but-untranslated image.

* Scenario: a map is completely redrawn. This seems unlikely, as a completely redrawn
  image could be added as a new map rather than replacing the old one. Even if
  it does happen, it's probably best to just delete the old --overlay.png
  files.

* Scenario: a new landmark is added to a map. Using the existing overlay file
  is still going to be good, as it means the rest of the map is shown
  translated. There's surely new dialogue in the WML files commenting on this
  new landmark, which would be a good place to say
    # po: Lorem's Ipsum was added to the map on 24 Jan 2020, please add a label to your language's --overlay file.

* Scenario: an old feature is removed from the map. Using the existing overlay
  will have an out-of-date label, and the significance of that would depend on
  how it affects the storyline. This could be significant enough to make
  showing the English labels be a better option than showing the translated
  ones. However, the translated maps could be updated without knowledge of the
  language, so if it's such a significant change then the developer writing the
  new WML should probably do that.

* Scenario: a feature moves slightly on the map. This is an example where the
  l10n-track file has been used, it happened with the Bitter Swamp on the
  bottom-right corner of the title screen. I think it would have been better to
  show the slightly-out-of-date overlay instead of showing the English.

Note about cherry-picking: in the 1.14 branch, the change needs to be applied
to src/picture.cpp instead of src/filesystem.cpp.
2020-08-08 05:07:59 +02:00
Martin Hrubý
9f854e7ce8
Fix SDL2 2.0.12 change in SDL_GetDisplayDPI (#5024)
* Fix SDL2 2.0.12 change in SDL_GetDisplayDPI

Fixes #5019

* Remove signing requirement for DEBUG Xcode builds
2020-08-05 23:44:39 -05:00
Steve Cotton
935fa41379
Final part of the Python 2 removal, including updating install-pytools (#5027)
Update the list of files installed by "scons install-pytools", dropping Python2
versions and adding their Python3 replacements. This doesn't update any
`import` statements, as the tools have already been ported to use the Python3
modules - the scons script was out of date and was still bundling the wrong
versions.

Note for anyone looking at the history - although most of the current
tools have a '3' in the name just to indicate that they're the Python 3 version,
there's a double-meaning to that number in wmlparser3.py's name. There was a
`wmlparser2.py`, where the `2` indicates a redesign of the original.

The data/tools/README.md file was renamed from plain README without being
converted to Markdown format. This commit touches about half of that file;
headings in that half are updated to be Markdown, but to reduce the diff the
other headings aren't updated.
2020-08-05 21:56:12 +02:00
Pentarctagon
f662cad825 Fix the source_lists not being found when using the -Y/--srcdir option. 2020-08-01 03:50:52 -05:00
pentarctagon
7f9eebdf49 Add mariadbpp as a submodule.
This has been added as a submodule for convenience of use, since mariadbpp isn't included in any repositories (linux distros, vcpkg, etc) aside from an Arch AUR.
2020-07-30 13:17:22 -05:00
Pentarctagon
e6e01341f4
Allow specifying c++20. 2020-03-24 14:44:13 -05:00
loonycyborg
a0229523b8 scons: correct open() call for lockfile creation with py3 2020-02-23 02:41:45 +03:00
loonycyborg
9424069298 scons: fix build failure with --config=force 2020-02-09 14:59:38 +03:00
Pentarctagon
48fc3ce58b
-Werror=non-virtual-dtor is not a valid C flag. 2020-01-09 19:34:31 -06:00
loonycyborg
1d80308325 Revert "Remove check for boost.thread from buildsystems since it's not used anymore"
This reverts commit 4c7497722700f40fb9aa807dcbc4b6dfe75457bf.
Explicit linking against boost_thread is required when using boost as
static libraries.
2019-10-25 19:05:28 +03:00
loonycyborg
4aba57b369 scons: fix build with forum_user_handler=true + py3 2019-10-13 19:54:25 +03:00
loonycyborg
4c74977227 Remove check for boost.thread from buildsystems since it's not used anymore 2019-09-28 14:21:04 +03:00
loonycyborg
c7271646b7 Remove config check for gobject
It's not supposed to be required and was mandatory only for particular
pango version(s) due to bug
2019-09-24 12:07:48 +03:00
loonycyborg
7437b3992e Fix issue #4306
prevent a KeyError from missing "have_fortify" env variable
2019-09-02 13:01:26 +03:00
josteph
d76a7ba5d0 Disable -Wunused-lambda-capture on clang.
In a nutshell, capturing a local "const constexpr int foo;" variable
with [foo](){} warns on clang that the program would be valid even if
the square brackets had been left empty, but making them so warns on
VC15.  See
https://stackoverflow.com/questions/52416362/unused-lambda-capture-warning-when-capture-is-actually-used

Disable the warning since explicitly capturing foo is good practice.
2019-06-05 10:31:09 +00:00
loonycyborg
83da28b4aa No longer install .mo files for manual and manpages textdomains
But still build them just to check those po files for errors.
This fixes #3522
2019-03-30 15:40:03 +03:00
loonycyborg
798e809512 Rename appdata and desktop files to contain D-Bus well-known name
as per freedesktop spec
2019-03-27 22:18:01 +03:00
pentarctagon
23375f07df Scons/Macos: Fix for vorbisfile.h not being found. 2019-01-22 18:34:21 -06:00