解压 AddonTemplate-master.zip
可以看看readme.me的内容,
将 site_scons 文件夹和以下文件复制到HelloWorld文件夹中: buildVars.py , manifest.ini.tpl , manifest-translated.ini.tpl , sconstruct ,.gitignore 和.gitattributes
style.css.也 就是除了,COPYING.txt,readme.md外,,
可以直接把解压 出来的AddonTemplate-文件夹重命名为HelloWorld,再把不要的文件删除,
在HelloWorld文件夹中创建addon 文件夹。在 addon 文件夹中为附加模块创建所需的文件夹globalPlugins文件夹,
在HelloWord文件夹里的 buildVars.py 文件中,修改插件信息(名称,摘要,描述,版本,作者和url)** addon_info **变量。,.py文件可以用记事本或者notepad++打开
省略内容……
addon_info = {
# for previously unpublished addons, please follow the community guidelines at:
# https://bitbucket.org/nvdaaddont ... ster/guidelines.txt
# add-on Name, internal for nvda
"addon_name" : "HelloWorld",
# Add-on summary, usually the user visible name of the addon.
# Translators: Summary for this add-on to be shown on installation and add-on information.
"addon_summary" : _("HelloWorld"),
# Add-on description
# Translators: Long description to be shown for this add-on on add-on information from add-ons manager
"addon_description" : _("""say Hello to the world.
this is my first addon"""),
# version
"addon_version" : "1.0",
# Author(s)
"addon_author" : u"ZhangSan <XXX@YYY.com>",
# URL for the add-on documentation support
"addon_url" : "www......",
# Documentation file name
"addon_docFileName" : "readme.html",
# Minimum NVDA version supported (e.g. "2018.3.0", minor version is optional)
"addon_minimumNVDAVersion" : "2019.3",
# Last NVDA version supported/tested (e.g. "2018.4.0", ideally more recent than minimum version)
"addon_lastTestedNVDAVersion" : "2019.3",
# Add-on update channel (default is None, denoting stable releases, and for development releases, use "dev"; do not change unless you know what you are doing)
"addon_updateChannel" : None,
}
省略内容……
安装 插件
打开HelloWorld-1.0.nvda-addon,
点击 :关于插件(A)...按钮Alt+a,可以看到插件的信息,
插件信息对话框HelloWorld (HelloWorld)
版本: 1.0
作者: ZhangSan <XXX@YYY.com>
描述: say Hello to the world.
this is my first addon
#. Add-on description
#. Translators: Long description to be shown for this add-on on add-on information from add-ons manager
#: buildVars.py:20
msgid ""
"say Hello to the world.\n"
"this is my first addon"
msgstr ""
"和世界打个招呼,\n"
"这是我的第一个插件。"