Initialize coreclr in the candidate process and change ON_BOOT value to OFF 19/169219/1
authorCho Woong Suk <ws77.cho@samsung.com>
Thu, 25 Jan 2018 02:37:48 +0000 (11:37 +0900)
committerwoongsuk cho <ws77.cho@samsung.com>
Mon, 5 Feb 2018 05:10:46 +0000 (05:10 +0000)
Change-Id: Ia1984c310a59dc7d8d011f73c2dbd64164d8c7d1
(cherry picked from commit 43a03fd7fb4fb983f493fc42599a55950ced466c)

NativeLauncher/CMakeLists.txt
NativeLauncher/dotnet.loader
NativeLauncher/launcher/dotnet/dotnet_launcher.cc
NativeLauncher/launcher/dotnet/dotnet_launcher.h
NativeLauncher/launcher/launcher.h
Tizen.Runtime/CoreClr/AssemblyLoader.cs [deleted file]
Tizen.Runtime/CoreClr/AssemblyManager.cs [deleted file]
Tizen.Runtime/Log.cs [deleted file]
Tizen.Runtime/Tizen.Runtime.csproj [deleted file]
packaging/dotnet-launcher.spec

index 166e542..98d60c8 100644 (file)
@@ -18,10 +18,6 @@ IF(DEFINED LAUNCHER_CONFIG_PATH)
     SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DLAUNCHER_CONFIG_PATH=${LAUNCHER_CONFIG_PATH}")
 ENDIF(DEFINED LAUNCHER_CONFIG_PATH)
 
-IF(DEFINED CORECLR_LAUNCHER_ASSEMBLY_PATH)
-    SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DCORECLR_LAUNCHER_ASSEMBLY_PATH=${CORECLR_LAUNCHER_ASSEMBLY_PATH}")
-ENDIF(DEFINED CORECLR_LAUNCHER_ASSEMBLY_PATH)
-
 IF(DEFINED DEVICE_API_DIR)
     SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DDEVICE_API_DIR=${DEVICE_API_DIR}")
 ENDIF(DEFINED DEVICE_API_DIR)
@@ -42,10 +38,6 @@ IF(DEFINED NATIVE_LIB_DIR)
     SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -DNATIVE_LIB_DIR=${NATIVE_LIB_DIR}")
 ENDIF(DEFINED NATIVE_LIB_DIR)
 
-IF(USE_MANAGED_LAUNCHER STREQUAL "ENABLE")
-    ADD_DEFINITIONS("-DUSE_MANAGED_LAUNCHER")
-ENDIF(USE_MANAGED_LAUNCHER)
-
 OPTION(NOT_USE_FUNCTION "Remove build warning" OFF)
 IF(NOT_USE_FUNCTION)
     ADD_DEFINITIONS("-DNOT_USE_FUNCTION")
@@ -136,4 +128,4 @@ IF(NOT DEFINED NO_TIZEN)
     INSTALL(FILES dotnet.loader DESTINATION ${LOADERDIR})
     INSTALL(FILES dotnet.launcher DESTINATION ${LOADERDIR})
     INSTALL(FILES dotnet.debugger DESTINATION ${LOADERDIR})
-ENDIF(NOT DEFINED NO_TIZEN)
\ No newline at end of file
+ENDIF(NOT DEFINED NO_TIZEN)
index 78bb74f..9fac64c 100644 (file)
@@ -4,6 +4,7 @@ EXE                    /usr/bin/dotnet-launcher
 APP_TYPE               dotnet
 DETECTION_METHOD       TIMEOUT|DEMAND
 TIMEOUT                5000
+ON_BOOT                OFF
 EXTRA_ARRAY            preload
 EXTRA_ARRAY_VAL        /usr/lib/libappcore-efl.so.1
 EXTRA_ARRAY_VAL        /usr/lib/libappcore-common.so.1
index 36df3ca..265c925 100644 (file)
 #include <fstream>
 #include <vector>
 
