From: j-h.choi Date: Mon, 4 Nov 2024 07:23:47 +0000 (+0900) Subject: TLC also supports lib directory X-Git-Tag: accepted/tizen/9.0/unified/20241121.045854~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cbaf331f2438afcbd6905d9fa6b8a09ef6b6f95e;p=platform%2Fcore%2Fdotnet%2Flauncher.git TLC also supports lib directory Change-Id: I45ec7529922710b06f38c99237d5b9dc3c95a519 --- diff --git a/NativeLauncher/tool/tac_common.cc b/NativeLauncher/tool/tac_common.cc index 9dbe5ef..99a9f13 100644 --- a/NativeLauncher/tool/tac_common.cc +++ b/NativeLauncher/tool/tac_common.cc @@ -427,18 +427,22 @@ std::vector depsJsonParser(const std::string& rootPath, const std:: std::vector getLibrariesInfo(const std::string& rootPath) { std::vector LibrariesInfo; - std::string binDir = concatPath(rootPath, "bin"); - if (!exist(binDir)) - return LibrariesInfo; + std::vector paths = {concatPath(rootPath, "bin"), concatPath(rootPath, "lib")}; auto convert = [&LibrariesInfo](const std::string& filepath, const std::string& filename) { if (filename.find(".so", filename.size() - 3) != std::string::npos || filepath.rfind(".so.") != std::string::npos) { - std::string buffer = SHA256(filepath); - LibrariesInfo.push_back(filepath + ":" + buffer); - _INFO("Library : [%s] / SHA256 : [%s]", filename.c_str(), buffer.c_str()); + // Skip symlink file + if (!isSymlinkFile(filepath)) { + std::string buffer = SHA256(filepath); + LibrariesInfo.push_back(filepath + ":" + buffer); + _INFO("Library : [%s] / SHA256 : [%s]", filename.c_str(), buffer.c_str()); + } } }; - scanFilesInDirectory(binDir, convert, -1); + + for (auto& path : paths) { + scanFilesInDirectory(path, convert, -1); + } return LibrariesInfo; }