diff --git a/include/resource_data.h b/include/resource_data.h index 1be5482c330662453288e755f8795e262c05ef24..2822ca80ff594dca099bf3f9768d31d31db96bcf 100644 --- a/include/resource_data.h +++ b/include/resource_data.h @@ -55,7 +55,7 @@ constexpr static int DEFAULT_POOL_SIZE = 8; static std::set g_resourceSet; static std::set g_hapResourceSet; const static int8_t INVALID_ID = -1; -const static int MIN_SUPPORT_NEW_MODULE_API_VERSION = 60000020; +const static int MIN_SUPPORT_NEW_MODULE_API_VERSION = 50101017; enum class IgnoreType { IGNORE_FILE, diff --git a/include/resource_table.h b/include/resource_table.h index 2fb3e0c747561b9b17f43bb9c69d006188862409..eb8d2c89e5f993df7a02b0ad3d3dca96b8d10bf7 100644 --- a/include/resource_table.h +++ b/include/resource_table.h @@ -17,6 +17,7 @@ #define OHOS_RESTOOL_RESOURCE_TABLE_H #include +#include #include #include #include @@ -115,7 +116,7 @@ private: uint32_t resId = 0; uint32_t length = 0; uint32_t valueCount = 0; - std::unordered_map dataOffset; // + std::map dataOffset; // }; struct DataHeader { diff --git a/src/resource_table.cpp b/src/resource_table.cpp index 55073f286ee298cbadeaee4d6530954041dfe0e2..ff96b816df655a35cf8247633a22f123252e985f 100644 --- a/src/resource_table.cpp +++ b/src/resource_table.cpp @@ -335,7 +335,7 @@ void ResourceTable::PrepareResIndex(IdSetHeader &idSetHeader, const TableData &t ResIndex resIndex; resIndex.resId = tableData.id; - resIndex.name = tableData.resourceItem.GetName(); + resIndex.name = ResourceUtil::GetIdName(tableData.resourceItem.GetName(),resType); resIndex.length = resIndex.name.length(); idSetHeader.resTypes[resType].resIndexs[tableData.id] = resIndex; idSetHeader.resTypes[resType].length += ResIndex::RES_INDEX_LEN + resIndex.length;