DataStaticsFields.cpp used to contain identity_traits specializations for
primitive and opaque STL types, as well as macros used for the generated struct
field definitions. Only one of these were actually used in any compilation unit,
and the identity_traits definitions were hidden behind a guard to prevent them
from being compiled at all when building the struct field definitions.
Now, the identity_traits specializations live in their own file,
DataIdentity.cpp (matching their declarations, which live in DataIdentity.h).
This speeds up build times because modifying these specializations no longer
requires rebuilding all of the field definitions unnecessarily.
On Linux, libdfhack.so depends on libSDL.so, but that was not marked
inside CMake. As it's only used via LD_PRELOAD, there was no problem.
But when linking unit tests against it, this becomes necessary. It may
be wise to add a find_package(SDL) to provide the user with more
control, but just a hard-coded "SDL" should work for most installs.
The CTest module creates a BUILD_TESTING option, which clashes
(thematically, not in code) with the existing BUILD_TESTS option.
Resolve it thus:
- Deprecate BUILD_TESTS; it still works, but is marked as an advanced
option so it doesn't show in the CMake UI by default.
- Add a new BUILD_TEST_SCRIPTS that does what BUILD_TESTS used to do,
but is a "dependent" option so it goes away if BUILD_TESTING=OFF.
The up-shot is that, by default, the C++ unit tests will be built
(BUILD_TESTING=ON) and the Lua integration tests are not installed
(BUILD_TEST_SCRIPTS=OFF).
* reorganize init scripts into dfhack-config
allows player init scripts to build on defaults instead of replace them
this also moves the init scripts out of the main df directory
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* escape asterisks in docs
* remove unneeded dfhack.init file creation for test
* write the test init script to the new init dir
* create the init dir before trying to write a file
* rename default init files for clarity
* Update changelog
* Update docs/changelog.txt
Co-authored-by: Alan <lethosor@users.noreply.github.com>
* Try to get buildmaster to work with old branches
* Update changelog
* get keybindings from all init scripts
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix spacing in changelog
* split default loading into its own file
* update docs with new changes
* update help text wording in default init files
* Apply suggestions from code review
Co-authored-by: Alan <lethosor@users.noreply.github.com>
* Alphabetize changelog
* Update onMapLoad.default.init
* Update onMapLoad.init
* Update Core.rst
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Alan <lethosor@users.noreply.github.com>
* test jsoncpp upgrade
* use new json library target name
* don't remap the output dirs
* undo warnings at the source
* set new defaults for jsoncpp
* fix typo in new options
* fix signed comparison mismatch warning
* address random(?) compile failures
saying our std::atomic is not initialized in Debug.cpp
* update example init files
replace onLoad.init-example with documentation on how to create scripts that run on world/map load
it was confusing to show it being loaded with sc-script since it gets autorun anyway if it is just named properly
* update changelog
* add quickfort keybinding
* move standard tweaks from dreamfort init to main
Thurin reports that the path specified does not exist on macOS 11.2, and DFHack links successfully without it.
CMake output from the find_package(ZLib) call in /CMakeLists.txt:
Found ZLIB: /Applications/Xcode-beta.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/usr/lib/libz.tbd (found suitable version "1.2.11", minimum required is "1.1.2")
This partially reverts f02466de8a, but behavior
should be the same under MSVC, which that commit attempted to fix. From
https://cmake.org/cmake/help/v3.14/command/add_custom_command.html:
> The `BYPRODUCTS` option is ignored on non-Ninja generators except to mark
> byproducts `GENERATED`.
Since `$GENERATED_HDRS` are already marked generated, this change should have
no effect on non-Ninja generators.
Alter World to use Persistence instead of storing data in historical figures.
Fake historical figures will be converted to the new format when a world is loaded.
Added plugin_save and plugin_load functions to the plugin API.
Made the weird int7/int28 code that was in the old persistence API slightly safer.