From ced25d711215b460180a65af9f75c317f008322e Mon Sep 17 00:00:00 2001 From: Torkus <48141663+ogri-la@users.noreply.github.com> Date: Sun, 2 Apr 2023 10:16:20 +0930 Subject: [PATCH] build-linux-image, changed jlink compress=2 to compress=1 this leads to shaving ~7MB off of final AppImage. '2' means 'zip', which (I think) interferes with AppImage compression. --- build-linux-image.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build-linux-image.sh b/build-linux-image.sh index c05779f0..1a8c7129 100755 --- a/build-linux-image.sh +++ b/build-linux-image.sh @@ -6,13 +6,16 @@ output_dir="custom-jre" rm -rf "./$output_dir" echo "--- building custom JRE ---" + +# compress=1 'constant string sharing' compresses better eventually than compress=2 'zip', 52MB -> 45MB +# - https://docs.oracle.com/en/java/javase/19/docs/specs/man/jlink.html#plugin-compress jlink \ --add-modules "java.sql,java.naming,java.desktop,jdk.unsupported,jdk.crypto.ec" \ --output "$output_dir" \ --strip-debug \ --no-man-pages \ --no-header-files \ - --compress=2 + --compress=1 # needed when built using Ubuntu as libjvm.so is *huge* # doesn't seem to hurt to strip the other .so files.