Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

重构崩溃分析系统 #3049

Open
wants to merge 21 commits into
base: main
Choose a base branch
from

Conversation

burningtnt
Copy link
Member

@burningtnt burningtnt commented May 17, 2024

任务列表:

  • 游戏崩溃分析系统
    • 提供 UI 界面
    • 支持分析常见环境、Java、模组版本、模组加载器等问题,并做到一键解决 会继续添加新的规则
  • HMCL 弹窗错误界面:给出解决方案
  • Forge Installer 错误:给出解决方案
  • OptiFine Installer 错误:给出解决方案
    将推迟到独立 PR 中

架构说明:

  • net.burningtnt.hmat.Analyzer: 一个分析器,只对应一种可能的问题。
    analyze(T, java.util.List<net.burningtnt.hmat.AnalyzeResult<T>>):返回分析结果的状态。

    • BREAK_OTHER:解决方案将大幅改变整个日志,将覆盖其他分析器
    • CONTINUE:一般问题
  • Solver: 包括当前的问题 ID,分析器和自动解决方案

    • configure, SolverConfigurator:管理用户 UI 界面,用于分离逻辑层和 UI 层

      • 手动操作:setDescriptionsetImageputButton 分别用于展示文本、图片说明和选择按钮
      • 自动操作:bindTask 注册一个 Task

      需要注意的是,同一个 Solver 必须只能使用手动操作或自动操作。混合调用会导致报错。
      如果需要在 Solver 间切换,可调用 transferTo。可传入一个新的 Solver,或转入 null 表明该步骤已完成。

    • callbackSelection:用户操作回调。selectionID 可能是 BTN_NEXT,或 putButton 的返回值

@burningtnt

This comment was marked as outdated.

@zkitefly
Copy link
Member

QQ2024518-161548.mp4

或许可以参考这个 UI?

@burningtnt
Copy link
Member Author

框架已搭建完毕

@burningtnt
Copy link
Member Author

burningtnt commented May 20, 2024

git log feature/log-analyzer...glavo/java-manager --pretty=tformat: --numstat | perl -ane' $i += $F[0]; $d += $F[1]; $s = $i + $d; END{ print "added: $i removed: $d sum: $s\n"}'

@burningtnt burningtnt mentioned this pull request May 22, 2024
@burningtnt burningtnt marked this pull request as ready for review June 15, 2024 13:44
@burningtnt burningtnt requested a review from Glavo June 15, 2024 13:44
Copy link
Contributor

@3gf8jv4dv 3gf8jv4dv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not tested it in detail yet, but I just took a quick look at the Files changed section and said one thing.

This PR adds 4 pictures and displays them when needed. Everything else is good, but there is only simplified Chinese.

If the user uses traditional Chinese, it does not matter; but if the user does not understand Chinese, it may be confusing.

Consider showing screenshots of Windows windows in the appropriate language based on the user’s language? I personally think at least English screenshots are needed as a fallback.

If pictures are needed I can assist.

@burningtnt
Copy link
Member Author

I have not tested it in detail yet, but I just took a quick look at the Files changed section and said one thing.

This PR adds 4 pictures and displays them when needed. Everything else is good, but there is only simplified Chinese.

If the user uses traditional Chinese, it does not matter; but if the user does not understand Chinese, it may be confusing.

Consider showing screenshots of Windows windows in the appropriate language based on the user’s language? I personally think at least English screenshots are needed as a fallback.

If pictures are needed I can assist.

Yes, I partly agree with you. Providing images for different languages is essential. We are considering putting these files in a zip and publishing this zip on a Maven. Give us some time.

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.

4 participants