[release/3.6] 检测到配置文件由高版本启动器创建时禁止保存配置文件#4449
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.
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.
#4414