From bf59a13a31683ead3d67a135629f4ac80e5cb877 Mon Sep 17 00:00:00 2001 From: Woongsuk Cho Date: Fri, 24 Apr 2020 06:56:11 +0900 Subject: [PATCH] use ibc file for generate NI Change-Id: Icb4414208a67bd216473fcf7ec4b8d527304571b --- scripts/wearable-dotnet-generate-ni.post | 87 ++++++++++++++++++++------------ 1 file changed, 54 insertions(+), 33 deletions(-) diff --git a/scripts/wearable-dotnet-generate-ni.post b/scripts/wearable-dotnet-generate-ni.post index 7071c5f..64264ea 100755 --- a/scripts/wearable-dotnet-generate-ni.post +++ b/scripts/wearable-dotnet-generate-ni.post @@ -1,37 +1,58 @@ #!/bin/sh echo "############### wearable-dotnet-generate-ni.post ################" -# Generate NI for System -nitool --dll /usr/share/dotnet.tizen/netcoreapp/SOS.NETCore.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Collections.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Collections.Concurrent.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Console.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Diagnostics.Debug.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.IO.FileSystem.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Linq.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Linq.Expressions.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.ObjectModel.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Private.DataContractSerialization.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Private.Uri.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Private.Xml.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Reflection.Extensions.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Reflection.Metadata.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Runtime.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Runtime.Extensions.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Runtime.InteropServices.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Security.Cryptography.Algorithms.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Security.Cryptography.Primitives.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Text.RegularExpressions.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Threading.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Threading.Tasks.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Threading.Thread.dll -nitool --dll /usr/share/dotnet.tizen/netcoreapp/System.Threading.Timer.dll -# Generate NI for Xamarin and Device API -nitool --dll /usr/share/dotnet.tizen/framework/ElmSharp.dll -nitool --dll /usr/share/dotnet.tizen/framework/XSF.dll -nitool --dll /usr/share/dotnet.tizen/framework/Tizen.dll -nitool --dll /usr/share/dotnet.tizen/framework/Tizen.Applications.Common.dll -nitool --dll /usr/share/dotnet.tizen/framework/Tizen.Applications.UI.dll -nitool --dll /usr/share/dotnet.tizen/framework/Tizen.Applications.Service.dll -nitool --dll /usr/share/dotnet.tizen/framework/Tizen.System.Information.dll +DLL_LIST=" + /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll + /usr/share/dotnet.tizen/netcoreapp/SOS.NETCore.dll + /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/XSF.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 +" + +export IBCDATA_DIR=/usr/share/dotnet.tizen/ibcdata +export COMPlus_UseIBCFile=1 +export COMPlus_PartialNGen=0 +export COMPlus_IBCFileDir=$IBCDATA_DIR + +# remove previous native image +dotnettool --ni-reset-system + +# generate native image +for target in $DLL_LIST; +do + dotnettool --ni-dll $target; +done; + +# remove ibc data files +if [ -d $IBCDATA_DIR ] +then + rm -rf $IBCDATA_DIR +fi -- 2.7.4