NVDA Add-on Scons Template

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

Copyright (C) 2012-2022 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

Features

This template provides the following features you can use during NVDA add-on development and packaging:

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):

Requirements

You need the following software to use this code for your NVDA add-on development and packaging:

Usage

To create a new NVDA add-on using this template:

  1. Create an empty folder to hold the files for your add-on.
  2. Copy the site_scons folder, and the following files, into your new empty folder: buildVars.py, manifest.ini.tpl, manifest-translated.ini.tpl, sconstruct, .gitignore, and .gitattributes
  3. Create an addon folder inside your new folder. Inside the *addon folder, create needed folders for the add-on modules (e.g. appModules, synthDrivers, etc.). An add-on may have one or more module folders.
  4. In the buildVars.py file, change variable addon_info with your add-on's information (name, summary, description, version, author and url).
  5. Put your code in the usual folders for NVDA extension, under the addon folder. For instance: globalPlugins, synthDrivers, etc.
  6. Gettext translations must be placed into addon\locale\/LC_MESSAGES\nvda.po.

Add-on manifest specification

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):

To manage documentation files for your addon:

  1. Copy the 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.
  2. Documentation files (named readme.md) must be placed into addon\doc\/.

To package the add-on for distribution:

  1. Open a command line, change to the folder that has the 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.
  2. You can further customize variables in the buildVars.py file.
  3. You can also customize version and update channel information from command line by passing the following switches when running scons:

Additional tools

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.