+++ /dev/null
-/*
- * Copyright (c) 2019 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.
- */
-
-namespace Dotnet.Launcher
-{
- class Environment
- {
- public static void SetEnvironmentVariable(string variable, string value)
- {
- System.Environment.SetEnvironmentVariable(variable, value);
- }
- }
-}
+++ /dev/null
-<Project Sdk="Microsoft.NET.Sdk">
- <PropertyGroup>
- <TargetFramework>netcoreapp2.1</TargetFramework>
- <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
- <NoWin32Manifest>True</NoWin32Manifest>
- <Configuration>Release</Configuration>
- </PropertyGroup>
-</Project>
# 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
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
--- /dev/null
+/*
+ * Copyright (c) 2019 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.
+ */
+
+namespace Tizen.Runtime
+{
+ public class Environment
+ {
+ public static void SetEnvironmentVariable(string variable, string value)
+ {
+ System.Environment.SetEnvironmentVariable(variable, value);
+ }
+ }
+}
--- /dev/null
+/*
+ * Copyright (c) 2019 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;
+
+namespace Tizen.Runtime
+{
+ public class Preloader
+ {
+ const string preloadPath = "/usr/share/dotnet.tizen/preload/";
+ public static void Preload()
+ {
+ string[] paths = Directory.GetFiles(preloadPath, "*.preload");
+ Array.Sort(paths);
+ foreach (string path in paths)
+ {
+ // ex) Tizen.preload / 0A.Tizen.preload / A0.Tizen.preload / .0.Tizen.preload / .00.Tizen.preload
+ if (!char.IsNumber(Path.GetFileName(path), 0) || !char.IsNumber(Path.GetFileName(path), 1))
+ continue;
+
+ // ex) 000.Tizen.preload / 0.Tizen.preload
+ if (Path.GetFileName(path).IndexOf('.') != 2)
+ continue;
+
+ try
+ {
+ BindingFlags bindingFlag = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
+ foreach (string line in File.ReadLines(path))
+ {
+ if (line.StartsWith('#') || !line.Contains(".dll") || !line.Contains(' '))
+ continue;
+
+ string[] getWord = line.Split(' ');
+ if (getWord.Length != 2)
+ continue;
+
+ string assemblyStr = getWord[0].Replace(".dll", "");
+ string typenameStr = getWord[1];
+ string methodStr = "";
+ string parenthesis = "()";
+
+ if (line.Contains(parenthesis))
+ {
+ string[] getMethod = typenameStr.Split('.');
+ methodStr = getMethod[getMethod.Length - 1].Replace(parenthesis, "");
+ typenameStr = typenameStr.Replace("." + methodStr + parenthesis, "");
+ }
+
+ try
+ {
+ if (assemblyStr == "")
+ continue;
+
+ Assembly asm = AssemblyLoadContext.Default.LoadFromAssemblyName(new AssemblyName(assemblyStr));
+ if (asm == null || typenameStr == "")
+ continue;
+
+ Type type = asm.GetType(typenameStr);
+ if (type == null || methodStr == "")
+ continue;
+
+ MethodInfo method = type.GetMethod(methodStr, bindingFlag);
+ if (method == null)
+ continue;
+
+ method.Invoke(null, null);
+ }
+ catch (Exception e)
+ {
+ Console.WriteLine(e.ToString());
+ Console.WriteLine("[ERROR] Failed to '" + line + "' preload");
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ Console.WriteLine(e.ToString());
+ Console.WriteLine("[ERROR] Failed to " + path + " file open");
+ }
+ finally
+ {
+ Console.WriteLine("Success to preload : " + path);
+ }
+ }
+
+ GC.Collect();
+ GC.WaitForPendingFinalizers();
+ }
+ }
+}
+++ /dev/null
-/*
- * Copyright (c) 2019 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;
-
-namespace Tizen.Runtime
-{
- class Preloader
- {
- const string preloadPath = "/usr/share/dotnet.tizen/preload/";
- public static void Preload()
- {
- string[] paths = Directory.GetFiles(preloadPath, "*.preload");
- Array.Sort(paths);
- foreach (string path in paths)
- {
- // ex) Tizen.preload / 0A.Tizen.preload / A0.Tizen.preload / .0.Tizen.preload / .00.Tizen.preload
- if (!char.IsNumber(Path.GetFileName(path), 0) || !char.IsNumber(Path.GetFileName(path), 1))
- continue;
-
- // ex) 000.Tizen.preload / 0.Tizen.preload
- if (Path.GetFileName(path).IndexOf('.') != 2)
- continue;
-
- try
- {
- BindingFlags bindingFlag = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic;
- foreach (string line in File.ReadLines(path))
- {
- if (line.StartsWith('#') || !line.Contains(".dll") || !line.Contains(' '))
- continue;
-
- string[] getWord = line.Split(' ');
- if (getWord.Length != 2)
- continue;
-
- string assemblyStr = getWord[0].Replace(".dll", "");
- string typenameStr = getWord[1];
- string methodStr = "";
- string parenthesis = "()";
-
- if (line.Contains(parenthesis))
- {
- string [] getMethod = typenameStr.Split('.');
- methodStr = getMethod[getMethod.Length - 1].Replace(parenthesis, "");
- typenameStr = typenameStr.Replace("." + methodStr + parenthesis, "");
- }
-
- try
- {
- if (assemblyStr == "")
- continue;
-
- Assembly asm = AssemblyLoadContext.Default.LoadFromAssemblyName(new AssemblyName(assemblyStr));
- if (asm == null || typenameStr == "")
- continue;
-
- Type type = asm.GetType(typenameStr);
- if (type == null || methodStr == "")
- continue;
-
- MethodInfo method = type.GetMethod(methodStr, bindingFlag);
- if (method == null)
- continue;
-
- method.Invoke(null, null);
- }
- catch (Exception e)
- {
- Console.WriteLine(e.ToString());
- Console.WriteLine("[ERROR] Failed to '" + line + "' preload");
- }
- }
- }
- catch (IOException e)
- {
- Console.WriteLine(e.ToString());
- Console.WriteLine("[ERROR] Failed to " + path + " file open");
- }
- finally
- {
- Console.WriteLine("Success to preload : " + path);
- }
- }
-
- GC.Collect();
- GC.WaitForPendingFinalizers();
- }
- }
-}
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;
}
%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}
%{_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}