+#include <fcntl.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
 #include "utils.h"
 #include "log.h"
 #include "launcher.h"
@@ -49,7 +55,8 @@ CoreRuntime::CoreRuntime() :
        pluginSetCoreclrInfo(nullptr),
        pluginGetDllPath(nullptr),
        pluginBeforeExecute(nullptr),
-       pluginFinalize(nullptr)
+       pluginFinalize(nullptr),
+       fd(0)
 {
 #define __XSTR(x) #x
 #define __STR(x) __XSTR(x)
@@ -64,12 +71,6 @@ CoreRuntime::CoreRuntime() :
        __nativeLibDirectory = __STR(NATIVE_LIB_DIR);
 #endif
 
-#ifdef USE_MANAGED_LAUNCHER
-#ifdef CORECLR_LAUNCHER_ASSEMBLY_PATH
-       __launcherAssembly = __STR(CORECLR_LAUNCHER_ASSEMBLY_PATH);
-#endif
-#endif
-
 #undef __STR
 #undef __XSTR
 
@@ -131,15 +132,6 @@ int CoreRuntime::initialize(bool standalone)
        // set Reference API directory
        __refAPIDirectory = __deviceAPIDirectory + "/ref";
 
-#ifdef USE_MANAGED_LAUNCHER
-       if (__launcherAssembly.empty()) {
-               _ERR("Empty Launcher Assembly");
-               return 1;
-       } else {
-               __launcherAssembly = absolutePath(__launcherAssembly);
-       }
-#endif
-
        std::string libCoreclr(concatPath(__runtimeDirectory, "libcoreclr.so"));
 
        _DBG("libcoreclr : %s", libCoreclr.c_str());
@@ -172,6 +164,38 @@ int CoreRuntime::initialize(bool standalone)
        if (!standalone && pluginPreload)
                pluginPreload();
 
+       fd = open("/proc/self", O_DIRECTORY);
+       std::string path_tmp = std::string("/proc/self/fd/") + std::to_string(fd);
+
+       std::string appRoot = path_tmp;
+       std::string appBin = concatPath(appRoot, "bin");
+       std::string appLib = concatPath(appRoot, "lib");
+       std::string probePath = appBin + ":" + appLib;
+
+       std::string tpa;
+       std::vector<std::string> searchDirectories;
+       searchDirectories.push_back(__runtimeDirectory);
+       searchDirectories.push_back(__deviceAPIDirectory);
+       searchDirectories.push_back(__refAPIDirectory);
+
+       if (pluginGetDllPath) {
+               std::string pluginPath = pluginGetDllPath();
+               if (!pluginPath.empty()) {
+                       searchDirectories.push_back(pluginPath);
+               }
+       }
+
+       assembliesInDirectory(searchDirectories, tpa);
+
+       std::string nativeLibPath;
+       nativeLibPath = appLib + ":" + appBin + ":" + __nativeLibDirectory;
+
+       std::string appName = std::string("dotnet-launcher-") + std::to_string(getpid());
+       if (!initializeCoreClr(appName.c_str(), probePath.c_str(), nativeLibPath.c_str(), tpa.c_str())) {
+               _ERR("Failed to initialize coreclr");
+               return 1;
+       }
+
        return 0;
 }
 
@@ -218,47 +242,6 @@ bool CoreRuntime::initializeCoreClr(const char* appId,
        return true;
 }
 
