Fix rid fallback graph making logic (#236) accepted/tizen/5.5/unified/20200528.043046 accepted/tizen/unified/20200528.132837 submit/tizen/20200528.002636 submit/tizen_5.5/20200528.002729
author조웅석/Common Platform Lab(SR)/Principal Engineer/삼성전자 <ws77.cho@samsung.com>
Thu, 28 May 2020 00:25:15 +0000 (09:25 +0900)
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>
Thu, 28 May 2020 00:25:15 +0000 (09:25 +0900)
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

index f88d9a9..599ab24 100644 (file)
@@ -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<std::string> RID_FALLBACK_GRAPH;
-       std::vector<std::string> RID_FALLBACK_TIZEN;
        char* tizen_rid = vconf_get_str(__TIZEN_RID_VERSION_KEY);
        if (tizen_rid) {
                std::vector<std::string> 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");