Package Details: hmcl-bin 3.6.11.264-1

Git Clone URL: https://aur.archlinux.org/hmcl-bin.git (read-only, click to copy)
Package Base: hmcl-bin
Description: A Minecraft Launcher which is multi-functional, cross-platform and popular.
Upstream URL: https://github.com/huanghongxun/HMCL
Licenses: GPL3
Conflicts: hmcl
Provides: hmcl
Submitter: so1ar
Maintainer: TTsdzb
Last Packager: TTsdzb
Votes: 11
Popularity: 0.36
First Submitted: 2021-10-04 12:37 (UTC)
Last Updated: 2024-11-29 15:14 (UTC)

Dependencies (3)

Required by (0)

Sources (5)

Latest Comments

« First ‹ Previous 1 2 3 4 Next › Last »

yataro commented on 2024-02-21 11:23 (UTC)

Bruh, bro, you ruined the package

Bot-wxt1221 commented on 2024-02-20 07:48 (UTC)

妈妈东西

HinataAoi commented on 2024-02-20 07:48 (UTC)

校验值写错了😂

Bot-wxt1221 commented on 2024-02-13 03:13 (UTC)

行,待会改

HinataAoi commented on 2024-02-12 10:58 (UTC) (edited on 2024-02-12 13:11 (UTC) by HinataAoi)

我这边出现了问题,因为我这边默认调用的jre是zulu-21-bin.而启动脚本最后一行--module-path指定的却是pacman查询的java-openjfx依赖的提供者的lib目录,在我这里就是指向了zulu-jre-fx-bin的lib目录.

导致的情况就是zulu-21-bin在尝试使用zulu-jre-fx-bin的lib目录

我不懂java,不清楚jre不同版本间是否能用彼此的lib目录,但我这里确实出现了问题.会提示"Module javafx.base not found"

也许可以把最后一行里的java改成"${JAVA_HOME}"/bin/java?


另外hmcl.desktop里抄错抄成exec=hmcl-stable-bin了

Bot-wxt1221 commented on 2024-02-12 09:54 (UTC) (edited on 2024-02-12 09:54 (UTC) by Bot-wxt1221)

我把stable的拷过来了,实测能用。有问题吗

HinataAoi commented on 2024-02-12 09:18 (UTC)

启动脚本被改回了之前的版本?但是最后一行和一开始不一样了.

HinataAoi commented on 2024-02-11 09:58 (UTC) (edited on 2024-02-12 00:12 (UTC) by HinataAoi)

The hmcl-launch-script will not work if the default java is not from the provider of java-openfx. For example, I installed zulu-jre-fx-bin and zulu-21-bin as the provider of java-openjfx and the provider of java-runtime respectively.

This is a simple fix, but I'm not sure if it will have any other side effects:

diff --git a/b/hmcl-launch-script b/a/hmcl-launch-script
index 9330ba6..149a361 100755
--- a/b/hmcl-launch-script
+++ b/a/hmcl-launch-script
@@ -8,14 +8,15 @@ if [ "$1" != "-p" ]; then
     cd $WORKDIR
 fi

-if [ -n "${JAVA_HOME}" ]; then
-    JAVA=${JAVA_HOME}/bin/java
-else
-    JAVA=java
-fi

 if [ -z "${JAVAFX_HOME}" ]; then
     JAVAFX_HOME=/usr/lib/jvm/$(pacman -Ql java-openjfx | grep javafx | head -n 1 | cut -d / -f 5)
 fi

+if [ -n "${JAVA_HOME}" ]; then
+    JAVA=${JAVA_HOME}/bin/java
+else
+    JAVA=${JAVAFX_HOME}/bin/java
+fi
+
 exec "${JAVA}" --module-path "${JAVAFX_HOME}/lib/javafx.base.jar:${JAVAFX_HOME}/lib/javafx.fxml.jar:${JAVAFX_HOME}/lib/javafx.graphics.jar:${JAVAFX_HOME}/lib/javafx.media.jar:${JAVAFX_HOME}/lib/javafx.swing.jar:${JAVAFX_HOME}/lib/javafx.web.jar:${JAVAFX_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-bin/hmcl-bin.jar "$@"

