HMCL-dev / HMCL-dev/HMCL

[Feature] 为mrpack整合包支持 服务端自动更新

Open
#6,135 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
10.1k
Forks
934
Avg merge
1d 5h
Merged PRs (30d)
82

Description

概述 | Summary

建议扩展 HMCL 的 mrpack (Modrinth 整合包) 导入与导出功能,使其支持类似于现有的“服务端自动更新整合包”机制。通过在 modrinth.index.jsonmeta 字段中注入自定义更新源(fileApi),让 mrpack 格式也能实现客户端与服务端的增量热更新。

原因 | Reason

彻底摆脱"服务端自动更新整合包"和自动更新版的MCBBS整合包的所有历史遗留问题,解决古老的#2174 问题
可以共用现有的mrpack整合包安装和整合包升级的逻辑,降低维护成本

详情 | Description

导出mrpack时支持填写fileApi字段,
此时为所有文件的downloads链接列表追加 fileApi+file_path元素,为暂时不存在的文件(未查询到cf/mr远端文件url)加一个,把fileApi写入meta字段,完全不包含overrides文件夹(也许可以可选?)
导入mrpack时保留fileApi字段
启动游戏时若有fileApi则尝试请求fileApi+server.mrpack并检查版本号,若版本号更高则执行更新整合包的逻辑(可以允许用户选择是否更新)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing HMCL's existing mrpack import/export and server auto-update logic, then review the historical context in issue #2174. Done means mrpack export and import preserve fileApi, and startup can check server.mrpack versions and apply the existing update flow as described.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
desktop, release
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.