-int CoreRuntime::runManagedLauncher(const char* appId, const char* appBase, const char* tpaList)
-{
-       if (fileNotExist(__launcherAssembly)) {
-               _ERR("Launcher assembly is not exist in %s", __launcherAssembly.c_str());
-               return 1;
-       }
-
-       if (!initializeCoreClr(appId, appBase, appBase, tpaList)) {
-               _ERR("Failed to initialize coreclr");
-               return 1;
-       }
-
-#ifdef USE_MANAGED_LAUNCHER
-       void *preparedFunctionDelegate;
-       int st = createDelegate(__hostHandle, __domainId,
-                                                       "Tizen.Runtime",
-                                                       "Tizen.Runtime.Coreclr.AssemblyManager",
-                                                       "Prepared", &preparedFunctionDelegate);
-       if (st < 0) {
-               _ERR("Create delegate for Launch prepared function is fail (0x%08x)", st);
-               return 1;
-       }
-       preparedFunction = reinterpret_cast<PreparedFunctionPtr>(preparedFunctionDelegate);
-
-       if (preparedFunction != nullptr)
-               preparedFunction();
-
-       void *launchFunctionDelegate;
-       st = createDelegate(__hostHandle, __domainId,
-                                               "Tizen.Runtime",
-                                               "Tizen.Runtime.Coreclr.AssemblyManager",
-                                               "Launch", &launchFunctionDelegate);
-       if (st < 0) {
-               _ERR("Create delegate for Launch managed function is fail! (0x%08x)", st);
-               return 1;
-       }
-       launchFunction = reinterpret_cast<LaunchFunctionPtr>(launchFunctionDelegate);
-#endif
-       return 0;
-}
-
 void CoreRuntime::dispose()
 {
        if (__hostHandle != nullptr) {
@@ -307,30 +290,9 @@ int CoreRuntime::launch(const char* appId, const char* root, const char* path, i
        if (pluginSetAppInfo)
                pluginSetAppInfo(appId, path);
 
-       std::string tpa;
-       std::string appRoot = root;
-       std::string appBin = concatPath(appRoot, "bin");
-       std::string appLib = concatPath(appRoot, "lib");
-       std::string probePath = appBin + ":" + appLib + ":" + __nativeLibDirectory;
-
-       std::vector<std::string> searchDirectories;
-       searchDirectories.push_back(appBin);
-       searchDirectories.push_back(appLib);
-       if (pluginGetDllPath) {
-               std::string pluginPath = pluginGetDllPath();
-               if (!pluginPath.empty()) {
-                       probePath = probePath + ":" + pluginPath;
-                       searchDirectories.push_back(pluginPath);
-               }
-       }
-       searchDirectories.push_back(__runtimeDirectory);
-       searchDirectories.push_back(__deviceAPIDirectory);
-       searchDirectories.push_back(__refAPIDirectory);
-#ifdef USE_MANAGED_LAUNCHER
-       searchDirectories.push_back(baseName(__launcherAssembly));
-#endif
-
-       assembliesInDirectory(searchDirectories, tpa);
+       int fd2 = open(root, O_DIRECTORY);
+       dup3(fd2, fd, O_CLOEXEC);
+       close(fd2);
 
        if (pluginBeforeExecute)
                pluginBeforeExecute();
@@ -339,27 +301,11 @@ int CoreRuntime::launch(const char* appId, const char* root, const char* path, i
                _ERR("Failed to create logging thread");
        }
 
-#ifdef USE_MANAGED_LAUNCHER
-       runManagedLauncher(appId, probePath.c_str(), tpa.c_str());
-
-       bool success = false;
-       if (launchFunction != nullptr) {
-               success = launchFunction(root, path, argc, argv);
-               if (!success)
-                       _ERR("Failed to launch Application %s", path);
-               return success ? 0 : 1;
-       } else {
-               _ERR("Failed to find launch function");
-               return 1;
-       }
-#else
-       int st = initializeCoreClr(appId, probePath.c_str(), probePath.c_str(), tpa.c_str());
        unsigned int ret = 0;
-       st = executeAssembly(__hostHandle, __domainId, argc, (const char**)argv, path, &ret);
+       int st = executeAssembly(__hostHandle, __domainId, argc, (const char**)argv, path, &ret);
        if (st < 0)
                _ERR("Failed to Execute Assembly %s (0x%08x)", path, st);
        return ret;
-#endif
 }
 
 }  // namespace dotnetcore
index aaaa9d8..998b0f8 100644 (file)
@@ -83,7 +83,6 @@ class CoreRuntime : public tizen::runtime::LauncherInterface
                ~CoreRuntime();
                int initialize(bool standalone) override;
                void dispose() override;
-               int runManagedLauncher(const char* appId, const char* appBase, const char* tpaList) override;
                int launch(const char* appId, const char* root, const char* path, int argc, char* argv[]) override;
 
        private:
@@ -94,7 +93,6 @@ class CoreRuntime : public tizen::runtime::LauncherInterface
                coreclr_create_delegate_ptr createDelegate;
                std::string __deviceAPIDirectory;
                std::string __runtimeDirectory;
-               std::string __launcherAssembly;
                std::string __nativeLibDirectory;
                std::string __refAPIDirectory;
                void* __coreclrLib;
@@ -111,6 +109,7 @@ class CoreRuntime : public tizen::runtime::LauncherInterface
                plugin_get_dll_path_ptr pluginGetDllPath;
                plugin_before_execute_ptr pluginBeforeExecute;
                plugin_finalize_ptr     pluginFinalize;
+               int fd;
 };
 
 }  // dotnetcore
