Package Details: hmcl-bin 3.5.9.252-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: 10
Popularity: 0.124159
First Submitted: 2021-10-04 12:37 (UTC)
Last Updated: 2024-09-02 12:50 (UTC)

Dependencies (3)

Required by (0)

Sources (5)

Latest Comments

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

HinataAoi commented on 2024-02-25 13:57 (UTC)

筛选jfx的部分我也不知道能不能再改进,我上面给出的就是从你们之前的版本抄的,不知道有没有更好的筛选方法.不过可以确定的是类似'java-openjfx-bin'这个包就有问题.因为这个包没按照规范把jfx存在/usr/lib下.不过我觉得这种问题是那个包导致的我们不用管.

另外看了一下改动历史,java-openjfx还在依赖里,应该放到可选依赖吧.

Bot-wxt1221 commented on 2024-02-25 13:19 (UTC) (edited on 2024-02-25 13:21 (UTC) by Bot-wxt1221)

这正是我想要用的,我正在改,但是貌似出了一点问题。

另外,请问目前探测jfx的方式是否有任何问题。

@HinataAoi

HinataAoi commented on 2024-02-25 09:03 (UTC) (edited on 2024-02-25 09:06 (UTC) by HinataAoi)

我之前遇到问题那句指令怎么躺枪了😂,又变成用A包调用B包的lib目录了.

对于楼上yataro提到的问题,其实可以这样解决: 把java-openjfx改为可选依赖,然后在launch-script中用之前的方法筛一下有没有安装,有的话就用jfx启动.不过不建议采用楼上提到的hmcl-new的筛选jfx的方法,至少我用的这个jfx就有问题,会被筛没. 我按着这个思路试着写了一下:

JAVAFX_HOME=$(pacman -Ql java-openjfx | grep javafx | head -n 1 | cut -d / -f 5)


if [ -n "${JAVAFX_HOME}" ]; then
    exec /usr/lib/jvm/"${JAVAFX_HOME}"/bin/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 "$@"
else
    exec java -jar /usr/share/java/hmcl-bin/hmcl-bin.jar "$@"
fi

这样的话再把PKGBUILD里面的java-openjfx改成可选依赖就行了,如果检索到本地已经安装的jfx就会优先调用.如果只有java-runtime的话就直接启动让hmcl自己解决jfx的问题.

@Bot-wxt1221

yataro commented on 2024-02-21 12:21 (UTC)

By the way, the hmcl-new package uses a similar, but slightly different approach:

JAVAFX_HOME=$(dirname "$(pacman -Ql java-openjfx | grep -e '/javafx\..*\.jar$' | head -n 1 | cut -s -d ' ' -f '2-')")

Wanna try? Maybe it works better with other packages.

yataro commented on 2024-02-21 12:17 (UTC)

Look at zulu-jre-fx-bin, zulu-jdk-fx-bin, java-openjfx-bin they all provide java-openjfx

yataro commented on 2024-02-21 12:14 (UTC)

Lol, java-openjfx is not always exactly java-openjfx, any jfx package can provide java-openjfx.

$ pacman -Q java-openjfx
java-openjfx-bin 21-2

Bot-wxt1221 commented on 2024-02-21 12:08 (UTC)

I don't think 'pacman -Ql java-openjfx | grep javafx' is acceptable. Because users may install other javafx from AUR. I wonder if there's better choice.

yataro commented on 2024-02-21 12:04 (UTC)

Your latest script update has a JAVA_HOME variable defined, but you never use or export it. I'm sorry, but I don't think you know what you're doing... I'd love to help with the package, but I need some information.

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

I mean you removed the openjfx dependency (HMCL can download openjfx by itself, but is not really an acceptable solution, if I want to use installed openjfx). What should pacman -Ql java-runtime | grep javafx do in the start script? It echoes nothing on my system (openjfx installed). I believe you should bring back pacman -Ql java-openjfx | grep javafx hack, look for my previous comment.

Bot-wxt1221 commented on 2024-02-21 11:25 (UTC) (edited on 2024-02-21 11:27 (UTC) by Bot-wxt1221)

What do you mean? Feel free to give any advices.

@yataro