This package contains a basic template structure for NVDA add-on development, building, distribution and localization. For details about NVDA add-on development, please see the NVDA Add-on Development Guide. The NVDA add-on development/discussion list is here Information specific to NV Access add-on store can be found here.
Copyright (C) 2012-2024 NVDA Add-on team contributors.
This package is distributed under the terms of the GNU General Public License, version 2 or later. Please see the file COPYING.txt for further details.
alekssamos added automatic package of add-ons through Github Actions.
For details about Github Actions please see the Workflow syntax for GitHub Actions.
Copyright (C) 2022 alekssamos
This template provides the following features you can use during NVDA add-on development and packaging:
.github/workflows/build_addon.yml).git tag v1.0 && git push --tag), then a release will be automatically created and the add-on file will be uploaded as an asset.scons pot. An addon-name.pot file will be created with all gettext messages for your add-on. You need to check the buildVars.i18nSources variable to comply with your requirements.In addition, this template includes configuration files for the following tools for use in add-on development and testing (see "additional tools" section for details):
scons source). preparing the source code is a step in the instructions for building NVDA itself, see The NVDA Repository for details.
* Place the .vscode in this repo within the addon folder, where your add-on source files (will) reside. The settings file within this folder assumes the NVDA repository is within the parent folder of this folder. If your addon folder is within the addonTemplate folder, then your NVDA repository folder needs to also be within the addonTemplate folder, or the source will not be found.
* Open the addon folder in VS Code. This should initialize VS Code with the correct settings and provide you with code completion and other VS Code features.
control+shift+m after saving a file to search for problems.control+shift+p to open the commands palette and search for recommended extensions to install or check if they are installed.You need the following software to use this code for your NVDA add-on development and packaging:
Note, that you may not need these tools in a local build environment, if you are using Appveyor or GitHub Actions, to build and package your add-ons.
site_scons
and the following files, into your new empty folder:
buildVars.py
manifest.ini.tpl
manifest-translated.ini.tpl
sconstruct
.gitignore
.gitattributes
.github
and file:
.pre-commit-config.yaml
addon folder inside your new folder. You will put your code in the usual folders for NVDA extensions, under the addon folder. For instance: globalPlugins, synthDrivers, etc.buildVars.py file, change variable addon_info with your add-on's information (name, summary, description, version, author, url, source url, license, and license URL). Also, be sure to carefully set the paths contained in the other variables in that file. If you need to use custom Markdown extensions, original add-on interface language is not English, or include custom braille translations tables, be sure to fil out markdown list, base language variable, and braille tables dictioanry, respectively.addon\locale\<lang>/LC_MESSAGES\nvda.po.An add-on manifest generated manually or via buildVars.py must include the following information:
In addition, the following information must be filled out (not used in the manifest but used elsewhere such as add-on store) in buildVars:
In addition to the core manifest data, custom add-on information can be specified. As of 2024, the template supports generation of custom braille translation tables. Information on custom braille tables must be specified in buildVars under braileTables dictionary as follows:
brailleTables entry is a filename for the included custom braille table placed in brailleTables folder inside addon folder. This nested dictionary should specify:
Note: you must fill out this dictionary if at least one custom braille table is included in the add-on. If not, leave the dictionary empty.
readme.md file for your add-on to the first created folder, where you copied buildVars.py. You can also copy style.css to improve the presentation of HTML documents.readme.md) must be placed into addon\doc\<lang>/.sconstruct file (usually the root of your add-on development folder) and run the scons command. The created add-on, if there were no errors, is placed in the current directory.buildVars.py file.The template includes configuration files for use with additional tools such as linters. These include:
Read the documentation for the tools you wish to use when building and developing add-ons.
Note that this template only provides a basic add-on structure and build infrastructure. You may need to adapt it for your specific needs such as using additional tools.
If you have any issues please use the NVDA addon list mentioned above.