index ce91241..38934b4 100644 (file)
@@ -28,7 +28,6 @@ class LauncherInterface
        public:
                virtual int initialize(bool standalone) = 0;
                virtual void dispose() = 0;
-               virtual int runManagedLauncher(const char* appId, const char* appBase, const char* tpaList) = 0;
                virtual int launch(const char* appId, const char* root, const char* path, int argc, char* argv[]) = 0;
 };
 
diff --git a/Tizen.Runtime/CoreClr/AssemblyLoader.cs b/Tizen.Runtime/CoreClr/AssemblyLoader.cs
deleted file mode 100644 (file)
index c6de690..0000000
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.IO;
-using System.Linq;
-using System.Reflection;
-using System.Runtime.Loader;
-using System.Collections.Generic;
-
-namespace Tizen.Runtime.Coreclr
-{
-    public class AssemblyLoader : AssemblyLoadContext
-    {
-        private const string NativeAssemblyInfix = ".ni";
-        private const string DllAssemblySuffix = ".dll";
-        private const string ExeAssemblySuffix = ".exe";
-        private const string NativeDllAssemblySuffix = NativeAssemblyInfix + DllAssemblySuffix;
-        private static readonly string[] Suffixes = new string[] { NativeDllAssemblySuffix, DllAssemblySuffix, ExeAssemblySuffix };
-        private SortedSet<string> DllDirectoriesSet = new SortedSet<string>();
-        private SortedSet<string> NativeDirectoriesSet = new SortedSet<string>();
-        private HashSet<FileInfo> AssemblyCacheSet = new HashSet<FileInfo>();
-
-        public AssemblyLoader()
-        {
-            AssemblyLoadContext.Default.Resolving += OnResolving;
-        }
-
-        public IEnumerable<string> DllDirectories
-        {
-            get { return DllDirectoriesSet; }
-        }
-
-        public IEnumerable<string> NativeDirectories
-        {
-            get { return NativeDirectoriesSet; }
-        }
-
-        public void AddSearchableDirectory(string directory)
-        {
-            if (Directory.Exists(directory))
-            {
-                DllDirectoriesSet.Add(directory);
-                NativeDirectoriesSet.Add(directory);
-
-                foreach (var file in Directory.GetFiles(directory))
-                {
-                    var info = new FileInfo(file);
-
-                    if (Suffixes.Contains(info.Extension))
-                    {
-                        AssemblyCacheSet.Add(info);
-                    }
-                }
-            }
-        }
-
-        public void RemoveSearchableDirectory(string directory)
-        {
-            DllDirectoriesSet.Remove(directory);
-            NativeDirectoriesSet.Remove(directory);
-
-            AssemblyCacheSet.RemoveWhere(x => x.DirectoryName == directory);
-        }
-
-        public Assembly LoadFromPath(string path)
-        {
-            if (string.Compare(path, path.Length - NativeDllAssemblySuffix.Length, NativeAssemblyInfix, 0, NativeAssemblyInfix.Length, StringComparison.OrdinalIgnoreCase) == 0)
-            {
-                return LoadFromNativeImagePath(path, null);
-            }
-            else
-            {
-                return LoadFromAssemblyPath(path);
-            }
-        }
-
-        protected override Assembly Load(AssemblyName assemblyName)
-        {
-            return Resolve(assemblyName);
-        }
-
-        protected override IntPtr LoadUnmanagedDll(string unmanagedDllName)
-        {
-            IntPtr native = base.LoadUnmanagedDll(unmanagedDllName);
-            if (native == IntPtr.Zero)
-            {
-                foreach (string dir in NativeDirectories)
-                {
-                    FileInfo f = new FileInfo(Path.Combine(dir, unmanagedDllName));
-                    if (File.Exists(f.FullName))
-                    {
-                        native = LoadUnmanagedDllFromPath(f.FullName);
-                        break;
-                    }
-                }
-            }
-
-            return native;
-        }
-
-        private Assembly Resolve(AssemblyName assemblyName)
-        {
-            foreach (string suffix in Suffixes)
-            {
-                var info = AssemblyCacheSet.FirstOrDefault(x => x.Name == assemblyName.Name + suffix);
-
-                if (info != null)
-                {
-                    return LoadFromPath(info.FullName);
-                }
-            }
-
-            return null;
-        }
-
-        private Assembly OnResolving(AssemblyLoadContext context, AssemblyName assemblyName)
-        {
-            return Resolve(assemblyName);
-        }
-    }
-}
diff --git a/Tizen.Runtime/CoreClr/AssemblyManager.cs b/Tizen.Runtime/CoreClr/AssemblyManager.cs
deleted file mode 100644 (file)
index 60b3e54..0000000
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.IO;
-using System.Reflection;
-using System.Runtime.Loader;
-using System.Linq;
-using System.Runtime.InteropServices;
-
-namespace Tizen.Runtime.Coreclr
-{
-    public static class AssemblyManager
-    {
-        public static AssemblyLoader CurrentAssemblyLoaderContext
-        {
-            get;
-            private set;
-        }
-
-        public static bool Launch(
-                [In] string rootPath,
-                [In] string path,
-                [In] int argc,
-                [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)]
-                [In] string[] argv)
-        {
-            ALog.Debug($"Application Launch path : {path}");
-            try
-            {
-                DirectoryInfo binDir = new DirectoryInfo(Path.Combine(rootPath, "bin"));
-                DirectoryInfo libDir = new DirectoryInfo(Path.Combine(rootPath, "lib"));
-                if (Directory.Exists(binDir.FullName))
-                {
-                    CurrentAssemblyLoaderContext.AddSearchableDirectory(binDir.FullName);
-                }
-
-                if (Directory.Exists(libDir.FullName))
-                {
-                    CurrentAssemblyLoaderContext.AddSearchableDirectory(libDir.FullName);
-                }
-
-                Execute(path, argv);
-            }
-            catch (Exception e)
-            {
-                ALog.Debug("Exception in Launch()");
-                PrintException(e);
-                return false;
-            }
-
-            return true;
-        }
-
-        public static void Prepared()
-        {
-            try
-            {
-                if (!Initialize())
-                {
-                    ALog.Debug($"Failed to Initialized");
-                }
-            }
-            catch (Exception e)
-            {
-                ALog.Debug("Exception at Preparing");
-                PrintException(e);
-            }
-        }
-
-        public static void UnhandledExceptionHandler(object sender, object args)
-        {
-            TypeInfo unhandledExceptionEventArgsType =
-                Type.GetType("UnhandledExceptionEventArgs").GetTypeInfo();
-
-            PropertyInfo exception = unhandledExceptionEventArgsType.GetProperty("ExceptionObject");
-            Exception e = (Exception)exception.GetValue(args);
-
-            PrintException(e);
-        }
-
-        public static bool Initialize()
-        {
-            try
-            {
-                // Set UnhandledException handler with reflection
-                // we must replace this to no reflection method after AppDomain is comming in used net standard
-                TypeInfo appdomainType = Type.GetType("System.AppDomain").GetTypeInfo();
-                PropertyInfo currentDomain = appdomainType.GetProperty("CurrentDomain",
-                        BindingFlags.Public | BindingFlags.Static);
-                EventInfo unhandledException = appdomainType.GetDeclaredEvent("UnhandledException");
-                object appDomain = currentDomain.GetValue(null, null);
-                MethodInfo handlerInfo = typeof(AssemblyManager).GetTypeInfo().GetDeclaredMethod("UnhandledExceptionHandler");
-                Delegate handler = handlerInfo.CreateDelegate(unhandledException.EventHandlerType);
-                var addMethod = unhandledException.GetAddMethod(true);
-                addMethod.Invoke(appDomain, new[] {handler});
-            }
-            catch (Exception e)
-            {
-                ALog.Debug("Exception on set handler for unhandled exception");
-                PrintException(e);
-            }
-
-            try
-            {
-                CurrentAssemblyLoaderContext = new AssemblyLoader();
-            }
-            catch (Exception e)
-            {
-                ALog.Debug("Exception on Initialized");
-                PrintException(e);
-                return false;
-            }
-
-            return true;
-        }
-
-        public static void Execute(string dllPath, string[] argv)
-        {
-            try
-            {
-                FileInfo f = new FileInfo(dllPath);
-                if (File.Exists(f.FullName))
-                {
-                    Assembly asm = CurrentAssemblyLoaderContext.LoadFromPath(f.FullName);
-
-                    if (asm == null)
-                    {
-                        throw new FileNotFoundException($"{f.FullName} is not found");
-                    }
-
-                    if (asm.EntryPoint == null)
-                    {
-                        throw new ArgumentException($"{f.FullName} did not have EntryPoint");
-                    }
-
-                    asm.EntryPoint.Invoke(null, new object[] {argv});
-                }
-                else
-                {
-                    ALog.Debug($"Requested file does not exist: {dllPath}");
-                }
-            }
-            catch (Exception e)
-            {
-                ALog.Debug("Exception on Execute");
-                PrintException(e);
-            }
-        }
-
-        private static void PrintException(Exception exception)
-        {
-            while (exception != null)
-            {
-                ALog.Debug(exception.ToString());
-                exception = exception.InnerException;
-            }
-        }
-
-    }
-}
diff --git a/Tizen.Runtime/Log.cs b/Tizen.Runtime/Log.cs
deleted file mode 100644 (file)
index 86b7e6f..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-using System;
-using System.IO;
-using System.Runtime.InteropServices;
-using System.Runtime.CompilerServices;
-
-namespace Tizen.Runtime
-{
-    internal static class ALog
-    {
-        const string Library = "libdlog.so.0";
-        const string Tag = "DOTNET_LAUNCHER";
-
-        internal enum LogPriority
-        {
-            DLOG_UNKNOWN = 0,
-            DLOG_DEFAULT,
-            DLOG_VERBOSE,
-            DLOG_DEBUG,
-            DLOG_INFO,
-            DLOG_WARN,
-            DLOG_ERROR,
-            DLOG_FATAL,
-            DLOG_SILENT,
-            DLOG_PRIO_MAX,
-        }
-
-        public static void Debug(string message,
-                [CallerFilePath] string file = "",
-                [CallerMemberName] string function = "",
-                [CallerLineNumber] int line = 0)
-        {
-            Print(LogPriority.DLOG_DEBUG, Tag, message, file, function, line);
-        }
-
-        public static void Info(string message,
-                [CallerFilePath] string file = "",
-                [CallerMemberName] string function = "",
-                [CallerLineNumber] int line = 0)
-        {
-            Print(LogPriority.DLOG_INFO, Tag, message, file, function, line);
-        }
-
-        public static void Error(string message,
-                [CallerFilePath] string file = "",
-                [CallerMemberName] string function = "",
-                [CallerLineNumber] int line = 0)
-        {
-            Print(LogPriority.DLOG_ERROR, Tag, message, file, function, line);
-        }
-
-        [DllImportAttribute(Library, EntryPoint = "dlog_print")]
-        internal static extern int Print(LogPriority priority, string tag, string format, string file, string function, int line, string msg);
-
-        private static void Print(LogPriority priority, string tag, string message, string file, string function, int line)
-        {
-            FileInfo fileInfo = new FileInfo(file);
-            Print(priority, tag, "%s: %s(%d) > %s", fileInfo.Name, function, line, message);
-        }
-
-    }
-}
diff --git a/Tizen.Runtime/Tizen.Runtime.csproj b/Tizen.Runtime/Tizen.Runtime.csproj
deleted file mode 100644 (file)
index a232a3a..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-
-  <PropertyGroup>
-    <TargetFramework>netstandard1.6</TargetFramework>
-  </PropertyGroup>
-
-  <ItemGroup>
-    <PackageReference Include="System.Runtime.Loader" Version="4.3.0" />
-  </ItemGroup>
-
-</Project>
\ No newline at end of file
index 5f233e8..19c42ff 100644 (file)
@@ -51,11 +51,6 @@ Launchpad plugin for launching dotnet apps
 %prep
 %setup -q
 
