Sort preload files by name due to dependencies of each module (#225) accepted/tizen/5.5/unified/20200429.140214 accepted/tizen/unified/20200429.051913 submit/tizen/20200429.120649 submit/tizen_5.5/20200429.120457
author최종헌/Common Platform Lab(SR)/Engineer/삼성전자 <j-h.choi@samsung.com>
Wed, 29 Apr 2020 02:37:58 +0000 (11:37 +0900)
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>
Wed, 29 Apr 2020 02:37:58 +0000 (11:37 +0900)
Change-Id: I4addc2fc049eeb9433f32fb85723d7b6194bed9f

Managed/Tizen.Runtime/Tizen.Runtime.cs
packaging/10.Dotnet.Launcher.preload [new file with mode: 0644]
packaging/Dotnet.Launcher.preload [deleted file]
packaging/dotnet-launcher.spec

index e88aadb5d74781a56c34734e711a4ac905b6dfbb..6a87da25fb289f08cc14c0ea867bc380edd20f16 100644 (file)
@@ -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 (file)
index 0000000..a7fe2d2
--- /dev/null
@@ -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 <PrivateImplementationDetails>
+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 <PrivateImplementationDetails>
+System.Collections.dll System.Collections.Generic.HashSet`1
+System.Collections.dll System.Collections.Generic.Queue`1
+System.Private.Uri.dll <PrivateImplementationDetails>
+System.Private.Uri.dll System.Uri
+System.Private.Xml.dll <PrivateImplementationDetails>
+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 (file)
index a7fe2d2..0000000
+++ /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 <PrivateImplementationDetails>
-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 <PrivateImplementationDetails>
-System.Collections.dll System.Collections.Generic.HashSet`1
-System.Collections.dll System.Collections.Generic.Queue`1
-System.Private.Uri.dll <PrivateImplementationDetails>
-System.Private.Uri.dll System.Uri
-System.Private.Xml.dll <PrivateImplementationDetails>
-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
index fff6c2340b76bc1ca22338a5bceedd11204eb860..f33c6f289049132df5257dcca2c0e1cf9d022f8a 100644 (file)
@@ -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