Open
Conversation
Contributor
Author
|
CC @3gf8jv4dv 或许需要检查本地化文件 |
3gf8jv4dv
reviewed
Apr 4, 2026
Member
|
我觉得做个弹窗的必要性不大,而且会给用户造成困惑。我们可以考虑
|
Contributor
Author
|
其实一开始我就是这么想的,但后面多种原因我考虑了当前的弹窗方案
使用这一方案会有一个问题,默认情况下这几个操作系统应该使用什么后缀?毕竟 FileChooser 应该是不会向应用传递用户选择的文件类型
我目前的想法是 macOS 下默认 `command` ,其他操作系统默认 `sh`,Windows 下我不是很清楚 `bat` 和 `ps1` 哪个更合适 🤔
…---原始邮件---
发件人: ***@***.***>
发送时间: 2026年4月4日(周六) 晚上9:02
收件人: ***@***.***>;
抄送: "Damon ***@***.******@***.***>;
主题: Re: [HMCL-dev/HMCL] 改善启动脚本导出 (PR #5906)
Glavo left a comment (HMCL-dev/HMCL#5906)
我觉得做个弹窗的必要性不大,而且会给用户造成困惑。我们可以考虑
自动对没有后缀的文件添加后缀;
增强对各种后缀的支持(比如 .command)。
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Member
|
Windows 上 |
Glavo
reviewed
Apr 5, 2026
HMCL/src/main/java/org/jackhuang/hmcl/ui/versions/Versions.java
Outdated
Show resolved
Hide resolved
Member
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces automatic file extension validation for launch scripts, appending a default extension if the provided one is invalid for the current operating system. It also expands the allowed extensions on macOS/Linux to include ".bash". The review feedback correctly identifies that the extension checks are case-sensitive, which could cause issues with uppercase extensions; using case-insensitive comparisons is suggested to improve robustness.
HMCLCore/src/main/java/org/jackhuang/hmcl/launch/DefaultLauncher.java
Outdated
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolve #5200
下图已过期,对话框已删除

当无法判断应该导出什么格式的启动脚本时,直接基于操作系统添加合适的后缀
同时把
bash这个后缀也纳入了可通过检测确定文件后缀的范围