The Pre-Compiled app skips the TAC (#444)
[platform/core/dotnet/launcher.git] / resource / wearable-dotnet-generate-ni.high.post
1 #!/bin/sh
2 echo "############### wearable-dotnet-generate-ni.post ################"
3
4 SYSTEM_DIRS="
5     /usr/share/dotnet.tizen/netcoreapp
6     /usr/share/dotnet.tizen/framework
7 "
8
9 export IBCDATA_DIR=/usr/share/dotnet.tizen/ibcdata
10 export COMPlus_UseIBCFile=1
11 export COMPlus_IBCFileDir=$IBCDATA_DIR
12
13 # remove previous native image
14 dotnettool --ni-reset-system
15
16 # generate SPC native image and remove origin
17 dotnettool --ni-dll /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll
18 if [ -f '/usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup' ]
19 then
20     echo "remove origin file : System.Private.CoreLib.dll.Backup"
21     rm -f /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup
22     touch /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup
23 fi
24
25 # generate ni file and remove origin dll file
26 for target_dir in $SYSTEM_DIRS
27 do
28     for target_dll in $target_dir/*.dll;
29     do
30         dotnettool --ni-dll $target_dll;
31         if [ -f ${target_dll//.dll/.ni.dll} ]
32         then
33             echo "remove origin file : $target_dll"
34             rm -f $target_dll
35         fi
36     done;
37 done;
38
39 # remove ibc data
40 if [ -d $IBCDATA_DIR ]
41 then
42     echo "remove ibc data and directory"
43     rm -rf $IBCDATA_DIR
44 fi
45