BTW, the version number is 3.5.5.235, not 3.5.4.235

yataro commented on 2024-01-16 07:58 (UTC) (edited on 2024-01-16 08:02 (UTC) by yataro)

hmcl-launch-script is broken for java-openjfx-bin:

/usr/bin/hmcl-bin: line 11: /usr/lib/jvm/java-21-openjfx/bin/java: No such file or directory

Also, the script uses the non-POSIX [[ in the presence of #!/bin/sh shebang and the script should fail if anything before running HMCL fails, consider using set -e. It is better to allow the user select java and javafx directories using the well-known variables JAVA_HOME and JAVAFX_HOME respectively.

Here's the PATCH with fixes:

diff --git a/PKGBUILD b/PKGBUILD
index c219791..3ea84ac 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@ pkgname=hmcl-bin
 _ver=3.5.4
 _build=234
 pkgver=${_ver}.${_build}
-pkgrel=2
+pkgrel=3
 pkgdesc="A Minecraft Launcher which is multi-functional, cross-platform and popular."
 arch=('any')
 url="https://github.com/huanghongxun/HMCL"
@@ -19,7 +19,7 @@ source=("hmcl.desktop"
         "LICENSE::https://raw.githubusercontent.com/huanghongxun/HMCL/javafx/LICENSE"
         "${pkgname}-${pkgver}-${pkgrel}.jar::https://github.com/huanghongxun/HMCL/releases/download/v${pkgver}/HMCL-${pkgver}.jar")
 sha256sums=('9a561081f8f3ece3da114afd4f6d90565ca0e04716eef4ea88c6b4306566ae9b'
-            'd7b373e705bfa287fa720a64820fa34c9df29ce87e73c1814c70e643434fe550'
+            '0c1ee34a9aa72e9f573730bff336e26095cb5e09d27d26d20ce3e0a7c5714ee7'
             '2989a1b5301b8c7b9afdae5696c6a4e5246afa2d4f1f3d3dad5c192f036a9b4c'
             '3972dc9744f6499f0f9b2dbf76696f2ae7ad8af9b23dde66d6af86c9dfb36986'
             '4de4ae5abc2c8323a21b393a0ed7dccf8dced21fcae9fdb66e40295f0cb24cc5')
diff --git a/hmcl-launch-script b/hmcl-launch-script
index b8a4d0f..9330ba6 100755
--- a/hmcl-launch-script
+++ b/hmcl-launch-script
@@ -1,11 +1,21 @@
 #!/bin/sh

-if [[ "$1" != "-p" ]]; then
+set -e
+
+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 "${JAVA_HOME}" ]; then
+    JAVA=${JAVA_HOME}/bin/java
+else
+    JAVA=java
+fi
+
+if [ -z "${JAVAFX_HOME}" ]; then
+    JAVAFX_HOME=/usr/lib/jvm/$(pacman -Ql java-openjfx | grep javafx | head -n 1 | cut -d / -f 5)
+fi

-exec "${JAVA_HOME}"/bin/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-bin/hmcl-bin.jar "$@"
+exec "${JAVA}" --module-path "${JAVAFX_HOME}/lib/javafx.base.jar:${JAVAFX_HOME}/lib/javafx.fxml.jar:${JAVAFX_HOME}/lib/javafx.graphics.jar:${JAVAFX_HOME}/lib/javafx.media.jar:${JAVAFX_HOME}/lib/javafx.swing.jar:${JAVAFX_HOME}/lib/javafx.web.jar:${JAVAFX_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-bin/hmcl-bin.jar "$@"

w568w commented on 2023-11-05 04:38 (UTC) (edited on 2023-11-05 04:39 (UTC) by w568w)

Please do not make the package depend on jre-openjdk anymore - Arch now forbids the coexistent of JRE and JDK. Anyone as a Java developer will be unable to install hmcl-bin after the update.

They changed this without hesitation because the Java package guidelines has long recommended use java-runtime dependency for applications needing Java Runtime. Having a direct dependency on the JRE is never a good practice now.