Skip to content

功能: 添加服务器版本管理器(下载/更新/降级 Factorio 服务端)#2

Merged
joey00797-cell merged 38 commits into
joey00797-cell:developfrom
BAYUNZIYUE:feat/server-version-manager
Jun 21, 2026
Merged

功能: 添加服务器版本管理器(下载/更新/降级 Factorio 服务端)#2
joey00797-cell merged 38 commits into
joey00797-cell:developfrom
BAYUNZIYUE:feat/server-version-manager

Conversation

@BAYUNZIYUE

Copy link
Copy Markdown

为 FSM 添加完整的 Factorio 服务端版本管理功能。

功能:

  • 显示当前版本 + 自动检测更新
  • 从 official API 获取版本列表(稳定版/测试版分栏,新到旧排序)
  • 一键下载安装任意版本
  • 异步安装 + WebSocket 实时进度条
  • 安装完成自动刷新版本号,无需重启 FSM

详见 PR OpenFactorioServerManager#443 完整说明:OpenFactorioServerManager#443

@joey00797-cell joey00797-cell merged commit 7124c97 into joey00797-cell:develop Jun 21, 2026
@joey00797-cell

joey00797-cell commented Jun 22, 2026

Copy link
Copy Markdown
Owner

@BAYUNZIYUE Hi friend, I tried to merge your project with mine, but apparently after you forked it, a lot of changes happened and now they don't merge. That's why I'd like to put your fork down and study it. Tell me how exactly you get it up and running so I don't waste time searching.
Upd: Okay, I've already figured it out. There are errors during the build and some path inconsistencies. But I've already fixed your build locally. I'll study it.

@BAYUNZIYUE

Copy link
Copy Markdown
Author

嘿bro 我现在在想办法给从存档加载mod这里加文件大小和进度 但是很头疼文件大小获取 因为多线程下载文件头锁定有点难😭

@joey00797-cell

joey00797-cell commented Jun 22, 2026

Copy link
Copy Markdown
Owner

Show me how you get the size, or post the files. I'll see if I can figure out how to help you.
What you're most likely experiencing is this: instead of trying to get the file size from a blocked thread during loading (and therefore using Header.Get("Content-Length")) in each thread, it's better to use the following approach:

Before starting the threads, make one quick request to the mod portal API to get the mod metadata (the exact file size in bytes is usually written in JSON format for each mod version).

Write these sizes into a data structure.

Run a multithreaded loader that will take a predefined total_size from memory and silently calculate the percentage complete (current_bytes / total_size * 100).

Friend, I've rewritten the translation logic a bit. I'll be at my computer this evening and compile the release. I think you'll like it.
I'm also working on getting headless server versions and some changes in that direction :)

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.

2 participants