Update loot-condition-interpreter to v2.0.0

Using its new cbindgen config file needs an update to cbindgen v0.9.0.
This commit is contained in:
Oliver Hamlet
2019-06-30 15:21:31 +01:00
parent 6327ad369b
commit 9d45afdb0a
5 changed files with 21 additions and 14 deletions
+5 -1
View File
@@ -33,7 +33,11 @@ install:
# Add sphinx-build to PATH
- export PATH="$HOME/.local/bin:$PATH"
# Install cbindgen for generating C++ headers for Rust dependencies.
- cbindgen --version || cargo install cbindgen --version 0.6.6
- |
if [[ "$(cbindgen --version)" != *0.9.0 ]]
then
cargo install cbindgen --version 0.9.0 --force
fi
before_script:
- mkdir build
+2 -2
View File
@@ -126,11 +126,11 @@ ENDIF ()
ExternalProject_Add(loot-condition-interpreter
PREFIX "external"
URL "https://github.com/loot/loot-condition-interpreter/archive/1.3.0.tar.gz"
URL "https://github.com/loot/loot-condition-interpreter/archive/2.0.0.tar.gz"
CONFIGURE_COMMAND ""
BUILD_IN_SOURCE 1
BUILD_COMMAND cargo build --release --manifest-path ffi/Cargo.toml --target ${RUST_TARGET} &&
cbindgen ffi/ -l c++ -o ffi/include/loot_condition_interpreter.hpp
cbindgen ffi/ -o ffi/include/loot_condition_interpreter.h
INSTALL_COMMAND "")
ExternalProject_Get_Property(loot-condition-interpreter SOURCE_DIR)
set (LCI_INCLUDE_DIRS "${SOURCE_DIR}/ffi/include")
+4 -1
View File
@@ -25,7 +25,10 @@ install:
- curl -sSf -o rustup-init.exe https://win.rustup.rs
- rustup-init.exe -y
- rustup target add i686-pc-windows-msvc
- where cbindgen || cargo install cbindgen --version 0.6.6
- ps: |
$version = cbindgen --version
if (!([string]$version).endswith('0.9.0')) { $env:INSTALL_CBINDGEN=1 }
- IF "%INSTALL_CBINDGEN%" == "1" cargo install cbindgen --version 0.9.0 --force
- nuget install doxygen -Version 1.8.14
- py -3 -m pip install -r docs/requirements.txt
- ps: (New-Object Net.WebClient).DownloadFile('https://raw.githubusercontent.com/Ortham/ci-scripts/2.1.3/delete_old_bintray_versions.py', "$env:APPVEYOR_BUILD_FOLDER\delete_old_bintray_versions.py")
+9 -9
View File
@@ -59,23 +59,23 @@ void HandleError(const std::string operation, int returnCode) {
int mapGameType(GameType gameType) {
switch (gameType) {
case GameType::tes3:
return LCI_GAME_TES3;
return LCI_GAME_MORROWIND;
case GameType::tes4:
return LCI_GAME_TES4;
return LCI_GAME_OBLIVION;
case GameType::tes5:
return LCI_GAME_TES5;
return LCI_GAME_SKYRIM;
case GameType::tes5se:
return LCI_GAME_TES5SE;
return LCI_GAME_SKYRIM_SE;
case GameType::tes5vr:
return LCI_GAME_TES5VR;
return LCI_GAME_SKYRIM_VR;
case GameType::fo3:
return LCI_GAME_FO3;
return LCI_GAME_FALLOUT_3;
case GameType::fonv:
return LCI_GAME_FNV;
return LCI_GAME_FALLOUT_NV;
case GameType::fo4:
return LCI_GAME_FO4;
return LCI_GAME_FALLOUT_4;
case GameType::fo4vr:
return LCI_GAME_FO4VR;
return LCI_GAME_FALLOUT_4_VR;
default:
throw std::runtime_error("Unrecognised game type encountered while mapping for condition evaluation.");
}
+1 -1
View File
@@ -28,7 +28,7 @@
#include <filesystem>
#include <string>
#include <loot_condition_interpreter.hpp>
#include <loot_condition_interpreter.h>
#include "api/game/game_cache.h"
#include "api/game/load_order_handler.h"