Integrate managed code into Tizen.Runtime (#228)
author최종헌/Common Platform Lab(SR)/Engineer/삼성전자 <j-h.choi@samsung.com>
Thu, 7 May 2020 04:49:03 +0000 (13:49 +0900)
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>
Thu, 7 May 2020 04:49:03 +0000 (13:49 +0900)
Change-Id: I8dde5eca0a3115b5ae2eac2527810529f11ebfbb

Managed/Dotnet.Launcher/Dotnet.Launcher.csproj [deleted file]
Managed/Managed.sln
Managed/Tizen.Runtime/Environment.cs [moved from Managed/Dotnet.Launcher/Dotnet.Launcher.cs with 93% similarity]
Managed/Tizen.Runtime/Preloader.cs [moved from Managed/Tizen.Runtime/Tizen.Runtime.cs with 97% similarity]
NativeLauncher/launcher/lib/dotnet_launcher.cc
packaging/dotnet-launcher.spec

diff --git a/Managed/Dotnet.Launcher/Dotnet.Launcher.csproj b/Managed/Dotnet.Launcher/Dotnet.Launcher.csproj
deleted file mode 100644 (file)
index ae1a3a5..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<Project Sdk="Microsoft.NET.Sdk">
-    <PropertyGroup>
-           <TargetFramework>netcoreapp2.1</TargetFramework>
-           <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
-           <NoWin32Manifest>True</NoWin32Manifest>
-           <Configuration>Release</Configuration>
-    </PropertyGroup>
-</Project>
index 150e748..2126fb0 100644 (file)
@@ -2,8 +2,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
 # Visual Studio 16
 VisualStudioVersion = 16.0.29306.81
 MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Dotnet.Launcher", "Dotnet.Launcher\Dotnet.Launcher.csproj", "{92F481F9-A099-40D7-9DD7-BE1B64C010D1}"
-EndProject
 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tizen.Runtime", "Tizen.Runtime\Tizen.Runtime.csproj", "{10904A32-26EB-4135-B012-8F123A63E29D}"
 EndProject
 Global
@@ -12,10 +10,6 @@ Global
                Release|Any CPU = Release|Any CPU
        EndGlobalSection
        GlobalSection(ProjectConfigurationPlatforms) = postSolution
-               {92F481F9-A099-40D7-9DD7-BE1B64C010D1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {92F481F9-A099-40D7-9DD7-BE1B64C010D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {92F481F9-A099-40D7-9DD7-BE1B64C010D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {92F481F9-A099-40D7-9DD7-BE1B64C010D1}.Release|Any CPU.Build.0 = Release|Any CPU
                {10904A32-26EB-4135-B012-8F123A63E29D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {10904A32-26EB-4135-B012-8F123A63E29D}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {10904A32-26EB-4135-B012-8F123A63E29D}.Release|Any CPU.ActiveCfg = Release|Any CPU
similarity index 93%
rename from Managed/Dotnet.Launcher/Dotnet.Launcher.cs
rename to Managed/Tizen.Runtime/Environment.cs
index 6e9d3d2..6a03854 100644 (file)
@@ -14,9 +14,9 @@
  * limitations under the License.
  */
 
-namespace Dotnet.Launcher
+namespace Tizen.Runtime
 {
-    class Environment
+    public class Environment
     {
         public static void SetEnvironmentVariable(string variable, string value)
         {
similarity index 97%
rename from Managed/Tizen.Runtime/Tizen.Runtime.cs
rename to Managed/Tizen.Runtime/Preloader.cs
index 580c44f..9965caf 100644 (file)
@@ -13,6 +13,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+
 using System;
 using System.IO;
 using System.Reflection;
@@ -20,7 +21,7 @@ using System.Runtime.Loader;
 
 namespace Tizen.Runtime
 {
-    class Preloader
+    public class Preloader
     {
         const string preloadPath = "/usr/share/dotnet.tizen/preload/";
         public static void Preload()
@@ -56,7 +57,7 @@ namespace Tizen.Runtime
 
                         if (line.Contains(parenthesis))
                         {
-                            string [] getMethod = typenameStr.Split('.');
+                            string[] getMethod = typenameStr.Split('.');
                             methodStr = getMethod[getMethod.Length - 1].Replace(parenthesis, "");
                             typenameStr = typenameStr.Replace("." + methodStr + parenthesis, "");
                         }
index 02c0779..f88d9a9 100644 (file)
@@ -459,9 +459,9 @@ int CoreRuntime::initialize(LaunchMode launchMode)
                return -1;
        }
 
-       int st = createDelegate(__hostHandle, __domainId, "Dotnet.Launcher", "Dotnet.Launcher.Environment", "SetEnvironmentVariable", (void**)&setEnvironmentVariable);
+       int st = createDelegate(__hostHandle, __domainId, "Tizen.Runtime", "Tizen.Runtime.Environment", "SetEnvironmentVariable", (void**)&setEnvironmentVariable);
        if (st < 0 || setEnvironmentVariable == nullptr) {
-               _ERR("Create delegate for Dotnet.Launcher.dll -> Dotnet.Launcher.Environment -> SetEnvironmentVariable failed (0x%08x)", st);
+               _ERR("Create delegate for Tizen.Runtime.dll -> Tizen.Runtime.Environment -> SetEnvironmentVariable failed (0x%08x)", st);
                return -1;
        }
 
index f33c6f2..2d3ada9 100644 (file)
@@ -132,7 +132,6 @@ rm -rf %{buildroot}
 %make_install
 mkdir -p %{buildroot}%{_framework_dir}
 mv Managed/Tizen.Runtime/bin/Release/Tizen.Runtime.dll %{buildroot}%{_framework_dir}
-mv Managed/Dotnet.Launcher/bin/Release/Dotnet.Launcher.dll %{buildroot}%{_framework_dir}
 
 mkdir -p %{buildroot}%{_dotnet_dir}
 mkdir -p %{buildroot}%{_native_lib_dir}
@@ -173,7 +172,6 @@ chsmack -t -a User::App::Shared /opt/etc/skel/.dotnet
 %{_libdir}/libtac_common.so
 /etc/tmpfiles.d/%{name}.conf
 /usr/share/parser-plugins/dotnet-launcher.info
-%{_framework_dir}/Dotnet.Launcher.dll
 %{_framework_dir}/Tizen.Runtime.dll
 %{_dotnet_dir}
 %{_ibc_data_dir}