Skip to content

[release/3.6] 检测到配置文件由高版本启动器创建时禁止保存配置文件#4449

Merged
Glavo merged 1 commit into
HMCL-dev:releasefrom
Glavo:backport/4414
Sep 10, 2025
Merged

[release/3.6] 检测到配置文件由高版本启动器创建时禁止保存配置文件#4449
Glavo merged 1 commit into
HMCL-dev:releasefrom
Glavo:backport/4414

Conversation

@Glavo
Copy link
Copy Markdown
Member

@Glavo Glavo commented Sep 10, 2025

@Glavo Glavo added the backport label Sep 10, 2025
@Glavo Glavo requested a review from Copilot September 10, 2025 17:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds support for detecting when configuration files are created by a newer version of HMCL and prevents saving configuration changes until the launcher is updated. It introduces a warning message to users when this situation is detected.

  • Adds detection logic for unsupported configuration file versions
  • Prevents configuration file saving when version is incompatible
  • Adds localized warning messages for the version mismatch scenario

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
HMCL/src/main/resources/assets/lang/I18N_zh_CN.properties Adds Chinese simplified error message for unsupported config version
HMCL/src/main/resources/assets/lang/I18N_zh.properties Adds Chinese traditional error message for unsupported config version
HMCL/src/main/resources/assets/lang/I18N.properties Adds English error message for unsupported config version
HMCL/src/main/java/org/jackhuang/hmcl/setting/ConfigUpgrader.java Refactors version checking to use Config.CURRENT_VERSION constant and removes higher version handling
HMCL/src/main/java/org/jackhuang/hmcl/setting/ConfigHolder.java Adds unsupported version detection and prevents config saving when detected
HMCL/src/main/java/org/jackhuang/hmcl/setting/Config.java Adds CURRENT_VERSION constant for centralized version management
HMCL/src/main/java/org/jackhuang/hmcl/Launcher.java Displays warning alert when unsupported config version is detected

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@Glavo Glavo merged commit 0d9a275 into HMCL-dev:release Sep 10, 2025
3 checks passed
@Glavo Glavo deleted the backport/4414 branch September 10, 2025 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants