@@ -70,24 +70,45 @@ for build_type in $APP/app/.externalNativeBuild/cmake/*; do
70
70
mkdir $build_type_and_abi /built/sample_pdfs
71
71
fi
72
72
cp -v $BASEDIR /test/browser_tests/* .pdf $build_type_and_abi /built/sample_pdfs/
73
- FINAL_TAR=$build_type_and_abi /${build_type_string} -${abi_string} -pdf2htmlEX.tar
74
- tar -cf $FINAL_TAR --directory $build_type_and_abi built
75
- tar --list -f $FINAL_TAR
76
- echo " $FINAL_TAR is ready!"
77
73
done
78
74
done
79
75
80
76
echo " "
81
77
echo " "
82
78
83
- # Print a list of available .tar's, because the previous messages will be lost behind a wall of text
79
+ # Pack pdf2htmlEX binaries with UPX
80
+
84
81
for build_type in $APP /app/.externalNativeBuild/cmake/* ; do
85
82
build_type_string=$( basename ${build_type} )
86
83
for build_type_and_abi in $build_type /* ; do
87
84
abi_string=$( basename ${build_type_and_abi} )
85
+
86
+ COMPILED_BINARY=$build_type_and_abi /built/bin/pdf2htmlEX
87
+ PACKED_BINARY=$build_type_and_abi /built/bin/pdf2htmlEX-compressed
88
+ upx --ultra-brute --8mib-ram -o $PACKED_BINARY $COMPILED_BINARY
89
+ upx -t $PACKED_BINARY
90
+
88
91
FINAL_TAR=$build_type_and_abi /${build_type_string} -${abi_string} -pdf2htmlEX.tar
89
92
if [ -f " ${FINAL_TAR} " ]; then
90
93
echo " $FINAL_TAR is ready!"
91
94
fi
95
+
96
+ ls -lha $build_type_and_abi /built/bin/pdf2htmlEX
97
+ done
98
+ done
99
+
100
+ echo " "
101
+ echo " "
102
+
103
+ # Compress binaries and other files into .tar's
104
+ for build_type in $APP /app/.externalNativeBuild/cmake/* ; do
105
+ build_type_string=$( basename ${build_type} )
106
+ for build_type_and_abi in $build_type /* ; do
107
+ abi_string=$( basename ${build_type_and_abi} )
108
+
109
+ FINAL_TAR=$build_type_and_abi /${build_type_string} -${abi_string} -pdf2htmlEX.tar
110
+ tar -cf $FINAL_TAR --directory $build_type_and_abi built
111
+ tar --list -f $FINAL_TAR
112
+ echo " $FINAL_TAR is ready!"
92
113
done
93
114
done
0 commit comments