From 6da720e061c110ca81d1617c40cc5f8a4eb35d96 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=B5=9C=EC=A2=85=ED=97=8C/MDE=20Lab=28SR=29/=EC=82=BC?= =?utf8?q?=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Mon, 29 Jan 2024 08:54:56 +0900 Subject: [PATCH 1/1] TAC is applied to all dlls in the R2R mode (#502) --- NativeLauncher/tool/tac_common.cc | 44 ++++-------------------------------- NativeLauncher/tool/tac_installer.cc | 2 +- 2 files changed, 6 insertions(+), 40 deletions(-) diff --git a/NativeLauncher/tool/tac_common.cc b/NativeLauncher/tool/tac_common.cc index 71623b3..93462ec 100644 --- a/NativeLauncher/tool/tac_common.cc +++ b/NativeLauncher/tool/tac_common.cc @@ -371,19 +371,6 @@ std::vector depsJsonParser(const std::string& rootPath, const std:: } const Json::Value runtimeTargetName = root["runtimeTarget"]["name"]; const Json::Value nugetPackages = root["targets"][runtimeTargetName.asString().c_str()]; - std::vector appDependencies; - for (auto& nuget : nugetPackages.getMemberNames()) { - if (strstr(nuget.c_str(), (execName.substr(0, execName.find(".Tizen."))).c_str()) != NULL || - strstr(nuget.c_str(), (execName.substr(0, execName.find(".dll"))).c_str()) != NULL) { - const Json::Value assemblies = nugetPackages[nuget.c_str()]["runtime"]; - if (assemblies != Json::nullValue) { - const Json::Value dependencies = nugetPackages[nuget.c_str()]["dependencies"]; - for (auto& dependency : dependencies.getMemberNames()) { - appDependencies.push_back(dependency); - } - } - } - } for (auto& nuget : nugetPackages.getMemberNames()) { //Skip the nuget package related to Tizen if (strstr(nuget.c_str(), TIZEN_DOTNET_NUGET) == NULL && @@ -392,36 +379,15 @@ std::vector depsJsonParser(const std::string& rootPath, const std:: strstr(nuget.c_str(), (execName.substr(0, execName.find(".dll"))).c_str()) == NULL) { const Json::Value assemblies = nugetPackages[nuget.c_str()]["runtime"]; if (assemblies != Json::nullValue) { - const Json::Value dependencies = nugetPackages[nuget.c_str()]["dependencies"]; - bool hasDependency = false; - for (auto& dependency : dependencies.getMemberNames()) { - //Skip the nugget package that is dependent on another nuget package - if (strstr(dependency.c_str(), TIZEN_DOTNET_NUGET) == NULL && - strstr(dependency.c_str(), NET_STANDARD_LIBRARY_NUGET) == NULL) { - hasDependency = true; - for (auto& ad : appDependencies) { - if (!strcmp(ad.c_str(), dependency.c_str())) { - hasDependency = true; - break; - } else { - hasDependency = false; - } - } - if (hasDependency) break; - } - } - if (!hasDependency) { - // handle assembly even though that is included in the TPA. - for (auto& assembly : assemblies.getMemberNames()) { - std::string assemblyName = assembly.substr(assembly.rfind('/') + 1); - parserData.push_back(nuget + ":" + assemblyName); - _INFO("Nuget : [%s] / Assembly : [%s]", nuget.c_str(), assemblyName.c_str()); - } + // handle assembly even though that is included in the TPA. + for (auto& assembly : assemblies.getMemberNames()) { + std::string assemblyName = assembly.substr(assembly.rfind('/') + 1); + parserData.push_back(nuget + ":" + assemblyName); + _INFO("Nuget : [%s] / Assembly : [%s]", nuget.c_str(), assemblyName.c_str()); } } } } - appDependencies.clear(); ifs.close(); } } diff --git a/NativeLauncher/tool/tac_installer.cc b/NativeLauncher/tool/tac_installer.cc index 7444f94..c01a616 100644 --- a/NativeLauncher/tool/tac_installer.cc +++ b/NativeLauncher/tool/tac_installer.cc @@ -997,7 +997,7 @@ void install_Clean() } for (auto& cl : createLibraries) { - changeOwnershipTAC(cl); + copySmackAndOwnership(__DOTNET_DIR, cl); } } -- 2.7.4