/developtools/global_resource_tool/src/ |
H A D | resource_util.cpp | 31 const map<string, ResourceUtil::IgnoreType> ResourceUtil::IGNORE_FILE_REGEX = { 46 void ResourceUtil::Split(const string &str, vector<string> &out, const string &splitter) in Split() 66 bool ResourceUtil::FileExist(const string &path) in FileExist() 71 bool ResourceUtil::RmoveAllDir(const string &path) in RmoveAllDir() 76 bool ResourceUtil::RmoveFile(const string &path) in RmoveFile() 81 bool ResourceUtil::OpenJsonFile(const string &path, cJSON **root) in OpenJsonFile() 103 bool ResourceUtil::SaveToJsonFile(const string &path, const cJSON *root) in SaveToJsonFile() 118 ResType ResourceUtil::GetResTypeByDir(const string &name) in GetResTypeByDir() 127 string ResourceUtil [all...] |
H A D | resource_append.cpp | 64 ResourceUtil::PrintWarningMsg(noBaseResource); in Combine() 119 if (!ResourceUtil::FileExist(resourcePath)) { in ScanResources() 120 string filePath = FileEntry::FilePath(outputPath).Append(ResourceUtil::GenerateHash(resourcePath)).GetPath(); in ScanResources() 145 if (!ResourceUtil::IslegalPath(child->GetFilePath().GetFilename())) { in ScanSubResources() 155 if (ResourceUtil::IslegalPath(entry.GetFilePath().GetFilename())) { in ScanSubResources() 167 if (ResourceUtil::IsIgnoreFile(limitKey, child->IsFile())) { in ScanSubLimitkeyResources() 215 if (ResourceUtil::IsIgnoreFile(fileCuster, child->IsFile())) { in ScanLimitKey() 224 ResType resType = ResourceUtil::GetResTypeByDir(fileCuster); in ScanLimitKey() 244 if (ResourceUtil::IsIgnoreFile(filename, child->IsFile())) { in ScanFiles() 266 return ResourceUtil in ScanFile() [all...] |
H A D | id_defined_parser.cpp | 49 idDefinedPath = ResourceUtil::GetBaseElementPath(inputPath).Append(ID_DEFINED_FILE).GetPath();
in Init() 51 if (ResourceUtil::FileExist(idDefinedPath) && startId > 0) {
in Init() 63 if (!idDefinedInput.empty() && ResourceUtil::FileExist(idDefinedInput)) {
in Init() 86 if (!ResourceUtil::FileExist(filePath)) {
in Init() 90 if (!ResourceUtil::OpenJsonFile(filePath, &root_)) {
in Init() 163 ResType resType = ResourceUtil::GetResTypeFromString(resourceId.type);
in PushResourceId() 204 if (!ResourceUtil::CheckHexStr(idStr)) {
in ParseId() 229 if (ResourceUtil::GetResTypeFromString(type->valuestring) == ResType::INVALID_RES_TYPE) {
in ParseType() 251 !ResourceUtil::IsValidName(resourceId.name)) {
in ParseName() 266 if (!ResourceUtil in ParseOrder() [all...] |
H A D | reference_parser.cpp | 124 mediaJsonId_ = idWorker_.GetId(resType, ResourceUtil::GetIdName(resName, resType)); in ParseRefInJsonFile() 140 if (isIncrement && ResourceUtil::FileExist(jsonPath)) { in ParseRefInJsonFile() 156 if (!ResourceUtil::OpenJsonFile(from, &root_)) { in ParseRefJson() 173 if (!ResourceUtil::CreateDirs(FileEntry::FilePath(to).GetParent().GetPath())) { in ParseRefJson() 177 if (!ResourceUtil::SaveToJsonFile(to, root_)) { in ParseRefJson() 186 vector<string> contents = ResourceUtil::DecomposeStrings(data); in ParseRefResourceItemData() 206 data = ResourceUtil::ComposeStrings(contents); in ParseRefResourceItemData() 304 key = "$" + ResourceUtil::ResTypeToString(ref.second) + ":" + to_string(id); in ParseRefImpl()
|
H A D | resource_directory.cpp | 35 if (ResourceUtil::IsIgnoreFile(limitKey, it->IsFile())) { in ScanResources() 74 if (ResourceUtil::IsIgnoreFile(fileCluster, it->IsFile())) { in ScanResourceLimitKeyDir() 83 ResType type = ResourceUtil::GetResTypeByDir(fileCluster); in ScanResourceLimitKeyDir()
|
H A D | resource_pack.cpp | 133 if (ResourceUtil::FileExist(resourcesPath)) { in InitOutput() 139 if (!ResourceUtil::RmoveAllDir(resourcesPath)) { in InitOutput() 173 config = ResourceUtil::GetMainPath(packageParser_.GetInputs()[0]).Append(CONFIG_JSON).GetPath(); in InitConfigJson() 174 if (!ResourceUtil::FileExist(config)) { in InitConfigJson() 175 config = ResourceUtil::GetMainPath(packageParser_.GetInputs()[0]).Append(MODULE_JSON).GetPath(); in InitConfigJson() 415 cerr << "Error: FindResourceItems invalid restype '" << ResourceUtil::ResTypeToString(type); in FindResourceItems() 416 cerr << "' vs '" << ResourceUtil::ResTypeToString(it.GetResType()) << "'." << endl; in FindResourceItems() 430 cerr << ResourceUtil::ResTypeToString(it.GetResType()) << "'." << endl; in HandleLabel() 460 ResourceUtil::StringReplace(dataPath, SEPARATOR, WIN_SEPARATOR); in CopyIcon() 464 if (!ResourceUtil in CopyIcon() [all...] |
H A D | i_resource_compiler.cpp | 50 if (ResourceUtil::IsIgnoreFile(it->GetFilePath().GetFilename(), it->IsFile())) { in Compile() 123 cerr << "Error: restype='" << ResourceUtil::ResTypeToString(nameInfo.first.first) << "' name='"; in PostCommit() 134 string idName = ResourceUtil::GetIdName(resourceItem.GetName(), resourceItem.GetResType()); in MergeResourceItem() 135 if (!ResourceUtil::IsValidName(idName)) { in MergeResourceItem()
|
H A D | binary_file_packer.cpp | 78 if (!ResourceUtil::FileExist(filePath)) { in CopyBinaryFile() 96 if (!ResourceUtil::CreateDirs(dst)) { in CopyBinaryFileImpl() 107 if (ResourceUtil::IsIgnoreFile(filename, entry->IsFile())) { in CopyBinaryFileImpl() 138 if (!ResourceUtil::CopyFileInner(path, subPath)) { in CopySingleFile()
|
H A D | select_compile_parse.cpp | 33 ResourceUtil::Split(limitParams, limitArray, ";"); in ParseTargetConfig() 39 ResourceUtil::Split(it, limit, "["); in ParseTargetConfig() 43 ResourceUtil::RemoveSpaces(limit.back()); in ParseTargetConfig() 49 ResourceUtil::Split(limit.back(), limitValues, ","); in ParseTargetConfig() 54 ResourceUtil::RemoveSpaces(limitType); in ParseTargetConfig()
|
H A D | resource_merge.cpp | 51 string configPath = ResourceUtil::GetMainPath(*it).Append(ConfigParser::GetConfigName()).GetPath(); in Init() 54 if (!ResourceUtil::FileExist(configPath)) { in Init()
|
H A D | json_compiler.cpp | 55 if (!ResourceUtil::OpenJsonFile(fileInfo.filePath, &root_)) { in CompileSingleFile() 107 cerr << "Error: '" << ResourceUtil::ResTypeToString(fileInfo.fileType) << "' must be array."; in ParseJsonArrayLevel() 113 cerr << "Error: '" << ResourceUtil::ResTypeToString(fileInfo.fileType) << "' empty."; in ParseJsonArrayLevel() 152 cerr << "Error: json parser don't support " << ResourceUtil::ResTypeToString(fileInfo.fileType) << endl; in ParseJsonObjectLevel() 375 } else if (!ResourceUtil::IsIntValue(valueNode)) { 395 if (!ResourceUtil::isUnicodeInPlane15or16(unicode)) { 431 string data = ResourceUtil::ComposeStrings(contents); 444 string type = ResourceUtil::ResTypeToString(resourceItem.GetResType()); 470 string type = ResourceUtil::ResTypeToString(resourceItem.GetResType());
|
H A D | resource_table.cpp | 173 string type = ResourceUtil::ResTypeToString(resType); in CreateIdDefined() 178 cerr << ResourceUtil::GetAllRestypeString() << endl; in CreateIdDefined() 184 cJSON_AddStringToObject(jsonItem, "name", ResourceUtil::GetIdName(name, resType).c_str()); in CreateIdDefined() 185 cJSON_AddStringToObject(jsonItem, "id", ResourceUtil::DecToHexStr(id).c_str()); in CreateIdDefined() 188 if (!ResourceUtil::SaveToJsonFile(idDefinedPath_, root)) { in CreateIdDefined() 303 string name = ResourceUtil::GetIdName(tableData.resourceItem.GetName(), in SaveRecordItem() 306 string data = ResourceUtil::ComposeStrings(contents, true); in SaveRecordItem() 494 resourceitem.SetLimitKey(ResourceUtil::PaserKeyParam(keyparams)); in ReadDataRecordStart()
|
H A D | compression_parser.cpp | 91 if (!ResourceUtil::OpenJsonFile(filePath_, &root_)) { in Init() 120 if (!ResourceUtil::CreateDirs(caches)) { in Init() 313 string realPath = ResourceUtil::RealPath(extensionPath_); in LoadImageTranscoder() 565 ret = ResourceUtil::CopyFileInner(src, dst); in CopyForTrans() 569 ret = ResourceUtil::CopyFileInner(dst, dstPath); in CopyForTrans() 578 auto res = ResourceUtil::CopyFileInner(src, dst); in CopyAndTranscode() 592 if (!ResourceUtil::CreateDirs(output)) { in CopyAndTranscode() 623 if (!ResourceUtil::CreateDirs(outputCache)) { in CheckAndScaleIcon()
|
H A D | key_parser.cpp | 36 ResourceUtil::Split(folderName, keyParts, "-"); in Parse() 99 ResourceUtil::RemoveSpaces(limitValue); in ParseLimit() 126 ResourceUtil::Split(folderName, keyParts, "_"); in ParseMccMnc() 164 ResourceUtil::Split(folderName, keyParts, "_"); in ParseLSR()
|
H A D | generic_compiler.cpp | 114 if (!ResourceUtil::CreateDirs(outputFolder)) { in CopyMediaFile() 120 return ResourceUtil::CopyFileInner(fileInfo.filePath, output); in CopyMediaFile()
|
H A D | cmd_parser.cpp | 122 string inputPath = ResourceUtil::RealPath(argValue); in AddInput() 143 string sysIdDefinedPath = ResourceUtil::RealPath(argValue); in AddSysIdDefined() 181 output_ = ResourceUtil::RealPath(argValue); in AddOutput() 222 ResourceUtil::Split(argValue, moduleNames_, ","); in AddMoudleNames() 310 string appendPath = ResourceUtil::RealPath(argValue); in AddAppend()
|
H A D | file_manager.cpp | 43 ResourceUtil::PrintWarningMsg(noBaseResource); in ScanModules() 143 if (!ResourceUtil::RmoveFile(fullOutPath)) { in ScaleIcon()
|
H A D | config_parser.cpp | 75 if (!ResourceUtil::OpenJsonFile(filePath_, &root_)) { in Init() 126 if (ResourceUtil::SaveToJsonFile(filePath, root_)) { in Save() 282 if (iconIdNode && ResourceUtil::IsIntValue(iconIdNode)) { in ParseAbilitiy() 290 if (labelIdNode && ResourceUtil::IsIntValue(labelIdNode)) { in ParseAbilitiy()
|
H A D | resource_check.cpp | 82 uint32_t normalSize = ResourceUtil::GetNormalSize(resourceItem.GetKeyParam(), result->second);
in CheckNodeInResourceItem()
|
H A D | resource_module.cpp | 38 if (!ResourceUtil::FileExist(modulePath_)) { in ScanResource()
|
H A D | resconfig_parser.cpp | 33 if (!ResourceUtil::OpenJsonFile(filePath, &root_)) { in Init()
|
H A D | id_worker.cpp | 66 resourceId.type = ResourceUtil::ResTypeToString(it.first.first); in GetHeaderId()
|
/developtools/global_resource_tool/include/ |
H A D | resource_util.h | 27 class ResourceUtil { class
|