3466 Commits
Author SHA1 Message Date
Oliver Hamlet 74805a3bc6 Update version and changelog for v0.19.4 release 0.19.4 2023-05-06 21:19:54 +01:00
Oliver Hamlet 2497b5b6ce Refactor IsValidPlugin, LoadPlugins and SortPlugins
Add new methods that take std::filesystem::path objects instead of
std::string objects, and which contain the logic, and make the methods
taking std::string objects into thin wrappers around them. The new
methods avoid a repeated conversions to paths, and will replace the old
methods in the public API at some point.
2023-05-06 21:19:54 +01:00
Oliver Hamlet d7f5a518e1 Add support for MS Store's Fallout 4 DLC
The Microsoft Store installs Fallout 4 DLC to separate directories
outside of the game's install path. The relative paths are fixed: users
cannot customise the install paths (aside from the folder within which
all games are installed on a drive), and renaming the DLC's path or its
Content directory causes an error when trying to launch the game.

The game scans these additional data paths similarly to how it scans
the main data path: it doesn't only load the DLC plugins from their
data paths, it will find non-DLC plugins in them, and DLC plugins can be
moved between them and still be detected. The same is true for BA2
files and other resources.

To support these separate directories:

- GameInterface::IsValidPlugin, GameInterface::LoadPlugins
  and GameInterface::SortPlugins() now take plugin paths instead of
  plugin filenames. Relative paths are interpreted as relative to the
  data path, so the change is backwards-compatible, and absolute paths
  are used as given.
- LoadPlugins now checks that all filenames in the given paths are
  unique, which was previously required but not enforced.
- When scanning for archives, LOOT now scans the DLC data paths before
  scanning the game data path.
- libloadorder and loot-condition-interpreter have been updated to
  support the MS Store Fallout 4 DLC paths. libloadorder has built-in
  support for the Fallout 4 DLCs specifically, so does not need to be
  initialised, while loot-condition-interpreter's support is not
  specific and so it's now passed a list of data paths that includes the
  Fallout 4 DLC paths when appropriate.

When listing the DLC paths together with the game's main data path, the
order they're listed in matches the order in which the game scans them
for plugins, with the game stopping at the first directory in which it
finds a file it's looking for.

This introduces detection of whether or not a game install comes from
the Microsoft Store: like LOOT and libloadorder, libloot detects this by
looking for an appxmanifest.xml file in the install path.

The new Game::SetAdditionalDataPaths() method may be added to
GameInterface in the future: that hasn't been done yet because adding it
will break the ABI.
2023-05-06 21:16:49 +01:00
Oliver Hamlet d9a587065d Remove unused MetadataList::EvalAllConditions() 2023-04-20 18:14:17 +01:00
Oliver Hamlet c5efd9e5c2 Update version and changelog for v0.19.3 release 0.19.3 2023-03-18 21:56:15 +00:00
Oliver Hamlet 9b3db15bda Update libloadorder to 14.0.0
This includes support for Enderal and Enderal SE, and no longer
deactivates excess plugins on load.
2023-03-18 19:50:21 +00:00
Oliver Hamlet 4c6a915aec Update Boost to 1.81.0 2023-03-09 20:17:43 +00:00
Oliver Hamlet 922b68be63 Fix cyclic interaction errors listing too many vertices 2023-02-11 13:48:17 +00:00
Oliver Hamlet 3a070420c8 Update version and changelog for v0.19.2 release 0.19.2 2023-01-13 21:27:03 +00:00
Oliver Hamlet 2c0538765b Add tests for PluginGraph::addHardcodedPluginEdges() 2023-01-13 21:27:03 +00:00
Oliver Hamlet 227ec847c8 Reintroduce validation of specific and hardcoded edges
So that any data or metadata contradicting master flags will cause
a cyclic interaction error as they did before the plugin graph was split
in 232202c17e.
2023-01-13 21:27:02 +00:00
Oliver Hamlet 1b0ed35a7f Rewrite PluginSortTest group tests and add many more
Most of the existing tests ave been rewritten as PluginGraphTest tests,
because the tests can be simpler, faster, clearer and more tightly
scoped to the functionality that's actually being tested.
2023-01-13 21:27:02 +00:00
Oliver Hamlet 9e06db4d16 Fix avoidance of group cycles involving user metadata
This bug was introduced in 53e2dbba1f,
and affects libloot v0.19.1.
2023-01-13 17:20:14 +00:00
Oliver Hamlet 6c1d7dc57f Update version and changelog for v0.19.1 release 0.19.1 2023-01-09 19:13:26 +00:00
Oliver Hamlet 58df21f11c Revert back to using lexicographical vertex order
For vertices in the plugin graph. This is so that the group and overlap
edges are evaluated in an order that does not depend on the current load
order. Tie-breaking still uses the current load order.

This is necessary because if the group and overlap edges that get added
depend on the current load order, sorting and applying changes the
current load order, so sorting again may give different results even
even though no plugin data or metadata has changed.
2023-01-09 19:00:41 +00:00
Oliver Hamlet 53e2dbba1f Refactor SortPlugins() for ease of testing
Expose a new overload that doesn't depend on Game and call that
from the existing SortPlugins() function.
2023-01-09 18:54:24 +00:00
Oliver Hamlet 938d5bce57 Update version and changelog for v0.19.0 release 0.19.0 2023-01-07 19:21:35 +00:00
Oliver Hamlet 614a8d306c Add missing doxygen doc comment 2023-01-07 19:21:34 +00:00
Oliver Hamlet aaf05a6460 Find predecessor group plugins on demand
Rather than storing them in PluginSortingData, which is now immutable.

This also means the predecessor groups plugins map can use vertices
instead of plugin names, which is a
little simpler.
2023-01-06 22:30:12 +00:00
Oliver Hamlet a82f9a8f99 Return vertex from PluginGraph::AddVertex() 2023-01-06 22:20:37 +00:00
Oliver Hamlet 1abba782f0 Clean up some includes 2023-01-06 22:20:36 +00:00
Oliver Hamlet 7a8f5da170 Check plugin validity in parallel
This is about 30% faster.
2023-01-06 22:20:36 +00:00
Oliver Hamlet 8c40db89fd Use C++17 parallel algorithms during plugin loading
This requires linking to the TBB library on Linux, where libstdc++
and libc++ don't provide an implementation.
2023-01-06 22:20:36 +00:00
Oliver Hamlet 055161ef0e Update CI Linux builds to use GCC 10
GCC 8 doesn't support C++17's parallel algorithms, which I'd like to
use, and GCC 10 is the newest major version available from Ubuntu
20.04's repositories.

This commit removes a Linux-only std::filesystem::path constructor test,
which fails due to a thrown exception when compiled with GCC 10. The
failure isn't important, because libloot avoids that particular
constructor: in a sense an exception is a bit better because it would
make any usage more obvious.
2023-01-06 22:20:35 +00:00
Oliver Hamlet 43ee1549d2 Distinguish between overlap edge types
By providing different edge types for record overlap and asset overlap.
2023-01-06 22:20:35 +00:00