From 0e1c4262747986f400e202001378edc0a580caf0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EC=A1=B0=EC=9B=85=EC=84=9D/Common=20Platform=20Lab=28SR=29?= =?utf8?q?/Principal=20Engineer/=EC=82=BC=EC=84=B1=EC=A0=84=EC=9E=90?= Date: Mon, 25 May 2020 16:51:04 +0900 Subject: [PATCH] add script to generate native image at mic (#232) --- resource/wearable-dotnet-generate-ni.high.post | 45 +++++++ resource/wearable-dotnet-generate-ni.low.post | 71 ++++++++++++ resource/wearable-dotnet-generate-ni.middle.post | 142 +++++++++++++++++++++++ 3 files changed, 258 insertions(+) create mode 100644 resource/wearable-dotnet-generate-ni.high.post create mode 100644 resource/wearable-dotnet-generate-ni.low.post create mode 100644 resource/wearable-dotnet-generate-ni.middle.post diff --git a/resource/wearable-dotnet-generate-ni.high.post b/resource/wearable-dotnet-generate-ni.high.post new file mode 100644 index 0000000..ad01dfe --- /dev/null +++ b/resource/wearable-dotnet-generate-ni.high.post @@ -0,0 +1,45 @@ +#!/bin/sh +echo "############### wearable-dotnet-generate-ni.post ################" + +SYSTEM_DIRS=" + /usr/share/dotnet.tizen/netcoreapp + /usr/share/dotnet.tizen/framework +" + +export IBCDATA_DIR=/usr/share/dotnet.tizen/ibcdata +export COMPlus_UseIBCFile=1 +export COMPlus_IBCFileDir=$IBCDATA_DIR + +# remove previous native image +dotnettool --ni-reset-system + +# generate SPC native image and remove origin +dotnettool --ni-dll /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll +if [ -f '/usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup' ] +then + echo "remove origin file : System.Private.CoreLib.dll.Backup" + rm -f /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup + touch /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup +fi + +# generate ni file and remove origin dll file +for target_dir in $SYSTEM_DIRS +do + for target_dll in $target_dir/*.dll; + do + dotnettool --ni-dll $target_dll; + if [ -f ${target_dll//.dll/.ni.dll} ] + then + echo "remove origin file : $target_dll" + rm -f $target_dll + fi + done; +done; + +# remove ibc data +if [ -d $IBCDATA_DIR ] +then + echo "remove ibc data and directory" + rm -rf $IBCDATA_DIR +fi + diff --git a/resource/wearable-dotnet-generate-ni.low.post b/resource/wearable-dotnet-generate-ni.low.post new file mode 100644 index 0000000..b40e01a --- /dev/null +++ b/resource/wearable-dotnet-generate-ni.low.post @@ -0,0 +1,71 @@ +#!/bin/sh +echo "############### wearable-dotnet-generate-ni.post ################" + +DLL_LIST=" + /usr/share/dotnet.tizen/netcoreapp/System.Collections.dll + /usr/share/dotnet.tizen/netcoreapp/System.Collections.Concurrent.dll + /usr/share/dotnet.tizen/netcoreapp/System.Console.dll + /usr/share/dotnet.tizen/netcoreapp/System.Diagnostics.Debug.dll + /usr/share/dotnet.tizen/netcoreapp/System.IO.FileSystem.dll + /usr/share/dotnet.tizen/netcoreapp/System.Linq.dll + /usr/share/dotnet.tizen/netcoreapp/System.Linq.Expressions.dll + /usr/share/dotnet.tizen/netcoreapp/System.ObjectModel.dll + /usr/share/dotnet.tizen/netcoreapp/System.Private.DataContractSerialization.dll + /usr/share/dotnet.tizen/netcoreapp/System.Private.Uri.dll + /usr/share/dotnet.tizen/netcoreapp/System.Private.Xml.dll + /usr/share/dotnet.tizen/netcoreapp/System.Reflection.Extensions.dll + /usr/share/dotnet.tizen/netcoreapp/System.Reflection.Metadata.dll + /usr/share/dotnet.tizen/netcoreapp/System.Runtime.dll + /usr/share/dotnet.tizen/netcoreapp/System.Runtime.Extensions.dll + /usr/share/dotnet.tizen/netcoreapp/System.Runtime.InteropServices.dll + /usr/share/dotnet.tizen/netcoreapp/System.Security.Cryptography.Algorithms.dll + /usr/share/dotnet.tizen/netcoreapp/System.Security.Cryptography.Primitives.dll + /usr/share/dotnet.tizen/netcoreapp/System.Text.RegularExpressions.dll + /usr/share/dotnet.tizen/netcoreapp/System.Threading.dll + /usr/share/dotnet.tizen/netcoreapp/System.Threading.Tasks.dll + /usr/share/dotnet.tizen/netcoreapp/System.Threading.Thread.dll + /usr/share/dotnet.tizen/netcoreapp/System.Threading.Timer.dll + /usr/share/dotnet.tizen/framework/ElmSharp.dll + /usr/share/dotnet.tizen/framework/Tizen.dll + /usr/share/dotnet.tizen/framework/Tizen.Applications.Common.dll + /usr/share/dotnet.tizen/framework/Tizen.Applications.UI.dll + /usr/share/dotnet.tizen/framework/Tizen.Applications.Service.dll + /usr/share/dotnet.tizen/framework/Tizen.System.Information.dll + /usr/share/dotnet.tizen/framework/XSF.dll +" + +export IBCDATA_DIR=/usr/share/dotnet.tizen/ibcdata +export COMPlus_UseIBCFile=1 +export COMPlus_IBCFileDir=$IBCDATA_DIR + +# remove previous native image +dotnettool --ni-reset-system + +# generate SPC native image and remove origin +dotnettool --ni-dll /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll +if [ -f '/usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup' ] +then + echo "remove origin file : System.Private.CoreLib.dll.Backup" + rm -f /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup + touch /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup +fi + +# generate native image +for target in $DLL_LIST; +do + dotnettool --ni-dll $target; + if [ -f ${target//.dll/.ni.dll} ] + then + echo "remove origin file : $target" + rm -f $target + fi +done; + +# remove ibc data +if [ -d $IBCDATA_DIR ] +then + echo "remove ibc data and directory" + rm -rf $IBCDATA_DIR +fi + + diff --git a/resource/wearable-dotnet-generate-ni.middle.post b/resource/wearable-dotnet-generate-ni.middle.post new file mode 100644 index 0000000..946169c --- /dev/null +++ b/resource/wearable-dotnet-generate-ni.middle.post @@ -0,0 +1,142 @@ +#!/bin/sh +echo "############### wearable-dotnet-generate-ni.post ################" + +DLL_LIST=" + /usr/share/dotnet.tizen/netcoreapp/Microsoft.Win32.Primitives.dll + /usr/share/dotnet.tizen/netcoreapp/netstandard.dll + /usr/share/dotnet.tizen/netcoreapp/System.Collections.Concurrent.dll + /usr/share/dotnet.tizen/netcoreapp/System.Collections.dll + /usr/share/dotnet.tizen/netcoreapp/System.Collections.Immutable.dll + /usr/share/dotnet.tizen/netcoreapp/System.Collections.NonGeneric.dll + /usr/share/dotnet.tizen/netcoreapp/System.Collections.Specialized.dll + /usr/share/dotnet.tizen/netcoreapp/System.ComponentModel.dll + /usr/share/dotnet.tizen/netcoreapp/System.ComponentModel.Primitives.dll + /usr/share/dotnet.tizen/netcoreapp/System.ComponentModel.TypeConverter.dll + /usr/share/dotnet.tizen/netcoreapp/System.Console.dll + /usr/share/dotnet.tizen/netcoreapp/System.Data.Common.dll + /usr/share/dotnet.tizen/netcoreapp/System.Diagnostics.Debug.dll + /usr/share/dotnet.tizen/netcoreapp/System.Diagnostics.DiagnosticSource.dll + /usr/share/dotnet.tizen/netcoreapp/System.Diagnostics.Process.dll + /usr/share/dotnet.tizen/netcoreapp/System.Diagnostics.StackTrace.dll + /usr/share/dotnet.tizen/netcoreapp/System.Diagnostics.TraceSource.dll + /usr/share/dotnet.tizen/netcoreapp/System.Diagnostics.Tracing.dll + /usr/share/dotnet.tizen/netcoreapp/System.Drawing.Primitives.dll + /usr/share/dotnet.tizen/netcoreapp/System.IO.FileSystem.dll + /usr/share/dotnet.tizen/netcoreapp/System.IO.dll + /usr/share/dotnet.tizen/netcoreapp/System.IO.IsolatedStorage.dll + /usr/share/dotnet.tizen/netcoreapp/System.Linq.Expressions.dll + /usr/share/dotnet.tizen/netcoreapp/System.Linq.dll + /usr/share/dotnet.tizen/netcoreapp/System.Linq.Queryable.dll + /usr/share/dotnet.tizen/netcoreapp/System.Memory.dll + /usr/share/dotnet.tizen/netcoreapp/System.Net.Http.dll + /usr/share/dotnet.tizen/netcoreapp/System.Net.NameResolution.dll + /usr/share/dotnet.tizen/netcoreapp/System.Net.Primitives.dll + /usr/share/dotnet.tizen/netcoreapp/System.Net.Requests.dll + /usr/share/dotnet.tizen/netcoreapp/System.Net.Security.dll + /usr/share/dotnet.tizen/netcoreapp/System.Net.Sockets.dll + /usr/share/dotnet.tizen/netcoreapp/System.Net.WebClient.dll + /usr/share/dotnet.tizen/netcoreapp/System.Net.WebProxy.dll + /usr/share/dotnet.tizen/netcoreapp/System.ObjectModel.dll + /usr/share/dotnet.tizen/netcoreapp/System.Private.DataContractSerialization.dll + /usr/share/dotnet.tizen/netcoreapp/System.Private.Uri.dll + /usr/share/dotnet.tizen/netcoreapp/System.Private.Xml.dll + /usr/share/dotnet.tizen/netcoreapp/System.Reflection.Emit.ILGeneration.dll + /usr/share/dotnet.tizen/netcoreapp/System.Reflection.dll + /usr/share/dotnet.tizen/netcoreapp/System.Reflection.Metadata.dll + /usr/share/dotnet.tizen/netcoreapp/System.Reflection.Primitives.dll + /usr/share/dotnet.tizen/netcoreapp/System.Resources.ResourceManager.dll + /usr/share/dotnet.tizen/netcoreapp/System.Runtime.Extensions.dll + /usr/share/dotnet.tizen/netcoreapp/System.Runtime.dll + /usr/share/dotnet.tizen/netcoreapp/System.Runtime.InteropServices.dll + /usr/share/dotnet.tizen/netcoreapp/System.Runtime.Numerics.dll + /usr/share/dotnet.tizen/netcoreapp/System.Runtime.Serialization.Formatters.dll + /usr/share/dotnet.tizen/netcoreapp/System.Runtime.Serialization.Primitives.dll + /usr/share/dotnet.tizen/netcoreapp/System.Security.Cryptography.Algorithms.dll + /usr/share/dotnet.tizen/netcoreapp/System.Security.Cryptography.Primitives.dll + /usr/share/dotnet.tizen/netcoreapp/System.Security.Cryptography.X509Certificates.dll + /usr/share/dotnet.tizen/netcoreapp/System.Text.RegularExpressions.dll + /usr/share/dotnet.tizen/netcoreapp/System.Threading.dll + /usr/share/dotnet.tizen/netcoreapp/System.Threading.Tasks.dll + /usr/share/dotnet.tizen/netcoreapp/System.Threading.Timer.dll + /usr/share/dotnet.tizen/netcoreapp/System.Xml.ReaderWriter.dll + /usr/share/dotnet.tizen/framework/ElmSharp.dll + /usr/share/dotnet.tizen/framework/Tizen.Account.AccountManager.dll + /usr/share/dotnet.tizen/framework/Tizen.Applications.Alarm.dll + /usr/share/dotnet.tizen/framework/Tizen.Applications.Common.dll + /usr/share/dotnet.tizen/framework/Tizen.Applications.ComponentBased.dll + /usr/share/dotnet.tizen/framework/Tizen.Applications.DataControl.dll + /usr/share/dotnet.tizen/framework/Tizen.Applications.MessagePort.dll + /usr/share/dotnet.tizen/framework/Tizen.Applications.Notification.dll + /usr/share/dotnet.tizen/framework/Tizen.Applications.PackageManager.dll + /usr/share/dotnet.tizen/framework/Tizen.Applications.Preference.dll + /usr/share/dotnet.tizen/framework/Tizen.Applications.Service.dll + /usr/share/dotnet.tizen/framework/Tizen.Applications.UI.dll + /usr/share/dotnet.tizen/framework/Tizen.Applications.WatchApplication.dll + /usr/share/dotnet.tizen/framework/Tizen.Applications.WidgetApplication.dll + /usr/share/dotnet.tizen/framework/Tizen.Content.Download.dll + /usr/share/dotnet.tizen/framework/Tizen.Content.MediaContent.dll + /usr/share/dotnet.tizen/framework/Tizen.Content.MimeType.dll + /usr/share/dotnet.tizen/framework/Tizen.dll + /usr/share/dotnet.tizen/framework/Tizen.Location.dll + /usr/share/dotnet.tizen/framework/Tizen.Log.dll + /usr/share/dotnet.tizen/framework/Tizen.Maps.dll + /usr/share/dotnet.tizen/framework/Tizen.Messaging.dll + /usr/share/dotnet.tizen/framework/Tizen.Messaging.Push.dll + /usr/share/dotnet.tizen/framework/Tizen.Multimedia.AudioIO.dll + /usr/share/dotnet.tizen/framework/Tizen.Multimedia.Camera.dll + /usr/share/dotnet.tizen/framework/Tizen.Multimedia.dll + /usr/share/dotnet.tizen/framework/Tizen.Multimedia.MediaPlayer.dll + /usr/share/dotnet.tizen/framework/Tizen.Multimedia.Recorder.dll + /usr/share/dotnet.tizen/framework/Tizen.Multimedia.Remoting.dll + /usr/share/dotnet.tizen/framework/Tizen.Network.Bluetooth.dll + /usr/share/dotnet.tizen/framework/Tizen.Network.Connection.dll + /usr/share/dotnet.tizen/framework/Tizen.Network.WiFi.dll + /usr/share/dotnet.tizen/framework/Tizen.NUI.dll + /usr/share/dotnet.tizen/framework/Tizen.Security.PrivacyPrivilegeManager.dll + /usr/share/dotnet.tizen/framework/Tizen.Security.SecureRepository.dll + /usr/share/dotnet.tizen/framework/Tizen.Sensor.dll + /usr/share/dotnet.tizen/framework/Tizen.System.Feedback.dll + /usr/share/dotnet.tizen/framework/Tizen.System.dll + /usr/share/dotnet.tizen/framework/Tizen.System.Information.dll + /usr/share/dotnet.tizen/framework/Tizen.System.Storage.dll + /usr/share/dotnet.tizen/framework/Tizen.System.SystemSettings.dll + /usr/share/dotnet.tizen/framework/Tizen.Uix.Stt.dll + /usr/share/dotnet.tizen/framework/Tizen.Uix.Tts.dll + /usr/share/dotnet.tizen/framework/Tizen.WebView.dll + /usr/share/dotnet.tizen/framework/XSF.dll +" + +export IBCDATA_DIR=/usr/share/dotnet.tizen/ibcdata +export COMPlus_UseIBCFile=1 +export COMPlus_IBCFileDir=$IBCDATA_DIR + +# remove previous native image +dotnettool --ni-reset-system + +# generate SPC native image and remove origin +dotnettool --ni-dll /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll +if [ -f '/usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup' ] +then + echo "remove origin file : System.Private.CoreLib.dll.Backup" + rm -f /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup + touch /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup +fi + +# generate native image +for target in $DLL_LIST; +do + dotnettool --ni-dll $target; + if [ -f ${target//.dll/.ni.dll} ] + then + echo "remove origin file : $target" + rm -f $target + fi +done; + +# remove ibc data +if [ -d $IBCDATA_DIR ] +then + echo "remove ibc data and directory" + rm -rf $IBCDATA_DIR +fi + -- 2.7.4