feat:支持从外部整合包压缩文件导入至启动器,额外添加对7z的支持(虽然几乎没有)#1373
Merged
ShirosakiMio merged 11 commits intoFCL-Team:mainfrom Feb 6, 2026
Merged
Conversation
添加 android-ndk-r26d/ 目录和 .trae 文件到忽略列表,避免将 NDK 工具链和 IDE 临时文件提交到版本库。
- 在 AndroidManifest.xml 中添加对 .7z 文件类型的 intent 过滤器 - 在 SplashActivity 和 MainActivity 中处理外部文件 Intent,将文件缓存并跳转到本地整合包安装页面 - 扩展 ModpackHelper.isFileModpackByExtension 以识别 .7z 文件 - 在 ManuallyCreatedModpackInstallTask 中增加对 .7z 文件的解压处理 - 在 CompressingUtils 中添加通用的 extract 方法及对 .7z 格式的解压支持 - 将 DownloadUI.container 字段改为 public 以便在其他页面访问
使用可空调用避免潜在的空指针异常,提高代码健壮性。
- 在 SplashActivity 添加专用标签以区分导入流程 - 新增用于提示检测到外部整合包的字符串资源 - 修改 DownloadUI 以支持在页面管理器就绪后执行回调 - 在 MainActivity 中实现外部整合包文件检测,检测到后显示提示并跳转至本地整合包页面
移除 SplashActivity 中多余的 app_name_import 标签,改为使用 activity-alias 单独声明导入入口,确保启动器图标显示主应用名称,而文件关联入口显示导入专用名称。
Collaborator
|
通过外部应用打开fcl安装整合包后启动再退出游戏还会重复触发安装( |
- 移除旧的外部文件意图处理方法 handleExternalFileIntent - 添加新的模组包处理方法 handleModpack - 更新启动活动中的意图处理流程 - 简化新意图处理逻辑,移除 onNewIntent 方法重写 - 更新缓存目录使用 cacheDir 替代 externalCacheDir - 添加对 AndroidUtils 的依赖导入 - 优化模组包检测和显示流程
在接收到外部文件路径意图后,立即移除其 extra 数据,避免因 Activity 生命周期导致的重复处理问题。
保存modpackHandled状态到savedInstanceState,防止Activity重建时重复处理modpack。同时重写onNewIntent方法确保新Intent能正确触发处理。
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.
No description provided.