142 Commits
Author SHA1 Message Date
Oliver Hamlet c6c3056d35 Move where Windows libraries are linked
To where they're actually used. The tests don't need them, and MinGW complains if they aren't linked to the first layer of the C++ wrapper.
2026-01-31 15:29:33 +00:00
Oliver Hamlet f606f169a5 Add condition field to plugin cleaning data metadata 2026-01-21 17:55:14 +00:00
Oliver Hamlet 9c59d87f23 Change name of internal CMake custom target
It shows up when using libloot as a FetchContent dependency, and it's a bit confusing to have libloot and libloot-cpp-build when the latter isn't the one that a C++ project should really depend on.

libloot-cargo may still be confusing, but at least indicates what is involved.
2026-01-17 18:08:25 +00:00
Oliver Hamlet d14486433f Add line breaks to first two levels of metadata list output
Aside from the known bash tags list, since they're all short strings.
2026-01-14 19:02:40 +00:00
Oliver Hamlet 84ffe39a37 Use unique_ptr instead of shared_ptr for PluginInterface pointers
unique_ptr is simpler, and can be easily converted to shared_ptr if needed, and makes it obvious that each call will return a new pointer.

This does mean that if I want to hold onto the objects again in the future for some reason, that'll need the API to change back, but that seems unlikely.

unique_ptr not being copyable does make using it a little more awkward, but that only happened in one place in LOOT's code, and there the pointer needs to become shared anyway.
2026-01-03 13:32:57 +00:00
Oliver Hamlet b7363b0a29 Replace WriteMode with MetadataWriteOptions
This is a breaking API change, but the addition of any future options won't be.
2026-01-03 13:26:52 +00:00
Oliver Hamlet 72dde58e43 Preserve plugin metadata insertion order 2026-01-02 18:40:27 +00:00
Oliver Hamlet 96b2ed2373 Add include_user_metadata parameter to Database::general_messages()
The C++ wrapper defaults it to true, so the behaviour hasn't changed for
existing callers that don't pass a value for the evaluateConditions
parameter, i.e. that call GetGeneralMessages().

Since the new parameter comes before evaluateConditions,
existing GetGeneralMessages(true) and GetGeneralMessages(false) calls
need to be replaced with GetGeneralMessages(true, true) and
GetGeneralMessages(true, false) to retain their existing behaviour. The
parameter order was chosen to match that of GetPluginMetadata(), at the
cost of this backwards incompatibility.
2026-01-02 16:41:43 +00:00
Oliver Hamlet f582a513bc Add Database::set_user_general_messages() 2026-01-02 16:41:42 +00:00
Oliver Hamlet 1d123c8b21 Add Database::user_general_messages() 2026-01-02 16:41:42 +00:00
Oliver Hamlet 744586fe96 Add include_user_metadata parameter to Database::known_bash_tags()
The C++ wrapper defaults it to true, so the behaviour hasn't changed for
existing callers.
2026-01-02 16:41:07 +00:00
Oliver Hamlet db97a0786a Add Database::set_user_known_bash_tags() 2026-01-02 15:30:40 +00:00
Oliver Hamlet 2fe107d66b Add Database::user_known_bash_tags() 2026-01-02 15:30:24 +00:00
Oliver Hamlet c322e27e1e Rename CMake target from loot to libloot
On Windows using "loot" causes a name collisions with LOOT itself:

- for the MSVC project name, it clashes with LOOT's own project,
  despite the difference in case. This means that you can't build LOOT
  in Visual Studio when using FetchContent to handle the libloot
  dependency (running CMake on the CLI works though).
- for the PDB file, LOOT has LOOT.pdb and libloot has loot.pdb, which
  appear to be the same due to file paths being case-insensitive. This
  makes it more difficult to debug LOOT with the relevant debug info
  loaded.

Renaming the CMake target adds a "lib" prefix to the Visual Studio
project name and the artifact filenames:

- loot.vcxproj* -> libloot.vcxproj*
- loot.dll -> libloot.dll
- loot.lib -> libloot.lib
- loot.pdb -> libloot.pdb

The Linux build artifact filenames are unchanged, as they already had
the "lib" prefix.
2026-01-02 13:16:46 +00:00
Oliver Hamlet ee4188f917 Get read lock when retrieving general messages
Now that the Database::general_messages() function takes &self instead of &mut self, the wrappers don't need to take a write lock to call it.
2026-01-02 13:07:58 +00:00
Oliver Hamlet 46c3ddc884 Decouple clearing condition cache from evaluating general messages 2026-01-02 10:15:39 +00:00
Oliver Hamlet 364e2d25c0 Prevent copy & move of abstract classes
To prevent slicing, following C++ Core Guidelines C.21 and C.67.
2026-01-01 22:26:09 +00:00
Oliver Hamlet cdf3050503 Stop storing plugin pointers in C++ wrapper
With the documented lifetime semantics updated to just use those of std::shared_ptr<>, there's no need to cache them in the wrapper.
2026-01-01 18:13:45 +00:00
Oliver Hamlet 6ca6a01fa9 Update GameInterface docs to reflect use of smart pointers 2026-01-01 17:58:59 +00:00
Oliver Hamlet 5728e83ce0 Fix minimum required CXX version 2026-01-01 14:57:03 +00:00
Oliver Hamlet b9bde27938 Update CXX to v1.0.192 2026-01-01 14:20:11 +00:00
Oliver Hamlet 10929878d9 Update version and changelog for v0.28.4 2025-12-31 19:21:17 +00:00
Oliver Hamlet 3890c3a095 Improve some doc comments 2025-12-30 15:19:42 +00:00
Oliver Hamlet e93f1f9632 Add padding in single-item YAML flow lists
To match the style that we use in LOOT's masterlists.
2025-12-28 15:21:51 +00:00
Oliver Hamlet 94f4dc476e Avoid MSVC warning due to -fno-lto 2025-11-07 17:35:41 +00:00