From cfef9f11cffb8b2a8e8963042b783776c38edac1 Mon Sep 17 00:00:00 2001 From: Cho Woong Suk Date: Fri, 19 May 2017 13:53:50 +0900 Subject: [PATCH] support reference API directory to support PlatformNotSupport Exception Change-Id: Ib4e389fcffea849cc2235a42b844e643c2e4b92a --- NativeLauncher/installer-plugin/common.cc | 6 ++++++ NativeLauncher/launcher/dotnet/dotnet_launcher.cc | 4 ++++ NativeLauncher/launcher/dotnet/dotnet_launcher.h | 1 + 3 files changed, 11 insertions(+) diff --git a/NativeLauncher/installer-plugin/common.cc b/NativeLauncher/installer-plugin/common.cc index 9cd2109..fe89609 100644 --- a/NativeLauncher/installer-plugin/common.cc +++ b/NativeLauncher/installer-plugin/common.cc @@ -169,6 +169,12 @@ static void crossgen(const char* dllPath, const char* appPath) tpaDir.push_back(__RUNTIME_DIR); tpaDir.push_back(__DEVICE_API_DIR); + // get reference API directory ([DEVICE_API_DIR]/ref) + int len = strlen(__DEVICE_API_DIR); + char* refAPIDir = (char*)calloc(len + 4, 1); + snprintf(refAPIDir, len + 4, "%s%s", __DEVICE_API_DIR, "/ref"); + tpaDir.push_back(refAPIDir); + std::string tpa; assembliesInDirectory(tpaDir, tpa); diff --git a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc index c0b5300..d01c155 100644 --- a/NativeLauncher/launcher/dotnet/dotnet_launcher.cc +++ b/NativeLauncher/launcher/dotnet/dotnet_launcher.cc @@ -116,6 +116,9 @@ int CoreRuntime::initialize(bool standalone) __runtimeDirectory = absolutePath(__runtimeDirectory); } + // set Reference API directory + __refAPIDirectory = __deviceAPIDirectory + "/ref"; + #ifdef USE_MANAGED_LAUNCHER if (__launcherAssembly.empty()) { _ERR("Empty Launcher Assembly"); @@ -279,6 +282,7 @@ int CoreRuntime::launch(const char* appId, const char* root, const char* path, i searchDirectories.push_back(appLib); searchDirectories.push_back(__runtimeDirectory); searchDirectories.push_back(__deviceAPIDirectory); + searchDirectories.push_back(__refAPIDirectory); #ifdef USE_MANAGED_LAUNCHER searchDirectories.push_back(baseName(__launcherAssembly)); #endif diff --git a/NativeLauncher/launcher/dotnet/dotnet_launcher.h b/NativeLauncher/launcher/dotnet/dotnet_launcher.h index fb44a47..1e9bee7 100644 --- a/NativeLauncher/launcher/dotnet/dotnet_launcher.h +++ b/NativeLauncher/launcher/dotnet/dotnet_launcher.h @@ -78,6 +78,7 @@ class CoreRuntime : public tizen::runtime::LauncherInterface std::string __runtimeDirectory; std::string __launcherAssembly; std::string __nativeLibDirectory; + std::string __refAPIDirectory; void* __coreclrLib; void* __hostHandle; unsigned int __domainId; -- 2.7.4