-%define use_managed_launcher 0
-%if %{use_managed_launcher}
-       %define USE_MANAGED_LAUNCHER ENABLE
-%endif
-
 %build
 
 %if 0%{?asan_enabled}
@@ -84,26 +79,17 @@ cmake \
        -DDEVICE_API_DIR=%{_device_api_dir} \
        -DRUNTIME_DIR=%{_runtime_dir} \
        -DCROSSGEN_PATH=%{_device_api_dir}/crossgen \
-%if %{use_managed_launcher}
-       -DCORECLR_LAUNCHER_ASSEMBLY_PATH=%{_bindir}/Tizen.Runtime.dll \
-%endif
        -DINSTALL_PLUGIN_DIR=%{_install_plugin_dir} \
        -DINSTALL_MDPLUGIN_DIR=%{_install_mdplugin_dir} \
        -DVERSION=%{version} \
-       -DUSE_MANAGED_LAUNCHER=%{?USE_MANAGED_LAUNCHER:%USE_MANAGED_LAUNCHER} \
        -DNATIVE_LIB_DIR=%{_native_lib_dir} \
        NativeLauncher
 
 make %{?jobs:-j%jobs} VERBOSE=1
 
-%dotnet_build Tizen.Runtime
-
 %install
 rm -rf %{buildroot}
 %make_install
-%if %{use_managed_launcher}
-install -p -m 644 Tizen.Runtime/bin/*/*/Tizen.Runtime.dll %{buildroot}%{_bindir}
-%endif
 
 mkdir -p %{buildroot}%{_native_lib_dir}
 ln -sf %{_libdir}/libsqlite3.so.0 %{buildroot}%{_native_lib_dir}/libsqlite3.so
@@ -117,8 +103,5 @@ ln -sf %{_libdir}/libsqlite3.so.0 %{buildroot}%{_native_lib_dir}/libsqlite3.so
 %{_bindir}/nitool
 #%{_install_plugin_dir}/libui-application.so
 %{_install_mdplugin_dir}/libprefer_dotnet_aot_plugin.so
-%if %{use_managed_launcher}
-%{_bindir}/Tizen.Runtime.dll
-%endif
 %{_bindir}/dotnet-launcher