Skip to content

Commit 0d4a412

Browse files
Luke DavisLuke Davis
authored andcommitted
Use the API to collect Windows and NVDA versions automatically.
1 parent dbad27e commit 0d4a412

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

addon/globalPlugins/versionCollector/__init__.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
from dataclasses import dataclass, field
1010
from typing import Callable, Optional, List, Dict, Any
1111

12-
import globalPluginHandler
1312
import addonHandler
13+
import globalPluginHandler
14+
import buildVersion
15+
import winVersion
1416
import api
1517
import ui
1618
from logHandler import log
@@ -118,10 +120,19 @@ def __init__(self, *args, **kwargs):
118120
self.currentApp: Optional[_AppData] = None
119121
# Run our handler whenever the application changes
120122
post_appSwitch.register(self.onAppSwitch)
121-
# Seed the pond
122-
postNvdaStartup.register(self.collectInitialApp)
123123
# Become aware of all NVDA add-ons
124124
postNvdaStartup.register(self.retrieveInstalledAddons)
125+
# Seed the pond by adding Windows version, NVDA version, and current app.
126+
self.addToCacheOrUpdateDate(_AppData(
127+
name="Microsoft Windows",
128+
version=winVersion.getWinVer(),
129+
))
130+
self.addToCacheOrUpdateDate(_AppData(
131+
name="NVDA",
132+
version=buildVersion.version,
133+
is64bit=False
134+
))
135+
postNvdaStartup.register(self.collectInitialApp)
125136

126137
def terminate(self) -> None:
127138
# Unregister the extensionPoints

buildVars.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ def _(arg):
2626
"addon_description": _("""Keeps a record of all software names and versions used while running NVDA.
2727
Provides a list that can be copied/exported for diagnostics and support."""),
2828
# version
29-
"addon_version": "23.00.058",
29+
"addon_version": "23.00.059",
3030
# Author(s)
3131
"addon_author": "Luke Davis <XLTechie@newanswertech.com>",
3232
# URL for the add-on documentation support

0 commit comments

Comments
 (0)