-
Notifications
You must be signed in to change notification settings - Fork 1
/
partial-aot.sh
executable file
·30 lines (21 loc) · 1.02 KB
/
partial-aot.sh
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
#!/bin/bash -e
MSBUILD="${MSBUILD:-xbuild}"
PROJECT="Scratch.MyCamera/Scratch.MyCamera.csproj"
APK_SIGNED="Scratch.MyCamera/bin/Release/scratch.mycamera-Signed.apk"
APK_UNSIGNED="Scratch.MyCamera/obj/Release/android/bin/scratch.mycamera.apk"
AOT_REMOVE_LIBS="
lib/armeabi-v7a/libaot-Scratch.MyCamera.dll.so
lib/armeabi-v7a/libaot-System.Xml.dll.so
lib/armeabi-v7a/libaot-System.Core.dll.so
lib/armeabi-v7a/libaot-System.Runtime.Serialization.dll.so
lib/armeabi-v7a/libaot-System.ServiceModel.Internals.dll.so
"
"$MSBUILD" $MSBUILD_FLAGS /p:Configuration=Release /t:SignAndroidPackage "$PROJECT"
cp "$APK_SIGNED" "scratch.mycamera-Signed+FullJIT.apk"
"$MSBUILD" $MSBUILD_FLAGS /p:Configuration=Release /t:SignAndroidPackage /p:AotAssemblies=True "$PROJECT"
mv "$APK_SIGNED" "scratch.mycamera-Signed+AOT.apk"
for lib in $AOT_REMOVE_LIBS ; do
zip -d "$APK_UNSIGNED" "$lib"
done
"$MSBUILD" $MSBUILD_FLAGS /p:Configuration=Release /t:_Sign /p:AotAssemblies=True "$PROJECT"
cp "$APK_SIGNED" "scratch.mycamera-Signed+PartialAOT.apk"