Skip to content

[Enhancement] 后台自动下载更新#6092

Open
ToobLac wants to merge 15 commits into
HMCL-dev:mainfrom
ToobLac:auto-update-download
Open

[Enhancement] 后台自动下载更新#6092
ToobLac wants to merge 15 commits into
HMCL-dev:mainfrom
ToobLac:auto-update-download

Conversation

@ToobLac

@ToobLac ToobLac commented May 16, 2026

Copy link
Copy Markdown
Contributor

Closes #4352

目前默认关闭,开启后在检查更新成功后自动下载更新然后再弹窗

@Minecraft269

Copy link
Copy Markdown

/gemini review

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an automatic update download feature, allowing the launcher to download updates in the background and cache them for installation. It adds the corresponding UI settings, localization strings, and a reusable hash verification utility. The review feedback highlights several critical improvements: implementing a version check to prevent downloading updates when the launcher is already up-to-date, using a thread-safe ConcurrentHashMap for the download cache to avoid concurrency issues, reverting an apparently erroneous change to the NIGHTLY channel name, and using Files.isRegularFile instead of Files.exists to prevent attempting to hash directories.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread HMCL/src/main/java/org/jackhuang/hmcl/upgrade/UpdateChecker.java
Comment thread HMCL/src/main/java/org/jackhuang/hmcl/upgrade/UpdateChecker.java
Comment thread HMCL/src/main/java/org/jackhuang/hmcl/upgrade/RemoteVersion.java Outdated
Comment thread HMCL/src/main/java/org/jackhuang/hmcl/upgrade/UpdateChannel.java Outdated
Comment thread HMCLCore/src/main/java/org/jackhuang/hmcl/util/io/FileUtils.java Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] 添加“后台自动下载更新”功能设置

2 participants