From: 최종헌/Common Platform Lab(SR)/Engineer/삼성전자 Date: Wed, 29 Apr 2020 02:37:58 +0000 (+0900) Subject: Sort preload files by name due to dependencies of each module (#225) X-Git-Tag: submit/tizen_5.5/20200429.120457^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7e0a17e68a9c203f93a5943baa3d683c351eeda1;p=platform%2Fcore%2Fdotnet%2Flauncher.git Sort preload files by name due to dependencies of each module (#225) Change-Id: I4addc2fc049eeb9433f32fb85723d7b6194bed9f --- diff --git a/Managed/Tizen.Runtime/Tizen.Runtime.cs b/Managed/Tizen.Runtime/Tizen.Runtime.cs index e88aadb..6a87da2 100644 --- a/Managed/Tizen.Runtime/Tizen.Runtime.cs +++ b/Managed/Tizen.Runtime/Tizen.Runtime.cs @@ -25,16 +25,17 @@ namespace Tizen.Runtime const string preloadPath = "/usr/share/dotnet.tizen/preload/"; public static void Preload() { - DirectoryInfo directory = new DirectoryInfo(preloadPath); - foreach (FileInfo file in directory.GetFiles()) + string[] paths = Directory.GetFiles(preloadPath); + Array.Sort(paths); + foreach (string path in paths) { - if (file.Extension.CompareTo(".preload") != 0) + if (Path.GetExtension(path) != ".preload") continue; try { BindingFlags bindingFlag = BindingFlags.Static | BindingFlags.Public | BindingFlags.NonPublic; - foreach (string line in File.ReadLines(file.FullName)) + foreach (string line in File.ReadLines(path)) { if (line.StartsWith('#') || !line.Contains(".dll") || !line.Contains(' ')) continue; @@ -84,11 +85,11 @@ namespace Tizen.Runtime catch (IOException e) { Console.WriteLine(e.ToString()); - Console.WriteLine("[ERROR] Failed to " + file.FullName + " file open"); + Console.WriteLine("[ERROR] Failed to " + path + " file open"); } finally { - Console.WriteLine("Success to preload : " + file.Name); + Console.WriteLine("Success to preload : " + path); } } diff --git a/packaging/10.Dotnet.Launcher.preload b/packaging/10.Dotnet.Launcher.preload new file mode 100644 index 0000000..a7fe2d2 --- /dev/null +++ b/packaging/10.Dotnet.Launcher.preload @@ -0,0 +1,38 @@ +########################################### +## AssemblyName.dll TypeName ## +## AssemblyName.dll TypeName.Preload() ## +## The methods must not have parameters. ## +########################################### +System.IO.FileSystem.dll Interop +System.IO.FileSystem.dll +System.IO.FileSystem.dll System.IO.File +System.Security.Cryptography.Algorithms.dll Interop +System.Security.Cryptography.Algorithms.dll System.Security.Cryptography.MD5 +System.Collections.dll +System.Collections.dll System.Collections.Generic.HashSet`1 +System.Collections.dll System.Collections.Generic.Queue`1 +System.Private.Uri.dll +System.Private.Uri.dll System.Uri +System.Private.Xml.dll +System.Private.Xml.dll System.Xml.IXmlLineInfo +System.Private.Xml.dll System.Xml.IXmlNamespaceResolver +System.Runtime.dll System.Collections.Generic.ISet`1 +System.Runtime.dll System.Reflection.RuntimeReflectionExtensions +System.ObjectModel.dll System.Collections.ObjectModel.ObservableCollection`1 +System.ObjectModel.dll System.Collections.Specialized.INotifyCollectionChanged +System.ObjectModel.dll System.Collections.Specialized.NotifyCollectionChangedAction +System.ObjectModel.dll System.Collections.Specialized.NotifyCollectionChangedEventArgs +System.ObjectModel.dll System.Collections.Specialized.NotifyCollectionChangedEventHandler +System.ObjectModel.dll System.ComponentModel.INotifyPropertyChanged +System.ObjectModel.dll System.ComponentModel.PropertyChangedEventArgs +System.ObjectModel.dll System.ComponentModel.PropertyChangedEventHandler +System.ObjectModel.dll System.Windows.Input.ICommand +System.ComponentModel.dll System.IServiceProvider +System.Linq.dll System.Linq.Enumerable +System.Linq.dll System.Linq.EnumerableSorter`1 +System.Linq.dll System.Linq.IIListProvider`1 +System.Linq.dll System.Linq.IOrderedEnumerable`1 +System.Linq.dll System.Linq.IPartition`1 +System.Linq.dll System.Linq.OrderedEnumerable`1 +System.Linq.Expressions.dll System.Linq.Expressions.ExpressionVisitor +System.Security.Cryptography.Primitives.dll System.Security.Cryptography.HashAlgorithm diff --git a/packaging/Dotnet.Launcher.preload b/packaging/Dotnet.Launcher.preload deleted file mode 100644 index a7fe2d2..0000000 --- a/packaging/Dotnet.Launcher.preload +++ /dev/null @@ -1,38 +0,0 @@ -########################################### -## AssemblyName.dll TypeName ## -## AssemblyName.dll TypeName.Preload() ## -## The methods must not have parameters. ## -########################################### -System.IO.FileSystem.dll Interop -System.IO.FileSystem.dll -System.IO.FileSystem.dll System.IO.File -System.Security.Cryptography.Algorithms.dll Interop -System.Security.Cryptography.Algorithms.dll System.Security.Cryptography.MD5 -System.Collections.dll -System.Collections.dll System.Collections.Generic.HashSet`1 -System.Collections.dll System.Collections.Generic.Queue`1 -System.Private.Uri.dll -System.Private.Uri.dll System.Uri -System.Private.Xml.dll -System.Private.Xml.dll System.Xml.IXmlLineInfo -System.Private.Xml.dll System.Xml.IXmlNamespaceResolver -System.Runtime.dll System.Collections.Generic.ISet`1 -System.Runtime.dll System.Reflection.RuntimeReflectionExtensions -System.ObjectModel.dll System.Collections.ObjectModel.ObservableCollection`1 -System.ObjectModel.dll System.Collections.Specialized.INotifyCollectionChanged -System.ObjectModel.dll System.Collections.Specialized.NotifyCollectionChangedAction -System.ObjectModel.dll System.Collections.Specialized.NotifyCollectionChangedEventArgs -System.ObjectModel.dll System.Collections.Specialized.NotifyCollectionChangedEventHandler -System.ObjectModel.dll System.ComponentModel.INotifyPropertyChanged -System.ObjectModel.dll System.ComponentModel.PropertyChangedEventArgs -System.ObjectModel.dll System.ComponentModel.PropertyChangedEventHandler -System.ObjectModel.dll System.Windows.Input.ICommand -System.ComponentModel.dll System.IServiceProvider -System.Linq.dll System.Linq.Enumerable -System.Linq.dll System.Linq.EnumerableSorter`1 -System.Linq.dll System.Linq.IIListProvider`1 -System.Linq.dll System.Linq.IOrderedEnumerable`1 -System.Linq.dll System.Linq.IPartition`1 -System.Linq.dll System.Linq.OrderedEnumerable`1 -System.Linq.Expressions.dll System.Linq.Expressions.ExpressionVisitor -System.Security.Cryptography.Primitives.dll System.Security.Cryptography.HashAlgorithm diff --git a/packaging/dotnet-launcher.spec b/packaging/dotnet-launcher.spec index fff6c23..f33c6f2 100644 --- a/packaging/dotnet-launcher.spec +++ b/packaging/dotnet-launcher.spec @@ -144,7 +144,7 @@ install -m 0644 %{name}.conf %{buildroot}/etc/tmpfiles.d/%{name}.conf mkdir -p %{buildroot}%{_ibc_data_dir} unzip packaging/ibcdata.zip -d %{buildroot}%{_ibc_data_dir} mkdir -p %{buildroot}%{_tizen_preload_dir} -mv packaging/Dotnet.Launcher.preload %{buildroot}%{_tizen_preload_dir} +mv packaging/10.Dotnet.Launcher.preload %{buildroot}%{_tizen_preload_dir} %post mkdir -p /opt/etc/skel/.dotnet