859 Commits

Author SHA1 Message Date
Pentarctagon
9315079389 Add curl-based functionality to download files from a URL.
This is a complement to #7416 where it replaces opening the replay's download URL in a browser with directly downloading it into the player's save folder.
2023-03-15 14:49:16 -05:00
Charles Dang
8e6f507910 Bump vcpkg baseline, update for new SDL_image config 2022-11-28 00:33:43 -05:00
Pentarctagon
0946d8b3f0 Don't run conftests when only building the servers. 2022-08-24 21:11:53 -05:00
Charles Dang
c414056b8d
Fixed vcpkg build issue for port update to 2.6.1 (#6958) 2022-08-12 19:02:02 -04:00
Ryan Schmidt
853f2147ef macOS: Link with AppKit and Foundation frameworks 2022-06-08 17:27:12 -05:00
Andrei BENCSIK
1838041a37 Add FindSDL2 to simplify main CML
* the FindSDL2 module forwards to CONFIG mode first
* if that fails (eg. no -version.cmake or config not even present) it
uses pkg-config
* exports SDL2::SDL2 and SDL2::SDL2main as targets
* fix missing IMPORTED_LOCATION for other build types in Vorbisfile
2022-05-11 09:18:14 -05:00
Pentarctagon
0aa8dc3c6c Have cmake also execute the conftests. 2022-05-03 18:10:46 -05:00
Andrei BENCSIK
066210254a Refactor FindVorbisFile.cmake 2022-05-02 16:23:17 -05:00
Andrei BENCSIK
5796ae5fca Refactor FindHistory.cmake
* use all lower case keywords for consistency
* add target for libhistory: History::History
2022-04-29 18:44:38 -05:00
Pentarctagon
9282828f58
Use the C++ compiler instead of the C compiler.
Note using clang++ to build C code as C++ without also providing `-x c++` gives a deprecation warning.
2022-03-13 18:38:12 -05:00
Pentarctagon
573901376a Un-rename lua source files to .c
Being .cpp isn't required to have them be compiled as C++.
2022-03-09 15:01:37 -06:00
Charles Dang
b2db5d0498 Don't link with boost::thread 2022-03-09 01:30:57 -05:00
Pentarctagon
d516420c1f Alternate way to find SDL2. 2021-12-19 17:51:47 -06:00
Pentarctagon
df2803fd43 Use import target for fontconfig. 2021-12-19 17:51:47 -06:00
Larkin Nickle
be557f83d2 src/CMakeLists.txt: need to link against socket library on SunOS
Tested on OpenIndiana 2021.10
2021-12-12 20:20:29 -06:00
Daniel Diefenthaler
eda8d05b2f Fix MINGW build on Windows by splitting MSVC and WIN32 2021-12-12 13:03:22 -06:00
Pentarctagon
67d6e1b677
Add rc file to VS+cmake configuration. 2021-06-28 09:13:02 -05:00
Pentarctagon
bb31ef1944
Explicitly set widgets library to static. Fixes #5823 2021-05-31 12:16:50 -05:00
Pentarctagon
90aa7c02ce
Fixup 2 - deleted something I shouldn't have. 2021-05-22 20:41:13 -05:00
Pentarctagon
40cf79a088
Fixup for Windows. 2021-05-22 18:21:05 -05:00
Pentarctagon
d3c8a09c0c
Remove history option - it's already optional. 2021-05-22 16:11:42 -05:00
Pentarctagon
6bccce4d0f
Some more variable cleanup. 2021-05-22 16:10:12 -05:00
Pentarctagon
e53f688c22
Expressions in else()/endif() haven't been required for years. 2021-05-22 15:45:14 -05:00
Pentarctagon
985d1a7042
Should be in the common libs variable. 2021-05-22 15:01:25 -05:00
Pentarctagon
370ec24ed7
Fixup cmake for macos. 2021-05-22 14:59:21 -05:00
Pentarctagon
367c96e2bf
Add crypt32 library to cmake. 2021-05-21 20:20:21 -05:00
loonycyborg
e5ac78527f
Merge branch 'tls_wip' 2021-05-18 11:31:51 +03:00
Pentarctagon
edfa4ac345 Update how the icu libraries are linked. 2021-05-13 19:48:36 -05:00
Pentarctagon
4030e572ea
Fix autorevision target not working on win32 or when disabled. 2021-05-12 23:44:14 -05:00
loonycyborg
56f9138de7
Merge branch 'master' into tls_wip 2021-05-12 21:39:21 +03:00
Pentarctagon
24d546df63 Some more cmake cleanups.
Also moved boost and openssl to using the "import targets" (ie: https://cmake.org/cmake/help/latest/module/FindBoost.html#imported-targets) which are apparently the modern way to use cmake. Many of the other libraries don't support that however, and SDL is only fully(?) supported using this as of cmake 3.19.
2021-05-07 15:53:21 -05:00
Pentarctagon
986e2eb998
Fixup spaces > tabs. 2021-05-07 11:25:10 -05:00
Pentarctagon
b95d72f9c1 Use cmake to create VS project files.
Due to an upstream change in vcpkg that breaks the simple integration previously available with `vcpkg integrate install`, building using that setup method is no longer possible. In order to work correctly, cmake must instead be used to generate the VS project files, since that is able to integrate with vcpkg, since vcpkg also uses cmake to build all the library dependencies.

An additional benefit of this is that it will no longer be necessary to separately update the VS project files since it will read the same source_lists files as cmake (on linux) and scons do.

This also enables running the WML unit tests on Windows with this in order to confirm that a valid wesnoth.exe is in fact being generated as well as fixes building the boost unit tests.

The warning level for both release and debug builds are now at level three, the remaining warnings have been fixed, and therefore strict builds have been enabled - any warning will now cause the build to fail, just like for the linux jobs.

Known issues:
* The boost unit tests don't actually run successfully - they fail on CI at least with an exit code on 201 - however I don't know if this is a real problem or just a problem with running headless on CI.
* The debug build doesn't quite work since the executables are built against the non-debug dlls but cmake copies over the debug dlls into the output directory. For now this can be worked around by copying the release dlls into the debug directory.
* The instructions in INSTALL.md are not very good since I don't use Windows and thus can't write anything more detailed. Ideally someone who uses Windows can add more detailed step by step instructions at some point.

Fixes #5741
2021-05-07 00:02:02 -05:00
loonycyborg
7f1f1cecdf
Fix cmake build 2021-05-06 17:09:13 +03:00
David Carlier
00bb729d58 macOs/cmake build fix proposal. 2021-04-18 12:22:34 -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
1b6802f7c4
Fix copy/paste typo. 2021-03-08 10:36:09 -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
941433e7a2
Add warning ignore from d643edc9072ba870b0db9ea364c5c3d244915273 to cmake. 2020-12-09 13:27:45 -06:00
Charles Dang
23d1db043f
Removed patched boost::bind (#5339)
This seemed to be a patch for older compilers (GCC 4.8/4.9, see 3c56630b54)
which we no longer support.
2020-12-04 11:45:16 +11: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
113a4e0913 Use mariadbpp rather than the mysql C connector.
Reasoning being:
* The result_set and other APIs are nicer to use.
* We use mariadb on our server rather than mysql, so this would minimize the chance of any incompatibilities.
* The mysql C++ connector 1.1 isn't compatible with with c++17 (https://stackoverflow.com/q/47284705).
2020-07-30 13:17:22 -05:00
Pentarctagon
f02a99785c Clang 10 warning fix: -Wstring-plus-int at src/lua/lundump.cpp:237. 2020-05-03 22:46:19 -05:00
Pentarctagon
12ce4cd43c Remove X11 linker options from cmake.
This makes cmake closer match scons' flags.
2020-02-07 16:49:50 -06:00
laikh
c5a1ac03e8 Fix MINGW (with MSYS2) build in Windows 2020-01-31 09:44:09 -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
4c74977227 Remove check for boost.thread from buildsystems since it's not used anymore 2019-09-28 14:21:04 +03:00
loonycyborg
46ceee9cf9 Remove forgotten gobject placeholder in cmake 2019-09-28 14:21:04 +03:00
Jyrki Vesterinen
4147df7efc Explicitly link to GObject (should fix #3840) 2019-01-05 17:31:00 +02:00
pentarctagon
e273684f66 Disable requirements for OpenGL/GLEW. 2018-12-31 13:26:48 -06:00