blob: 5b832f0e77bc1ef6d3ded0fcf18cea276e3a3775 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/bin/sh
if [[ "$1" != "-p" ]]; then
WORKDIR=${XDG_CONFIG_HOME:-$HOME/.config}/hmcl
mkdir -p $WORKDIR
cd $WORKDIR
fi
JAVA_HOME=/usr/lib/jvm/$(pacman -Ql java-openjfx | grep javafx | head -n 1 | cut -d / -f 5)
if [ -n "$(pacman -Ql java-openjfx | grep javafx | head -n 1 | cut -d / -f 5)" ]; then
exec java --module-path "${JAVA_HOME}/lib/javafx.base.jar:${JAVA_HOME}/lib/javafx.fxml.jar:${JAVA_HOME}/lib/javafx.graphics.jar:${JAVA_HOME}/lib/javafx.media.jar:${JAVA_HOME}/lib/javafx.swing.jar:${JAVA_HOME}/lib/javafx.web.jar:${JAVA_HOME}/lib/javafx.controls.jar" --add-modules=javafx.base --add-modules=javafx.fxml --add-modules=javafx.graphics --add-modules=javafx.media --add-modules=javafx.swing --add-modules=javafx.web --add-modules=javafx.controls -jar /usr/share/java/hmcl-stable-bin/hmcl-bin.jar "$@"
else
exec java -jar /usr/share/java/hmcl-stable-bin/hmcl-bin.jar "$@"
fi
|