Skip to content

Commit

Permalink
build-linux-image, changed jlink compress=2 to compress=1
Browse files Browse the repository at this point in the history
this leads to shaving ~7MB off of final AppImage.
'2' means 'zip', which (I think) interferes with AppImage compression.
  • Loading branch information
Torkus committed Apr 2, 2023
1 parent e2b8a2c commit ced25d7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion build-linux-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit ced25d7

Please sign in to comment.