summaryrefslogtreecommitdiff
path: root/scripts/iot-making-building-blocks-dll.post
blob: 3f67c7ec22278c41f06fa1423c7d50dbc489894e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/sh

echo "############### iot-making-building-blocks-dll.post ################"

export IBCDATA_DIR=/usr/share/dotnet.tizen/ibcdata

if [ -f  /opt/share/bb/make_tizenfx_from_bb.sh ]
then
	/opt/share/bb/make_tizenfx_from_bb.sh
	if [ -f /usr/bin/dotnettool ]
	then
		# remove previous native image
		dotnettool --ni-reset-system

		dotnettool --ibc-dir $IBCDATA_DIR --ni-dll /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll
		if [ -f /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup ]
		then
			# generate native image with ibcdata
			dotnettool --ibc-dir $IBCDATA_DIR --ni-system
		else
			echo "The current ibcdata format does not match in Iot(aarch64) profile. So regenerate native image without ibcdata."
			# regenerate native image without ibcdata
			dotnettool --ni-system
		fi

		# remove ibc data files
		if [ -d $IBCDATA_DIR ]
		then
		    rm -rf $IBCDATA_DIR
		fi
	else
		echo "There is no execute file - /usr/bin/dotnettool"
	fi
else
	echo "There is no script file - /opt/share/bb/make_tizenfx_from_bb.sh"
fi