Skip to content

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

Closed
BAYUNZIYUE wants to merge 1 commit into
joey00797-cell:developfrom
BAYUNZIYUE:pr-version-manager
Closed

功能: 服务器版本管理器(下载/更新/降级 Factorio)#3
BAYUNZIYUE wants to merge 1 commit into
joey00797-cell:developfrom
BAYUNZIYUE:pr-version-manager

Conversation

@BAYUNZIYUE

Copy link
Copy Markdown

概述

这是之前 PR #2 中已合并的版本管理器代码,独立提交以便清晰 review。

功能

  • 显示当前安装的 Factorio 版本 + 自动检测更新
  • 从 Factorio 官方 API 获取版本列表(稳定版/测试版分栏)
  • 支持所有历史版本的完整列表
  • 异步安装(API 秒回,后台下载,WebSocket 实时进度)
  • 安装完成自动刷新 FSM 内存中版本号

文件

文件 说明
src/factorio/version_manager.go 核心:版本检测、API获取、tar.xz下载解压
src/factorio/version_status.go 安装状态管理
src/api/version_handler.go API 端点 + WebSocket 推送
ui/App/views/ServerVersion.jsx 前端页面
ui/locales/ 中英文翻译

与现有代码的集成

  • 路由注册在 src/api/routes.go
  • 侧边栏链接在 Layout.jsx
  • 前端路由在 App.jsx
  • i18n 注册在 ui/App/i18n.js

与你的 Roadmap 的关联

你的 ROADMAP.md 中 "Planned" 部分写着 "Factorio version dropdown with auto-download"——就是这个 PR 实现的功能。

基于 feat/server-version-manager 的完整版本管理器:
- 显示当前版本 + 自动检测更新
- 从 Factorio 官方 API 获取版本列表(稳定版/测试版分栏,新到旧排序)
- 异步安装 + WebSocket 实时进度条
- 支持历史版本降级
- 安装完成自动刷新版本号,无需重启 FSM
- 中英文翻译
@joey00797-cell

Copy link
Copy Markdown
Owner

Hey bro. Please put your release in a separate thread. I want to see your work. I have some ideas :)

@joey00797-cell

Copy link
Copy Markdown
Owner

Thanks @BAYUNZIYUE! You are right — this feature is exactly what we had in our roadmap. We have already implemented Factorio version dropdown with auto-download in our own way (commit 83ca9b1). Your PR inspired us and we credited you in ROADMAP.md. Keep contributing! 🎉

@BAYUNZIYUE

Copy link
Copy Markdown
Author

很遗憾没有合并版本选择下载功能。我认为让用户按需自行选择特定版本是有必要的——很多优秀模组只能在特定服务端版本下正常运行。

例如 Factorio 旧se 完全不兼容 2.0 模组,升级后发现模组全不能用就需要降回 1.0。我预想的实现支持完整的 361 个版本列表(稳定/实验均支持),用户可自由选择安装或降级。

@joey00797-cell

joey00797-cell commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Friend, I saw that. I've taken your approach into account and will add it or something similar in future patches. This is good functionality.
Please create a separate thread with your functional build. I'm interested in following your ideas. Thank you.
Also, do you speak English?

@BAYUNZIYUE

Copy link
Copy Markdown
Author

Friend, I saw that. I've taken your approach into account and will add it or something similar in future patches. This is good functionality.
Please create a separate thread with your functional build. I'm interested in following your ideas. Thank you.
Also, do you speak English?

纯英文交流对我来说较为艰难,我均使用ai翻译和交流,如果有些冒犯性内容请见谅。

另外,有些内容我已经尝试完全重构,如果你对功能感兴趣我会准备发一个beta Release

代码方面因为较为耦合,不太方便分段贴出,sad

@BAYUNZIYUE BAYUNZIYUE deleted the pr-version-manager branch July 4, 2026 11:06
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