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
This includes all the Win32-specific code dealing with the retrieval of
the UTF-16 version of the command line and subsequent parsing into an
array of UTF-8 strings.
The latter code is unchanged except for the function names and one local
variable originally named `is_excaped` instead of `is_escaped`.
(Note to self: ask gfgtdf if he was aware of the existence of
CommandLineToArgvW() back when he wrote the Win32 command line retrieval
logic.)
the game_config_view object offers const
access to the game_config object, furthermore
it allows the game_config config object to be
replaced by a vector of config objects which
is what we will do later.
Base64 according to RFC4648.
Crypt64 is whatever crypt() does.
The two radix-64 encodings share less code than I would like,
because base64 is stream-oriented and therefore big-endian,
while crypt is little-endian.
Coverity has been complaining about using rand() as an insecure function. As we're using it, this function is not insecure; but is also not a very good RNG. We're using MT19937 in a system-independant manner. But some uses of rand() were never converted. This converts them.
This closes the following Coverity issues:
CID 1356297
CID 1356299
CID 1356303
CID 1356304
CID 1356306
CID 1356312
CID 1356314
CID 1380163
CID 1380173
CID 1380179
CID 1380191
CID 1380198
CID 1380201
CID 1380210
CID 1380214
CID 1380215
CID 1380219
CID 1380230
CID 1380241
this has 2 advantages:
1) we can now forwaed declare the class config_attribute_value without
including config.hpp
2) the config.?pp files are a little easier to read.
This also removes the included SHA1 and MD5 implementations
in favour of those from OpenSSL.
Thanks to @jyrkive for helping to get the CMake build working and
ensuring the game still compiles with OpenSSL 1.1.0.
(The SHA_xxx() aliases were removed in OpenSSL 1.1.0.)
* Use separate files to build scons and to build lua for cmake
Move lists of source files into their own directory
Make scons use the lists of source files
Move lua build step to src/SConscript and delete src/lua/SConscript
Make cmake use the separate file with the list of lua sources to build
* Finish changing over to source lists
scons
move source files from libraries that don't appear in cmake over to existing source lists - libcampaignd, libcutter, libdummy_video, libtest_utils
add the defines FIFODIR and WESNOTH_PATH to all compiled source files, as cmake does, and move the single files those defines had previously been defined on into the source lists
remove WESNOTH_PREFIX, as not used
added schema_validator sources from cmake
added OBJPREFIX to - cutter, exploder, campaignd, schema_generator, schema_validator
cmake
change over to using the source lists
move source files from libraries that don't appear in scons over to existing source lists - wesnoth-gui_types, wesnoth-gui_event, wesnoth-gui_iterator, wesnoth-gui_placer, wesnoth-gui_tooltip, wesnoth-gui_widget, wesnoth-gui_widget_definition, wesnoth-gui1_widgets, wesnoth-schema_validator