From 2c1d99d518f1d5d8720d6ef4f5cd1f9ac38df62b Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=A1=B0=EC=9B=85=EC=84=9D/Common=20Platform=20Lab=28SR=29?= =?utf8?q?/Principal=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Thu, 28 May 2020 09:25:15 +0900 Subject: [PATCH] Fix rid fallback graph making logic (#236) RID tizen-[version]-armel, tizen-[version] is missed. And, /usr/share/dotnet.tizen/netcoreapp and /usr/share/dotnet.tizen/lib should be checked first. Afterwards, when the function of loading the app dll first comes in, the order of searching this native library must also be changed. --- NativeLauncher/launcher/lib/dotnet_launcher.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/NativeLauncher/launcher/lib/dotnet_launcher.cc b/NativeLauncher/launcher/lib/dotnet_launcher.cc index f88d9a9..599ab24 100644 --- a/NativeLauncher/launcher/lib/dotnet_launcher.cc +++ b/NativeLauncher/launcher/lib/dotnet_launcher.cc @@ -78,15 +78,14 @@ static const char* __TIZEN_RID_VERSION_KEY = "db/dotnet/tizen_rid_version"; static std::string getExtraNativeLibDirs(const std::string& appRoot) { std::vector RID_FALLBACK_GRAPH; - std::vector RID_FALLBACK_TIZEN; char* tizen_rid = vconf_get_str(__TIZEN_RID_VERSION_KEY); if (tizen_rid) { std::vector version; splitPath(tizen_rid, version); std::reverse(std::begin(version), std::end(version)); for (unsigned int i = 0; i < version.size(); i++) { - RID_FALLBACK_TIZEN.push_back(std::string("tizen." + version[i] + "-" + ARCHITECTURE_IDENTIFIER)); - RID_FALLBACK_TIZEN.push_back(std::string("tizen." + version[i])); + RID_FALLBACK_GRAPH.push_back(std::string("tizen." + version[i] + "-" + ARCHITECTURE_IDENTIFIER)); + RID_FALLBACK_GRAPH.push_back(std::string("tizen." + version[i])); } free(tizen_rid); } @@ -452,7 +451,7 @@ int CoreRuntime::initialize(LaunchMode launchMode) std::string appTac = concatPath(appBin, TAC_SYMLINK_SUB_DIR); std::string probePath = appRoot + ":" + appBin + ":" + appLib + ":" + appTac; std::string NIprobePath = concatPath(appBin, APP_NI_SUB_DIR) + ":" + concatPath(appLib, APP_NI_SUB_DIR) + ":" + appTac; - std::string nativeLibPath = getExtraNativeLibDirs(appRoot) + ":" + appBin + ":" + appLib + ":" + __nativeLibDirectory + ":" + runtimeDir; + std::string nativeLibPath = runtimeDir + ":" + __nativeLibDirectory + ":" + getExtraNativeLibDirs(appRoot) + ":" + appBin + ":" + appLib; if (!initializeCoreClr(appName.c_str(), probePath.c_str(), NIprobePath.c_str(), nativeLibPath.c_str(), tpa.c_str())) { _ERR("Failed to initialize coreclr"); -- 2.7.4