This commit is contained in:
MihailRis
2025-09-22 00:06:21 +03:00
parent f02e6c65d8
commit 64b94a3e1b
6 changed files with 53 additions and 44 deletions
+15 -6
View File
@@ -1,14 +1,15 @@
#pragma once
#include "typedefs.hpp"
#include "content_fwd.hpp"
#include "io/io.hpp"
#include "util/EnumMetadata.hpp"
#include <stdexcept>
#include <string>
#include <vector>
#include <optional>
#include "typedefs.hpp"
#include "content_fwd.hpp"
#include "io/io.hpp"
class EnginePaths;
class contentpack_error : public std::runtime_error {
@@ -25,11 +26,19 @@ public:
io::path getFolder() const;
};
enum class DependencyVersionOperator {
enum class VersionOperator {
EQUAL, GREATHER, LESS,
GREATHER_OR_EQUAL, LESS_OR_EQUAL
};
VC_ENUM_METADATA(VersionOperator)
{"=", VersionOperator::EQUAL},
{">", VersionOperator::GREATHER},
{"<", VersionOperator::LESS},
{">=", VersionOperator::GREATHER_OR_EQUAL},
{"<=", VersionOperator::LESS_OR_EQUAL},
VC_ENUM_END
enum class DependencyLevel {
REQUIRED, // dependency must be installed
OPTIONAL, // dependency will be installed if found
@@ -41,7 +50,7 @@ struct DependencyPack {
DependencyLevel level;
std::string id;
std::string version;
std::string op;
VersionOperator op;
};
struct ContentPackStats {