@@ -70,24 +70,45 @@ for build_type in $APP/app/.externalNativeBuild/cmake/*; do
7070 mkdir $build_type_and_abi /built/sample_pdfs
7171 fi
7272 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!"
7773 done
7874done
7975
8076echo " "
8177echo " "
8278
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+
8481for build_type in $APP /app/.externalNativeBuild/cmake/* ; do
8582 build_type_string=$( basename ${build_type} )
8683 for build_type_and_abi in $build_type /* ; do
8784 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+
8891 FINAL_TAR=$build_type_and_abi /${build_type_string} -${abi_string} -pdf2htmlEX.tar
8992 if [ -f " ${FINAL_TAR} " ]; then
9093 echo " $FINAL_TAR is ready!"
9194 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!"
92113 done
93114done
0 commit comments