mirror of
https://github.com/ModOrganizer2/modorganizer-lootcli.git
synced 2026-07-27 14:01:00 -07:00
libloot 0.29.3 update (#28)
This commit is contained in:
@@ -7,7 +7,7 @@ repos:
|
||||
- id: check-merge-conflict
|
||||
- id: check-case-conflict
|
||||
- repo: https://github.com/pre-commit/mirrors-clang-format
|
||||
rev: v19.1.5
|
||||
rev: v22.1.2
|
||||
hooks:
|
||||
- id: clang-format
|
||||
'types_or': [c++, c]
|
||||
|
||||
+3
-3
@@ -14,7 +14,7 @@ find_package(libloot CONFIG REQUIRED)
|
||||
find_package(Boost REQUIRED CONFIG COMPONENTS locale)
|
||||
|
||||
# avoid CMake error/warning
|
||||
set_target_properties(libloot::loot PROPERTIES
|
||||
set_target_properties(libloot::libloot PROPERTIES
|
||||
MAP_IMPORTED_CONFIG_RELEASE RelWithDebInfo
|
||||
MAP_IMPORTED_CONFIG_MINSIZEREL RelWithDebInfo
|
||||
)
|
||||
@@ -42,7 +42,7 @@ target_compile_definitions(lootcli
|
||||
target_include_directories(lootcli PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/../include)
|
||||
target_precompile_headers(lootcli PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/pch.h)
|
||||
target_link_libraries(lootcli
|
||||
PRIVATE libloot::loot Boost::headers Boost::locale
|
||||
PRIVATE libloot::libloot Boost::headers Boost::locale
|
||||
tomlplusplus::tomlplusplus Qt6::Core)
|
||||
|
||||
if (MSVC)
|
||||
@@ -64,7 +64,7 @@ endif()
|
||||
|
||||
install(FILES
|
||||
$<TARGET_FILE:lootcli>
|
||||
$<TARGET_FILE:libloot::loot>
|
||||
$<TARGET_FILE:libloot::libloot>
|
||||
DESTINATION bin/loot)
|
||||
|
||||
endif()
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ namespace loot
|
||||
constexpr inline std::string_view NEHRIM_STEAM_REGISTRY_KEY =
|
||||
"Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Steam App "
|
||||
"1014940\\InstallLocation";
|
||||
static constexpr const char* DEFAULT_MASTERLIST_BRANCH = "v0.26";
|
||||
static constexpr const char* DEFAULT_MASTERLIST_BRANCH = "v0.29";
|
||||
|
||||
enum struct GameId : uint8_t
|
||||
{
|
||||
|
||||
+13
-13
@@ -19,7 +19,7 @@ namespace lootcli
|
||||
{
|
||||
static const std::set<std::string>
|
||||
oldDefaultBranches({"master", "v0.7", "v0.8", "v0.10", "v0.13", "v0.14", "v0.15",
|
||||
"v0.17", "v0.18", "v0.21"});
|
||||
"v0.17", "v0.18", "v0.21", "v0.26"});
|
||||
static const std::regex GITHUB_REPO_URL_REGEX =
|
||||
std::regex(R"(^https://github\.com/([^/]+)/([^/]+?)(?:\.git)?/?$)",
|
||||
std::regex::ECMAScript | std::regex::icase);
|
||||
@@ -263,7 +263,7 @@ void LOOTWorker::getSettings(const fs::path& file)
|
||||
|
||||
auto path = gameTable["path"].value<std::string>();
|
||||
if (path) {
|
||||
newSettings.SetGamePath(std::filesystem::u8path(*path));
|
||||
newSettings.SetGamePath(std::filesystem::path(*path));
|
||||
}
|
||||
|
||||
auto localPath = gameTable["local_path"].value<std::string>();
|
||||
@@ -272,7 +272,7 @@ void LOOTWorker::getSettings(const fs::path& file)
|
||||
throw std::runtime_error(
|
||||
"Game settings have local_path and local_folder set, use only one.");
|
||||
} else if (localPath) {
|
||||
newSettings.SetGameLocalPath(std::filesystem::u8path(*localPath));
|
||||
newSettings.SetGameLocalPath(std::filesystem::path(*localPath));
|
||||
} else if (localFolder) {
|
||||
newSettings.SetGameLocalFolder(*localFolder);
|
||||
}
|
||||
@@ -301,7 +301,7 @@ std::optional<std::string> LOOTWorker::GetLocalFolder(const toml::table& table)
|
||||
}
|
||||
|
||||
if (localPath.has_value()) {
|
||||
return std::filesystem::u8path(*localPath).filename().string();
|
||||
return std::filesystem::path(*localPath).filename().string();
|
||||
}
|
||||
|
||||
return std::nullopt;
|
||||
@@ -312,7 +312,7 @@ bool LOOTWorker::IsNehrim(const toml::table& table)
|
||||
const auto installPath = table["path"].value<std::string>();
|
||||
|
||||
if (installPath.has_value() && !installPath.value().empty()) {
|
||||
const auto path = std::filesystem::u8path(installPath.value());
|
||||
const auto path = std::filesystem::path(installPath.value());
|
||||
if (std::filesystem::exists(path)) {
|
||||
return std::filesystem::exists(path / "NehrimLauncher.exe");
|
||||
}
|
||||
@@ -344,7 +344,7 @@ bool LOOTWorker::IsEnderal(const toml::table& table,
|
||||
const auto installPath = table["path"].value<std::string>();
|
||||
|
||||
if (installPath.has_value() && !installPath.value().empty()) {
|
||||
const auto path = std::filesystem::u8path(installPath.value());
|
||||
const auto path = std::filesystem::path(installPath.value());
|
||||
if (std::filesystem::exists(path)) {
|
||||
return std::filesystem::exists(path / "Enderal Launcher.exe");
|
||||
}
|
||||
@@ -418,9 +418,9 @@ bool LOOTWorker::isLocalPath(const std::string& location, const std::string& fil
|
||||
// Could be a local path. Only return true if it points to a non-bare
|
||||
// Git repository that currently has the given branch checked out and
|
||||
// the given filename exists in the repo root.
|
||||
auto locationPath = std::filesystem::u8path(location);
|
||||
auto locationPath = std::filesystem::path(location);
|
||||
|
||||
auto filePath = locationPath / std::filesystem::u8path(filename);
|
||||
auto filePath = locationPath / std::filesystem::path(filename);
|
||||
|
||||
if (!std::filesystem::is_regular_file(filePath)) {
|
||||
return false;
|
||||
@@ -478,7 +478,7 @@ LOOTWorker::migrateMasterlistRepoSettings(loot::GameId GameId, std::string url,
|
||||
|
||||
auto filename = "masterlist.yaml";
|
||||
if (isLocalPath(url, filename)) {
|
||||
auto localRepoPath = std::filesystem::u8path(url);
|
||||
auto localRepoPath = std::filesystem::path(url);
|
||||
if (!isBranchCheckedOut(localRepoPath, branch)) {
|
||||
log(loot::LogLevel::warning,
|
||||
"The URL " + url +
|
||||
@@ -705,7 +705,7 @@ int LOOTWorker::run()
|
||||
auto lootGamePath = gamePath();
|
||||
if (!fs::is_directory(lootGamePath)) {
|
||||
if (fs::exists(lootGamePath)) {
|
||||
throw loot::FileAccessError(
|
||||
throw std::runtime_error(
|
||||
"Could not create LOOT folder for game, the path exists but is not "
|
||||
"a directory");
|
||||
}
|
||||
@@ -867,7 +867,8 @@ LOOTWorker::createJsonReport(loot::GameInterface& game,
|
||||
{
|
||||
QJsonObject root;
|
||||
|
||||
set(root, "messages", createMessages(game.GetDatabase().GetGeneralMessages(true)));
|
||||
set(root, "messages",
|
||||
createMessages(game.GetDatabase().GetGeneralMessages(true, true)));
|
||||
set(root, "plugins", createPlugins(game, sortedPlugins));
|
||||
|
||||
const auto end = std::chrono::high_resolution_clock::now();
|
||||
@@ -1107,8 +1108,7 @@ lootcli::LogLevels fromLootLogLevel(loot::LogLevel level)
|
||||
case L::warning:
|
||||
return LC::Warning;
|
||||
|
||||
case L::error: // fall-through
|
||||
case L::fatal:
|
||||
case L::error:
|
||||
return LC::Error;
|
||||
|
||||
default:
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
#define LOOTCLI_VERSION_MAJOR 1
|
||||
#define LOOTCLI_VERSION_MINOR 7
|
||||
#define LOOTCLI_VERSION_MINOR 8
|
||||
#define LOOTCLI_VERSION_MAINTENANCE 0
|
||||
#define LOOTCLI_VERSION_STRING "1.7.0"
|
||||
#define LOOTCLI_VERSION_STRING "1.8.0"
|
||||
|
||||
+3
-3
@@ -10,19 +10,19 @@
|
||||
"default-registry": {
|
||||
"kind": "git",
|
||||
"repository": "https://github.com/Microsoft/vcpkg",
|
||||
"baseline": "294f76666c3000630d828703e675814c05a4fd43"
|
||||
"baseline": "74e6536215718009aae747d86d84b78376bf9e09"
|
||||
},
|
||||
"registries": [
|
||||
{
|
||||
"kind": "git",
|
||||
"repository": "https://github.com/Microsoft/vcpkg",
|
||||
"baseline": "294f76666c3000630d828703e675814c05a4fd43",
|
||||
"baseline": "74e6536215718009aae747d86d84b78376bf9e09",
|
||||
"packages": ["boost*", "boost-*"]
|
||||
},
|
||||
{
|
||||
"kind": "git",
|
||||
"repository": "https://github.com/ModOrganizer2/vcpkg-registry",
|
||||
"baseline": "8beb2e0efa9c17dd6d17bb05288dd1e40727f673",
|
||||
"baseline": "92f063c71cebea1926c7eb183fbe719145395985",
|
||||
"packages": ["libloot"]
|
||||
}
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user