Original code from mesilliac in #6826. Made a separate PR for this since the relevant code moved to an entirely separate file and trying to "properly" fix the merge conflicts resulting from that isn't worth the time.
This reverts commits 7ce1bf9f7d and c6a2dc9317.
OpenSSL >= 3.0 was required (but only when building with CMake) so that
src/preferences/credentials.cpp could use EVP_EncryptInit_ex2() (commit
a880f01a31), but that change was reverted (commit 83ab05532a), all
within three hours.
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.
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
Reasons:
* These projectfiles are still 32-bit, whereas all other builds for all other OSes are now 64-bit.
* Relatedly, these projectfiles are dependent on the libraries kept at the aquileia/external repository.
* VS2019 is still listed as supporting Windows 7, so there is a minimal likelihood of developers not being able to use VS2019.
* The VS2019 projectfiles instead use vcpkg to get the required dependencies, which is easier to setup than the aquileia/external prebuilt libraries.
* It's one less thing that needs to be updated whenever source files are added/moved/removed.
* It's two fewer jobs that Travis needs to run, which means Travis builds will finish more quickly.
When iceiceice (@cbeck88) added "save screenshots as PNGs" support back in 2014
(8dfdc6b185) we had yet to switch to SDL 2. At the
time, SDL_Image didn't provide any method of saving PNG files on its own. However,
it does as of SDL_Image 2.0.0.
A small caveat is that this built-in PNG save functionality is a bit less efficient
at compression than SDL_SavePNG. A test in DiD S1 with SDL_SavePNG_RW vs IMG_SavePNG_RW
yielded a file ~ 1 MB larger in the latter case.
This removed SDL_SavePNG and it's optional build-time dependency of libpng.
At branch 'doc-from-discord-boost-discussion-20170926'.
The build documentation and scripts were slightly out of date about
Boost. This commit makes a (probably interim) update to them.
(CMakeLists.txt|SConstruct): `wesnoth` won't build using Boost earlier
than '1.50.0'. Boost 1.50.0 changed the location of version 3 of Boost
filesystem, from 'boost/filesystem/v3/' (e.g. for
'using boost::filesystem::v3::path;') to 'boost/filesystem/' (e.g. for
'using boost::filesystem::path;', enforced since the very introduction
of 'src/filesystem_boost.cpp'), making it incompatible unless using
precompiler directives for supporting backwards versions of Boost
filesystem prior than '1.50.0'. Using Boost 1.50.0 (and 51, 52 etc.)
`wesnoth` is able build and run. I checked using `ldd` that I am right
about the run time environment.
INSTALL.md: Requirement of Boost libraries version up to date.
projectfiles/VC12/README.md: Requirement of Boost libraries up to
date, only the statement of which one is the minimum version, not the
rest of the build guide for Boost as requirement.
.gitignore: Add KDevelop backup documents.
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.)