feat: 完善 Minecraft 启动功能#60
Merged
AnemoFlower merged 23 commits intoCeciliaStudio:mainfrom Feb 7, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
该 PR 主要围绕 Minecraft 启动链路做增强:将启动过程抽象为可取消的任务流水线,提供启动进度/阶段展示、崩溃导出入口,并新增“实例设置”页面以支持实例级 JVM 配置与 Java 选择。
Changes:
- 新增启动任务链(Java 检查/账号刷新/预检查/资源补全/启动/等待窗口)与启动进度展示、取消与强制停止入口
- 新增实例设置子页面与实例级配置持久化(JVM 内存、Java 路径等)
- 重构/补全 Core 层模型与工具(Account/PlayerProfile/ClientManifest/Java 搜索、Task 进度发布等)
Reviewed changes
Copilot reviewed 43 out of 44 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| PCL.Mac/Views/Tasks/TasksPage.swift | 任务列表仅展示 display == true 的任务 |
| PCL.Mac/Views/Sidebar.swift | Sidebar 协议移除强制 init() |
| PCL.Mac/Views/Multiplayer/MultiplayerPage.swift | 账号类型访问方式调整为 AccountType |
| PCL.Mac/Views/MessageBoxView.swift | 弹窗最大宽度限制放宽 |
| PCL.Mac/Views/Launch/LaunchSidebar.swift | 启动中 UI、进度条、取消按钮、实例设置入口 |
| PCL.Mac/Views/Launch/LaunchPage.swift | 调试按钮更新,新增临时 Java 安装弹窗入口 |
| PCL.Mac/Views/Launch/InstanceSettings/InstanceSettingsSidebar.swift | 新增实例设置侧边栏 |
| PCL.Mac/Views/Launch/InstanceSettings/InstanceConfigPage.swift | 新增实例配置页(JVM Heap Size 等) |
| PCL.Mac/Views/Launch/InstanceList/InstanceListSidebar.swift | “导入整合包”占位点击行为调整 |
| PCL.Mac/ViewModels/InstanceViewModel.swift | 新增 loadInstance;启动入口改走 LaunchManager |
| PCL.Mac/ViewModels/AccountViewModel.swift | 添加微软账号后写入 hasMicrosoftAccount 标记 |
| PCL.Mac/Task/MinecraftLaunchTask.swift | 新增启动任务流水线与预检查逻辑 |
| PCL.Mac/Models/Account/Account.swift | 删除旧 Account 定义(迁移至 Core) |
| PCL.Mac/Managers/TaskManager.swift | 任务执行支持隐藏/完成回调/可取消 |
| PCL.Mac/Managers/MinecraftLaunchManager.swift | 新增启动状态管理、崩溃导出、进度订阅 |
| PCL.Mac/Extensions/Frontend.swift | 新增 AccountType.localized |
| PCL.Mac/ContentView.swift | 右下角新增额外按钮 overlay(强制停止/取消启动) |
| PCL.Mac/Components/MyTextField.swift | 新增文本/数字输入组件 |
| PCL.Mac/Components/MyLoading.swift | 支持无 Card 展示模式 |
| PCL.Mac/Components/MyCard.swift | 支持自定义 padding |
| PCL.Mac/Assets.xcassets/Icons/IconPower.imageset/IconPower.svg | 新增电源按钮图标资源 |
| PCL.Mac/Assets.xcassets/Icons/IconPower.imageset/Contents.json | 新增图标资源声明 |
| PCL.Mac/App/LauncherConfig.swift | 新增 hasMicrosoftAccount 与 launchCount 持久化字段 |
| PCL.Mac/App/AppWindow.swift | 调整窗口最小尺寸与默认高度 |
| PCL.Mac/App/AppRouter.swift | 新增实例设置路由与实例配置子路由 |
| PCL.Mac.Core/Utils/URLConstants.swift | temperatureURL 更名为 tempURL |
| PCL.Mac.Core/Utils/Requests.swift | User-Agent 改为使用 Metadata.appVersion |
| PCL.Mac.Core/Utils/LocaleUtils.swift | 新增 locale/地区相关工具 |
| PCL.Mac.Core/Utils/Errors.swift | 新增 JavaError;LaunchError 调整 |
| PCL.Mac.Core/Task/MyTask.swift | 新增任务阶段与整体进度发布、取消检查 |
| PCL.Mac.Core/Task/MinecraftInstallTask.swift | 下载子任务重构;新增资源补全 API |
| PCL.Mac.Core/Task/AnyMyTask.swift | 支持 display 字段 |
| PCL.Mac.Core/Services/MicrosoftAuthService.swift | Profile 模型名变更;refresh 请求编码方式调整 |
| PCL.Mac.Core/Services/JavaSearcher.swift | JavaRuntime 加载逻辑重构并引入 JavaError |
| PCL.Mac.Core/Models/PlayerProfile.swift | PlayerProfileModel 重命名为 PlayerProfile |
| PCL.Mac.Core/Models/ClientManifest.swift | 增加 javaVersion;部分 mappings 字段改为可选 |
| PCL.Mac.Core/Models/Account/OfflineAccount.swift | OfflineAccount 迁移到 Core |
| PCL.Mac.Core/Models/Account/MicrosoftAccount.swift | MicrosoftAccount 迁移到 Core |
| PCL.Mac.Core/Models/Account/Account.swift | Core 层统一 Account/AccountType/Wrapper 定义 |
| PCL.Mac.Core/Minecraft/MinecraftInstance.swift | 新增实例配置持久化、Java 选择、JVM 设置接口 |
| PCL.Mac.Core/Minecraft/Launch/MinecraftLauncher.swift | 启动参数改为真实账号信息;写入 game log;返回 Process |
| PCL.Mac.Core/Minecraft/Launch/LaunchPrecheck.swift | 新增启动预检查项 |
| PCL.Mac.Core/Minecraft/Launch/LaunchOptions.swift | options 结构调整(profile/accessToken/javaRuntime/demo 等) |
| PCL.Mac.Core/Managers/JavaManager.swift | 新增 JavaManager 统一管理 JavaRuntime 列表 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
本 PR 添加了
LaunchPrecheck、启动进度显示和实例设置。closes #38
嗯对大概就是半夜睡不着爬起来写代码了