Permalink
Browse files

Allow add-ons to supply version compatibility information in manifest…

…s, and use this information to disable incompatible add-ons (PR #8006)

Closes #6275

* Allow setting minimum required NVDA version and last tested NVDA version in an add-on manifest, and use them to block add-ons from loading if desired.
* Move the version info retrieval code from appModuleHandler to fileUtils
* moved addonHandler into a package
* Fix scaling issues in the addon gui
* GUI additions:
   * Show unknown compatibility addons dialog on startup if there are addons already installed that are untested.
   * When attempting to install an incompatible / untested addon, a prompt is shown to block / confirm the installation.
   * When attempting to install a new version of NVDA with untested addons present, the user is warned that these addons will be disabled after installation. The untested addons can be listed, and any that should not be disabled can be flagged.
* During install of NVDA the user must check a box to confirm that they understand that their nvda installation contains addons that may not have been tested and will be disabled after the installation of NVDA.
* Addon manager GUI changes:
  * Buttons that relate to the currently selected add-on are arranged vertically to the right of the add-on list
  * Buttons that relate to the addon manager more generally are arranged horizontally at the bottom of the dialog.
* Fixed a bug in AutoWidthColumnCheckListCtrl which was stopping NVDA from being able to exit
* Update userguide and developerGuide
* Update changes file for #8006
  • Loading branch information...
leonardder authored and feerrenrut committed Dec 6, 2018
1 parent 7411874 commit a25455119699a45b0adc911130d0f7ae4164d42a
@@ -649,20 +649,27 @@ Generally, it has to be explicitly enabled even in archivers that do support it.
++ Manifest Files ++
Each add-on package must contain a manifest file named manifest.ini.
This must be a UTF-8 encoded text file.
This manifest file contains key = value pares declaring info such as the add-on's name, version and description.
This manifest file contains key = value pairs declaring info such as the add-on's name, version and description.
+++ Available Fields +++
Although it is highly suggested that manifests contain all fields, the fields marked as mandatory must be included.
Otherwise, the add-on will not install.
Otherwise, the add-on will not install.
- name: A short unique name for the add-on. This is used to differentiate add-ons internally and is not shown to the user. (Mandatory)
- summary: The name of the add-on as shown to the user. (Mandatory)
- version: The version of this add-on; e.g. 2.0. (Mandatory)
- author: The author of this add-on, preferably in the form Full Name <email address>; e.g. Michael Curran <mick@kulgan.net>. (Mandatory)
- description: A sentence or two describing what the add-on does.
- url: A URL where this add-on, further info and upgrades can be found.
- docFileName: The name of the main documentation file for this add-on; e.g. readme.html. See the [Add-on Documentation #AddonDoc] section for more details.
- minimumNVDAVersion: The minimum required version of NVDA for this add-on to be installed or enabled. (Mandatory)
- lastTestedNVDAVersion: The last version of NVDA this add-on has been tested with. (Mandatory)
-
The lastTestedNVDAVersion field in particular is used to ensure that users can be confident about installing an add-on.
It allows the add-on author to make an assurance that the add-on will not cause instability, or break the users system.
When this is not provided, or is less than the current version of NVDA (ignoring minor point updates EG 2018.3.1) then the user will be warned not to install the add-on.
+++ An Example Manifest File +++
```
--- start ---
@@ -672,6 +679,8 @@ version = 1.0
description = An example add-on showing how to create add-ons!
author = Michael Curran <mick@kulgan.net>
url = http://www.nvda-project.org/wiki/Development
minimumNVDAVersion = 2017.4
lastTestedNVDAVersion = 2018.3
--- end ---
```
@@ -18,6 +18,7 @@ VIAddVersionKey "ProductName" "NVDA"
VIAddVersionKey "LegalCopyright" "${COPYRIGHT}"
VIAddVersionKey "FileDescription" "NVDA launcher file"
VIAddVersionKey "ProductVersion" "${VERSION}"
VIAddVersionKey "FileVersion" "${VERSION_YEAR}.${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_BUILD}"
OutFile "${LAUNCHEREXE}"
@@ -391,6 +391,9 @@ def nvdaControllerInternal_vbufChangeNotify(rootDocHandle, rootID):
@WINFUNCTYPE(c_long, c_wchar_p)
def nvdaControllerInternal_installAddonPackageFromPath(addonPath):
if globalVars.appArgs.launcher:
log.debugWarning("Unable to install addon into launcher.")
return
import wx
from gui import addonGui
log.debug("Requesting installation of add-on from %s", addonPath)
Oops, something went wrong.

0 comments on commit a254551

Please sign in to comment.