Files

86 lines
3.4 KiB
Markdown
Raw Permalink Normal View History

2018-11-02 20:46:36 +00:00
# libloot
2025-05-11 14:48:27 +01:00
![CI](https://github.com/loot/libloot/actions/workflows/ci.yml/badge.svg?branch=master&event=push)
[![Documentation Status](https://readthedocs.org/projects/loot-api/badge/?version=latest)](http://loot-api.readthedocs.io/en/latest/?badge=latest)
2014-12-07 19:59:18 +00:00
2013-07-19 20:38:24 +01:00
## Introduction
2025-04-30 08:43:37 +01:00
LOOT is a plugin load order optimisation tool for Starfield, TES III: Morrowind, TES IV: Oblivion, TES IV: Oblivion Remastered, TES V: Skyrim, TES V: Skyrim Special Edition, TES V: Skyrim VR, Fallout 3, Fallout: New Vegas, Fallout 4, Fallout 4 VR and OpenMW. It is designed to assist mod users in avoiding detrimental conflicts, by automatically calculating a load order that satisfies all plugin dependencies and maximises each plugin's impact on the user's game.
2014-03-31 19:06:58 +02:00
LOOT also provides some load order error checking, including checks for requirements, incompatibilities and cyclic dependencies. In addition, it provides a large number of plugin-specific usage notes, bug warnings and Bash Tag suggestions.
2018-11-02 20:46:36 +00:00
libloot provides access to LOOT's metadata and sorting functionality, and the LOOT application is built using it.
2013-07-19 15:13:51 +01:00
2025-05-08 16:57:00 +01:00
libloot's core is written in Rust, and C++, Python and Node.js wrappers can be found in the `cpp`, `python` and `nodejs` subdirectories respectively.
2025-03-25 22:22:49 +00:00
2016-07-25 08:37:55 +01:00
## Downloads
2016-07-20 19:33:38 +01:00
Binary artifacts are currently only provided for the C++ wrapper.
2023-06-05 18:00:22 +01:00
Releases are hosted on [GitHub](https://github.com/loot/libloot/releases).
Snapshot builds are available as artifacts from [GitHub Actions runs](https://github.com/loot/libloot/actions), though they are only kept for 90 days and can only be downloaded when logged into a GitHub account. To mitigate these restrictions, snapshot build artifacts include a GPG signature that can be verified using the public key hosted [here](https://loot.github.io/.well-known/openpgpkey/hu/mj86by43a9hz8y8rbddtx54n3bwuuucg), which means it's possible to re-upload the artifacts elsewhere and still prove their authenticity.
The snapshot build artifacts are named like so:
2016-07-20 19:33:38 +01:00
```
2023-06-05 18:00:22 +01:00
libloot-<last tag>-<revisions since tag>-g<short revision ID>_<branch>-<platform>.<file extension>
2016-07-20 19:33:38 +01:00
```
2025-03-02 23:05:17 +00:00
## Build
2013-07-19 15:13:51 +01:00
2025-03-02 23:05:17 +00:00
Make sure you have [Rust](https://www.rust-lang.org/) installed.
2015-08-27 12:33:20 +01:00
2025-03-26 17:56:36 +00:00
To build the library, set the `LIBLOOT_REVISION` env var and then run Cargo.
2015-08-27 12:33:20 +01:00
2025-03-26 17:56:36 +00:00
Using PowerShell:
2019-02-11 21:48:50 +00:00
2025-03-02 23:05:17 +00:00
```powershell
$env:LIBLOOT_REVISION = git rev-parse --short HEAD
cargo build --release
```
2019-02-11 21:48:50 +00:00
2025-03-26 17:56:36 +00:00
Using a POSIX shell:
2015-08-27 12:33:20 +01:00
2025-03-26 17:56:36 +00:00
```sh
export LIBLOOT_REVISION=$(git rev-parse --short HEAD)
cargo build --release
```
2015-08-27 12:33:20 +01:00
2025-03-26 17:56:36 +00:00
`LIBLOOT_REVISION` is used to embed the commit hash into the build, if it's not defined then `unknown` will be used instead.
2025-03-26 17:56:36 +00:00
### Tests
2025-05-08 16:57:00 +01:00
Before running the tests, first extract the [testing-plugins](https://github.com/Ortham/testing-plugins) archive to this readme's directory (so that there's a `testing-plugins` directory there).
2014-11-11 21:38:40 +00:00
2025-03-26 17:56:36 +00:00
To do that using `curl` and `tar` in a POSIX shell:
2016-08-13 19:55:07 +01:00
2025-03-26 17:56:36 +00:00
```sh
curl -sSfL https://github.com/Ortham/testing-plugins/archive/refs/tags/1.6.2.tar.gz | tar -xz --strip=1 --one-top-level=testing-plugins
```
To do that in PowerShell:
```powershell
Invoke-WebRequest https://github.com/Ortham/testing-plugins/archive/refs/tags/1.6.2.zip -OutFile testing-plugins-1.6.2.zip
Expand-Archive testing-plugins-1.6.2.zip .
Move-Item testing-plugins-1.6.2 testing-plugins
Remove-Item testing-plugins-1.6.2.zip
```
The tests can then be run using:
2016-08-13 19:55:07 +01:00
```
2025-03-02 23:05:17 +00:00
cargo test
2016-08-13 19:55:07 +01:00
```
2025-03-02 23:05:17 +00:00
2025-03-26 17:56:36 +00:00
### API documentation
2025-06-11 17:58:02 +01:00
The Rust API's reference documentation can be built and viewed using:
2025-03-02 23:05:17 +00:00
```
cargo doc --open
```
2025-05-08 16:32:33 +01:00
2025-06-11 17:58:02 +01:00
The `docs` directory contains more general documentation.