[Feature] 为复制游戏实例功能添加“复制游戏实例的全部文件”选项
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 10.1k
- Forks
- 934
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 82
Description
概述 | Summary
现在“复制游戏实例”功能不会复制所有文件,比如原理图文件夹或者游戏存档文件夹,又或者日志文件夹。
如果要为复制游戏实例功能添加“复制游戏实例的全部文件”功能,应该将位于游戏实例文件夹中的所有文件,不管是已知的还是未知的,都复制一份,只修改游戏实例名称。
原因 | Reason
添加此功能后,在开启“版本隔离-各实例独立”的情况下,可以更方便地对游戏实例进行完整备份,而无需手动拷贝文件。
详情 | Description
设想中的实现方式是这样的(仅供参考,只是大概阅读了一下代码):
-
在复制游戏实例的重命名界面增加一个选项:“复制游戏实例的全部文件”
- 使用此选项时,应该一同勾选“复制世界”,但仍然可以取消勾选。
-
在启用选项时,此处不再以整合包排除文件作为基础排除列表。
https://github.com/HMCL-dev/HMCL/blob/b0cd184e223df4b520ff82766148f07efa68bfca/HMCL/src/main/java/org/jackhuang/hmcl/game/HMCLGameRepository.java#L157
由于目前复制实例时实际上完全不会复制一些处于整合包文件排除列表中的文件(例如crash-reports、downloads、schematics,还有很多其他的文件夹),这个选项可能造成困惑,可能需要添加某些说明信息。
在所有游戏实例都设置了“版本隔离-各实例独立”的情况下,复制所有文件应该会非常轻松,但如果用户设置了其他版本隔离选项,可能需要告知用户不会复制自定义版本隔离文件夹中的文件。
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with HMCL/src/main/java/org/jackhuang/hmcl/game/HMCLGameRepository.java around line 157 and trace the instance-copy flow into the rename interface. Check how exclusion lists, world copying, and version-isolation settings are handled. Done means the new option copies all files in the instance directory, applies the requested naming, and clearly communicates files excluded by custom isolation settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- desktop
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100