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

插件管理器实现思路 #94

Closed
R1ckyH opened this issue Feb 19, 2021 · 3 comments
Closed

插件管理器实现思路 #94

R1ckyH opened this issue Feb 19, 2021 · 3 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@R1ckyH
Copy link
Contributor

R1ckyH commented Feb 19, 2021

#89

就目前讨论的方案记录


目前的打算是让作者在插件仓库注册一个LTS版本的plugin_info,json(或yml)
然后插件管理器透过读取plugin_info.json获取插件的大约资讯和连接
以供给用户暂时性观看。

如果需要详细资讯在透过plugin_info.json内的连接前往作者的仓库
再在作者的仓库里面读取作者自己维护的data.json(或yml)
然后从data.json里面的文件决定具体操作流程


插件仓库内的文件结构大概如下

image

  • /plugin_info.json(有可能变成yml)
id: [str]
author: list[str] or [str]
link: [str]
name: [str]
info: {
    en_us: desc[str]
    zh_cn: desc[str]
}
---

作者仓库的文件结构

作者仓库目前还没有大约的共识,故指留下大约的文件结构,内容暂时没有。

  • my_plugin.py: 插件/插件入口
  • readme.md: 自述文件
  • plugin/mcdreforged.plugin .yml/.json: 名称未定,作者需要维护的插件信息
  • my_plugin/: 非必选,插件所需其他文件
  • ...
@alex3236 alex3236 added the enhancement New feature or request label Feb 24, 2021
@AnzhiZhang AnzhiZhang added the good first issue Good for newcomers label Feb 26, 2021
@AnzhiZhang
Copy link
Member

插件管理器自动安装python依赖,需要可配置venv路径

@AnzhiZhang
Copy link
Member

将这个思路进行了整理和细化,#100

@Fallen-Breath
Copy link
Member

已于 MCDR 2.0 实现插件库规范

文档:https://mcdreforged.readthedocs.io/zh_CN/latest/plugin_dev/plugin_catalogue.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

4 participants