From e39f2108b75cbe3a4d878854f204764868dd6364 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=B5=9C=EC=A2=85=ED=97=8C/Common=20Platform=20Lab=28SR=29?= =?utf8?q?/Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Thu, 7 May 2020 13:49:03 +0900 Subject: [PATCH] Integrate managed code into Tizen.Runtime (#228) Change-Id: I8dde5eca0a3115b5ae2eac2527810529f11ebfbb --- Managed/Dotnet.Launcher/Dotnet.Launcher.csproj | 8 -------- Managed/Managed.sln | 6 ------ .../Dotnet.Launcher.cs => Tizen.Runtime/Environment.cs} | 4 ++-- Managed/Tizen.Runtime/{Tizen.Runtime.cs => Preloader.cs} | 5 +++-- NativeLauncher/launcher/lib/dotnet_launcher.cc | 4 ++-- packaging/dotnet-launcher.spec | 2 -- 6 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 Managed/Dotnet.Launcher/Dotnet.Launcher.csproj rename Managed/{Dotnet.Launcher/Dotnet.Launcher.cs => Tizen.Runtime/Environment.cs} (93%) rename Managed/Tizen.Runtime/{Tizen.Runtime.cs => Preloader.cs} (97%) diff --git a/Managed/Dotnet.Launcher/Dotnet.Launcher.csproj b/Managed/Dotnet.Launcher/Dotnet.Launcher.csproj deleted file mode 100644 index ae1a3a5..0000000 --- a/Managed/Dotnet.Launcher/Dotnet.Launcher.csproj +++ /dev/null @@ -1,8 +0,0 @@ - - - netcoreapp2.1 - false - True - Release - - diff --git a/Managed/Managed.sln b/Managed/Managed.sln index 150e748..2126fb0 100644 --- a/Managed/Managed.sln +++ b/Managed/Managed.sln @@ -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 diff --git a/Managed/Dotnet.Launcher/Dotnet.Launcher.cs b/Managed/Tizen.Runtime/Environment.cs similarity index 93% rename from Managed/Dotnet.Launcher/Dotnet.Launcher.cs rename to Managed/Tizen.Runtime/Environment.cs index 6e9d3d2..6a03854 100644 --- a/Managed/Dotnet.Launcher/Dotnet.Launcher.cs +++ b/Managed/Tizen.Runtime/Environment.cs @@ -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) { diff --git a/Managed/Tizen.Runtime/Tizen.Runtime.cs b/Managed/Tizen.Runtime/Preloader.cs similarity index 97% rename from Managed/Tizen.Runtime/Tizen.Runtime.cs rename to Managed/Tizen.Runtime/Preloader.cs index 580c44f..9965caf 100644 --- a/Managed/Tizen.Runtime/Tizen.Runtime.cs +++ b/Managed/Tizen.Runtime/Preloader.cs @@ -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, ""); } diff --git a/NativeLauncher/launcher/lib/dotnet_launcher.cc b/NativeLauncher/launcher/lib/dotnet_launcher.cc index 02c0779..f88d9a9 100644 --- a/NativeLauncher/launcher/lib/dotnet_launcher.cc +++ b/NativeLauncher/launcher/lib/dotnet_launcher.cc @@ -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; } diff --git a/packaging/dotnet-launcher.spec b/packaging/dotnet-launcher.spec index f33c6f2..2d3ada9 100644 --- a/packaging/dotnet-launcher.spec +++ b/packaging/dotnet-launcher.spec @@ -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} -- 2.7.4