Skip to content

为Modrinth整合包支持服务端自动更新 (#6135)#6139

Open
link-fgfgui wants to merge 14 commits into
HMCL-dev:mainfrom
link-fgfgui:6135
Open

为Modrinth整合包支持服务端自动更新 (#6135)#6139
link-fgfgui wants to merge 14 commits into
HMCL-dev:mainfrom
link-fgfgui:6135

Conversation

@link-fgfgui
Copy link
Copy Markdown

@link-fgfgui link-fgfgui commented May 24, 2026

Summary

  • 支持 Modrinth 整合包启动时自动检测并提示更新
  • 支持导出 Modrinth 整合包时填入 fileApi,使客户端可通过自定义 URL 下载文件
  • 更新整合包时若 modloader 版本一致则跳过重新安装,减少不必要操作
  • 更新整合包时自动清理旧版本残留文件

Changes

启动时自动更新检测 (ModrinthCheckServerPackUpdateTask)

  • 每次启动已安装的 Modrinth 整合包时,从 manifest 中读取 fileApi
  • 下载远程 {fileApi}/server.mrpack,对比新旧 versionId
  • 发现新版本则弹窗询问用户是否立即更新

导出时 fileApi 支持 (ModrinthModpackExportTask)

  • 导出选项新增 fileApi 字段,允许服主填入自定义文件分发地址
  • 本地 mod/资源文件若不在 CurseForge/Modrinth 远程库中,会自动生成带 fileApi 下载 URL 的 manifest 条目

安装/更新优化 (ModrinthInstallTask)

  • Modloader 版本完全一致时跳过重新安装
  • 更新时对比新旧文件列表,自动删除旧版残留文件

手动测试

  • 使用带 fileApi 的 mrpack 启动,验证新版本检测弹窗
  • 导出整合包时填入 fileApi,检查 manifest 中文件的 downloads 字段
  • 更新整合包且 modloader 版本不变时,确认 modloader 安装步骤被跳过
  • 更新整合包后确认旧版本残留文件已被清理

Closes #6135

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] 为mrpack整合包支持 服务端自动更新

1 participant