[WIP] Set the MCJ in the candidate process
[platform/core/dotnet/launcher.git] / resource / wearable-dotnet-generate-ni.low.post
1 #!/bin/sh
2 echo "############### wearable-dotnet-generate-ni.post ################"
3
4 DLL_LIST="
5         /usr/share/dotnet.tizen/netcoreapp/System.Collections.dll
6         /usr/share/dotnet.tizen/netcoreapp/System.Collections.Concurrent.dll
7         /usr/share/dotnet.tizen/netcoreapp/System.Console.dll
8         /usr/share/dotnet.tizen/netcoreapp/System.Diagnostics.Debug.dll
9         /usr/share/dotnet.tizen/netcoreapp/System.IO.FileSystem.dll
10         /usr/share/dotnet.tizen/netcoreapp/System.Linq.dll
11         /usr/share/dotnet.tizen/netcoreapp/System.Linq.Expressions.dll
12         /usr/share/dotnet.tizen/netcoreapp/System.ObjectModel.dll
13         /usr/share/dotnet.tizen/netcoreapp/System.Private.DataContractSerialization.dll
14         /usr/share/dotnet.tizen/netcoreapp/System.Private.Uri.dll
15         /usr/share/dotnet.tizen/netcoreapp/System.Private.Xml.dll
16         /usr/share/dotnet.tizen/netcoreapp/System.Reflection.Extensions.dll
17         /usr/share/dotnet.tizen/netcoreapp/System.Reflection.Metadata.dll
18         /usr/share/dotnet.tizen/netcoreapp/System.Runtime.dll
19         /usr/share/dotnet.tizen/netcoreapp/System.Runtime.Extensions.dll
20         /usr/share/dotnet.tizen/netcoreapp/System.Runtime.InteropServices.dll
21         /usr/share/dotnet.tizen/netcoreapp/System.Security.Cryptography.Algorithms.dll
22         /usr/share/dotnet.tizen/netcoreapp/System.Security.Cryptography.Primitives.dll
23         /usr/share/dotnet.tizen/netcoreapp/System.Text.RegularExpressions.dll
24         /usr/share/dotnet.tizen/netcoreapp/System.Threading.dll
25         /usr/share/dotnet.tizen/netcoreapp/System.Threading.Tasks.dll
26         /usr/share/dotnet.tizen/netcoreapp/System.Threading.Thread.dll
27         /usr/share/dotnet.tizen/netcoreapp/System.Threading.Timer.dll
28         /usr/share/dotnet.tizen/framework/ElmSharp.dll
29         /usr/share/dotnet.tizen/framework/Tizen.dll
30         /usr/share/dotnet.tizen/framework/Tizen.Applications.Common.dll
31         /usr/share/dotnet.tizen/framework/Tizen.Applications.UI.dll
32         /usr/share/dotnet.tizen/framework/Tizen.Applications.Service.dll
33         /usr/share/dotnet.tizen/framework/Tizen.System.Information.dll
34         /usr/share/dotnet.tizen/framework/XSF.dll
35 "
36
37 export IBCDATA_DIR=/usr/share/dotnet.tizen/ibcdata
38 export COMPlus_UseIBCFile=1
39 export COMPlus_IBCFileDir=$IBCDATA_DIR
40
41 # remove previous native image
42 dotnettool --ni-reset-system
43
44 # generate SPC native image and remove origin
45 dotnettool --ni-dll /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll
46 if [ -f '/usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup' ]
47 then
48     echo "remove origin file : System.Private.CoreLib.dll.Backup"
49     rm -f /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup
50     touch /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup
51 fi
52
53 # generate native image
54 for target in $DLL_LIST;
55 do
56     dotnettool --ni-dll $target;
57     if [ -f ${target//.dll/.ni.dll} ]
58     then
59         echo "remove origin file : $target"
60         rm -f $target
61     fi
62 done;
63
64 # remove ibc data
65 if [ -d $IBCDATA_DIR ]
66 then
67     echo "remove ibc data and directory"
68     rm -rf $IBCDATA_DIR
69 fi
70
71