Our implementation has a more modern interface and only
supports the features that we care about.
It always outputs `\n` as newlines and does not output BOM.
The modern interface eliminates awkward `c_str()/data()` conversions.
This implementation preserves comments and the file order of sections
and keys. New keys are written in insertion order.
We now also support modifying and adding default comments,
which may be a useful thing to do for the especially tricky
ini options (this PR doesn't add any but adds the ability to do so).
Sadly, this increases the RG99 binary size by 24 KiB.
I'm guessing this is because the map implementation generates
quite a bit of code.
Note that while it might seem that using `std::string` for every key and
value would do a lot of allocations, most of these strings are
small and thus benefit from Small String Optimization (= no allocations).
Stop using git for the version tag.
The new process is as follows:
1. The `VERSION` file contains the version.
For release, it should contain "1.5.0".
Immediately after the release, it should be changed to "1.6.0-dev".
2. The build type is included in the version string unless it is
"Release". The commit hash is now included into the version string
whenever the `VERSION` file has a suffix (i.e. 1.5.0-dev rather than
just 1.5.0). The full version string for development builds now
looks like this: `1.5.0-dev-Debug-b102dccf8`.
This means we longer need git or `-DVERSION_NUM` to get a sensible version number.
The in-development versions are now always clearly indicated with the
`-dev` suffix no matter how DevilutionX was built.
Explicitly set `-DDEVILUTIONX_SYSTEM_SDL_AUDIOLIB=OFF`
and `-DDEVILUTIONX_SYSTEM_SIMPLEINI=OFF` because we now
also support the system versions of these.
1. Adds a `libdevilution_so` target when tests are enabled.
2. Each test file is now a separate binary target linked against `libdevilutionx_so` (can now run tests in parallel).
3. Tests are now defined in a separate `test/CMakeLists.txt` file.
4. Building the tests is now controlled by the standard `BUILD_TESTING` option (defined by CTest).
5. Tests are now built by default.
6. On CI, test errors are now reported.
Also:
* `.clang-format`: Enable SortIncludes in tests
* `path_test.cpp`: Fix -Wsign-compare
With this flag (off by default), all of the dependencies are packaged
into the source archive (including SDL2 etc).
Useful for building on machines without an internet connection.
The does some pruning of the dependencies' files to avoid a 100 MiB+ tarball.
Even with that, the final tarball size is 17 MiB with xz, 25 MiB with gzip.
See the file documentation at the top of `tools/make_src_dist.py` for
more information.