针对没有base资源,给出warning提示

Signed-off-by: fangyunzhong <fangyunzhong2@huawei.com>
This commit is contained in:
fangyunzhong
2024-02-29 10:08:19 +08:00
parent 672c65eef5
commit ab8b9be688
7 changed files with 75 additions and 8 deletions
+2 -2
View File
@@ -38,9 +38,9 @@ public:
uint32_t MergeResourceItem(const std::map<int32_t, std::vector<ResourceItem>> &resourceInfos);
private:
uint32_t ScanModule(const std::string &input, const std::string &output,
std::map<ResType, std::vector<DirectoryInfo>> &resTypeOfDirs);
uint32_t ScanModule(const std::string &input, const std::string &output);
uint32_t ParseReference(const std::string &output);
void CheckAllItems(std::vector<std::pair<ResType, std::string>> &noBaseResource);
// id, resource items
std::map<int32_t, std::vector<ResourceItem>> items_;
+1
View File
@@ -65,6 +65,7 @@ private:
#ifdef __WIN32
bool LoadResourceItemWin(const std::string &filePath);
#endif
void CheckAllItems(std::vector<std::pair<ResType, std::string>> &noBaseResource);
const PackageParser &packageParser_;
std::map<int32_t, std::vector<std::shared_ptr<ResourceItem>>> items_;
std::map<int32_t, std::vector<std::shared_ptr<ResourceItem>>> itemsForModule_;
+1 -1
View File
@@ -39,7 +39,7 @@ const static std::string NEW_LINE_PATH = "\nat ";
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.002" };
static const int8_t RESTOOL_VERSION[VERSION_MAX_LEN] = { "Restool 5.003" };
const static int32_t TAG_LEN = 4;
enum class KeyType {
+6
View File
@@ -234,6 +234,12 @@ public:
*/
static bool IsValidName(const std::string &name);
/**
* @brief print warning msg
* @param noBaseResource set of no base resources
*/
static void PrintWarningMsg(std::vector<std::pair<ResType, std::string>> &noBaseResource);
private:
enum class IgnoreType {
IGNORE_FILE,