mirror of
https://github.com/onyx-and-iris/nvda-voicemeeter.git
synced 2025-02-22 21:05:07 +00:00
update dll name to support latest version.
See https://github.com/nvaccess/nvda/tree/master/extras/controllerClient
This commit is contained in:
parent
f48983d08a
commit
b5ea41c604
@ -7,40 +7,40 @@ from .errors import NVDAVMError
|
|||||||
|
|
||||||
BITS = 64 if ct.sizeof(ct.c_void_p) == 8 else 32
|
BITS = 64 if ct.sizeof(ct.c_void_p) == 8 else 32
|
||||||
|
|
||||||
if platform.system() != "Windows":
|
if platform.system() != 'Windows':
|
||||||
raise NVDAVMError("Only Windows OS supported")
|
raise NVDAVMError('Only Windows OS supported')
|
||||||
|
|
||||||
REG_KEY = "\\".join(
|
REG_KEY = '\\'.join(
|
||||||
filter(
|
filter(
|
||||||
None,
|
None,
|
||||||
(
|
(
|
||||||
"SOFTWARE",
|
'SOFTWARE',
|
||||||
"WOW6432Node" if BITS == 64 else "",
|
'WOW6432Node' if BITS == 64 else '',
|
||||||
"Microsoft",
|
'Microsoft',
|
||||||
"Windows",
|
'Windows',
|
||||||
"CurrentVersion",
|
'CurrentVersion',
|
||||||
"Uninstall",
|
'Uninstall',
|
||||||
"NVDA",
|
'NVDA',
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_nvdapath():
|
def get_nvdapath():
|
||||||
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r"{}".format(REG_KEY)) as nvda_key:
|
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, r'{}'.format(REG_KEY)) as nvda_key:
|
||||||
return winreg.QueryValueEx(nvda_key, r"UninstallDirectory")[0]
|
return winreg.QueryValueEx(nvda_key, r'UninstallDirectory')[0]
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
NVDA_PATH = Path(get_nvdapath()) / "nvda.exe"
|
NVDA_PATH = Path(get_nvdapath()) / 'nvda.exe'
|
||||||
except FileNotFoundError:
|
except FileNotFoundError:
|
||||||
NVDA_PATH = ""
|
NVDA_PATH = ''
|
||||||
|
|
||||||
|
|
||||||
controller_path = Path(__file__).parents[2].resolve() / "controllerClient"
|
controller_path = Path(__file__).parents[2].resolve() / 'controllerClient'
|
||||||
if not controller_path.exists():
|
if not controller_path.exists():
|
||||||
controller_path = Path("_internal") / "controllerClient"
|
controller_path = Path('_internal') / 'controllerClient'
|
||||||
|
|
||||||
DLL_PATH = controller_path / f"x{64 if BITS == 64 else 86}" / f"nvdaControllerClient{BITS}.dll"
|
DLL_PATH = controller_path / f'x{64 if BITS == 64 else 86}' / 'nvdaControllerClient.dll'
|
||||||
|
|
||||||
libc = ct.CDLL(str(DLL_PATH))
|
libc = ct.CDLL(str(DLL_PATH))
|
||||||
|
Loading…
Reference in New Issue
Block a user