mirror of
https://github.com/openharmony/developtools_global_resource_tool.git
synced 2026-07-18 09:14:48 -04:00
support specify ignored files patterns
Signed-off-by: liduo <liduo29@huawei.com>
This commit is contained in:
@@ -86,6 +86,7 @@ private:
|
||||
uint32_t ParseTargetConfig(const std::string &argValue);
|
||||
uint32_t AddCompressionPath(const std::string &argValue);
|
||||
uint32_t ParseThread(const std::string &argValue);
|
||||
uint32_t ParseIgnoreFileRegex(const std::string &argValue);
|
||||
|
||||
static const struct option CMD_OPTS[];
|
||||
static const std::string CMD_PARAMS;
|
||||
|
||||
@@ -49,13 +49,19 @@ const static std::string SOLUTIONS_ARROW = "> ";
|
||||
const static std::string LONG_PATH_HEAD = "\\\\?\\";
|
||||
const static int32_t VERSION_MAX_LEN = 128;
|
||||
const static int32_t INT_TO_BYTES = sizeof(uint32_t);
|
||||
static const int8_t RESTOOL_VERSION[VERSION_MAX_LEN] = { "Restool 5.1.0.007" };
|
||||
static const int8_t RESTOOL_VERSION[VERSION_MAX_LEN] = { "Restool 5.1.0.008" };
|
||||
const static int32_t TAG_LEN = 4;
|
||||
constexpr static int DEFAULT_POOL_SIZE = 8;
|
||||
static std::set<std::string> g_resourceSet;
|
||||
static std::set<std::string> g_hapResourceSet;
|
||||
const static int8_t INVALID_ID = -1;
|
||||
|
||||
enum class IgnoreType {
|
||||
IGNORE_FILE,
|
||||
IGNORE_DIR,
|
||||
IGNORE_ALL
|
||||
};
|
||||
|
||||
enum class KeyType {
|
||||
LANGUAGE = 0,
|
||||
REGION = 1,
|
||||
@@ -148,6 +154,7 @@ enum Option {
|
||||
DEFINED_SYSIDS = 6,
|
||||
COMPRESSED_CONFIG = 7,
|
||||
THREAD = 8,
|
||||
IGNORED_FILE = 9,
|
||||
STARTID = 'e',
|
||||
FORCEWRITE = 'f',
|
||||
HELP = 'h',
|
||||
|
||||
@@ -266,13 +266,16 @@ public:
|
||||
* @return limit type string
|
||||
*/
|
||||
static std::string KeyTypeToStr(KeyType type);
|
||||
|
||||
/**
|
||||
* @brief add ignore file regex pattern
|
||||
* @param regex: the regex pattern
|
||||
* @param ignoreType: the ignore file type
|
||||
*/
|
||||
static void AddIgnoreFileRegex(const std::string ®ex, IgnoreType ignoreType);
|
||||
|
||||
private:
|
||||
enum class IgnoreType {
|
||||
IGNORE_FILE,
|
||||
IGNORE_DIR,
|
||||
IGNORE_ALL
|
||||
};
|
||||
static const std::map<std::string, IgnoreType> IGNORE_FILE_REGEX;
|
||||
static const std::map<std::string, IgnoreType> DEFAULT_IGNORE_FILE_REGEX;
|
||||
static std::string GetLocaleLimitkey(const KeyParam &KeyParam);
|
||||
static std::string GetDeviceTypeLimitkey(const KeyParam &KeyParam);
|
||||
static std::string GetResolutionLimitkey(const KeyParam &KeyParam);
|
||||
|
||||
@@ -84,6 +84,7 @@ constexpr uint32_t ERR_CODE_RES_HEADER_PATH_EMPTY = 11210023;
|
||||
constexpr uint32_t ERR_CODE_DUMP_MISSING_INPUT = 11210024;
|
||||
constexpr uint32_t ERR_CODE_DUMP_INVALID_INPUT = 11210025;
|
||||
constexpr uint32_t ERR_CODE_INVALID_THREAD_COUNT = 11210026;
|
||||
constexpr uint32_t ERR_CODE_INVALID_IGNORE_FILE = 11210027;
|
||||
|
||||
// 11211xxx resource pack error
|
||||
const std::string ERR_TYPE_RESOURCE_PACK = "Resource Pack Error";
|
||||
|
||||
Reference in New Issue
Block a user