Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0b18089
Update to Python 3.11
seanbudd Sep 28, 2023
d69c98f
update changes
seanbudd Sep 28, 2023
ce59979
fix py2exe
seanbudd Sep 28, 2023
465ed71
fix compile
seanbudd Sep 28, 2023
5bd87a6
update linker subsystem
seanbudd Sep 28, 2023
573a09f
fixup isSupportedOS
seanbudd Oct 2, 2023
0acdbe9
drop nose as dependency
seanbudd Oct 3, 2023
cf5f960
fix server 2012 r2 ref
seanbudd Oct 3, 2023
c6fcafa
use xmlrunner for xml unit test output
seanbudd Oct 3, 2023
5e99bc6
fix unit test report name
seanbudd Oct 3, 2023
6145669
fix abstract method unit test regex changes
seanbudd Oct 3, 2023
0b1a9b7
fix lint
seanbudd Oct 3, 2023
35af804
remove unused keyword
seanbudd Oct 3, 2023
0d6970b
upgrade optimization level to 2
seanbudd Oct 3, 2023
d9aa2cd
fix uiaccess parsing
seanbudd Oct 3, 2023
4c2ac86
use round not int
seanbudd Oct 3, 2023
ef044ae
fixup configobj changes ref
seanbudd Oct 3, 2023
7e4bf82
Merge remote-tracking branch 'origin/master' into py311-min
seanbudd Oct 3, 2023
f3c3d14
fix up changes syntax
seanbudd Oct 4, 2023
f619ccc
fix up changes syntax
seanbudd Oct 4, 2023
c2e9fff
update manifest template to drop win7/8 support
seanbudd Oct 4, 2023
e4bc2f6
remove eoaProxy
seanbudd Oct 5, 2023
55d6ca5
lower optimization level to 0
seanbudd Oct 5, 2023
563048c
update changes
seanbudd Oct 5, 2023
0d7dd06
fix lint
seanbudd Oct 5, 2023
0cb887b
fix typing
seanbudd Oct 9, 2023
a5315ba
Merge remote-tracking branch 'origin/master' into py311-min
seanbudd Oct 9, 2023
b8124fb
update py2exe
seanbudd Oct 9, 2023
2385662
disable BRL api
seanbudd Oct 9, 2023
e4824be
fixup uiaccess for nvda_dmp
seanbudd Oct 9, 2023
d025aaf
fix up CLI for setup py2exe
seanbudd Oct 9, 2023
afa0d92
Add @codeofdusk attributions for Python 3.11 upgrade (#15609)
codeofdusk Oct 12, 2023
5cf56cd
Merge branch 'master' into py311-min
seanbudd Oct 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ init:
"INIT, $(Get-Date -Format 'o')"| Out-File ../timing.csv -Append

environment:
PY_PYTHON: 3.7-32
PY_PYTHON: 3.11-32
secure_authenticode_pass:
secure: Way+hJyhbiLG/cmCo4+dHHzS5DiSvk/45o6frnIQ27GBX6nVDsh7jwQ7fSnqxBRP
secure_ssh_pass:
Expand Down
2 changes: 1 addition & 1 deletion appveyor/scripts/tests/unitTests.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
$outDir = (Resolve-Path .\testOutput\unit\)
$unitTestsXml = "$outDir\unitTests.xml"
.\rununittests.bat --with-xunit --xunit-file="$unitTestsXml"
.\rununittests.bat --output-file "$unitTestsXml"
if($LastExitCode -ne 0) {
Set-AppveyorBuildVariable "testFailExitCode" $LastExitCode
Add-AppveyorMessage "FAIL: Unit tests. See test results for more information."
Expand Down
4 changes: 1 addition & 3 deletions appx/sconscript
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ else: # not for submission, just side-loadable
signExec=env['signExec'] if env['certFile'] else None

# Files from NVDA's distribution that cannot be included in the appx due to policy or security restrictions
excludedDistFiles=[
'nvda_eoaProxy.exe',
excludedDistFiles = [
'nvda_service.exe',
'nvda_slave.exe',
'nvda_noUIAccess.exe',
Expand Down Expand Up @@ -107,4 +106,3 @@ if signExec and not isStoreSubmission:
env.AddPostAction(appx,signExec)

Return(['appx'])

27 changes: 9 additions & 18 deletions nvdaHelper/archBuild_sconscript
Original file line number Diff line number Diff line change
@@ -1,16 +1,7 @@
###
#This file is a part of the NVDA project.
#URL: http://www.nvda-project.org/
#Copyright 2006-2010 NVDA contributers.
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License version 2.0, as published by
#the Free Software Foundation.
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of
#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#This license can be found at:
#http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
###
# A part of NonVisual Desktop Access (NVDA)
# Copyright (C) 2006-2023 NV Access Limited
# This file may be used under the terms of the GNU General Public License, version 2 or later.
# For more details see: https://www.gnu.org/licenses/gpl-2.0.html

import os
import shutil
Expand Down Expand Up @@ -87,7 +78,7 @@ env.Append(
'UNICODE',
'_CRT_SECURE_NO_DEPRECATE',
('LOGLEVEL', '${nvdaHelperLogLevel}'),
('_WIN32_WINNT', '_WIN32_WINNT_WIN7'),
('_WIN32_WINNT', '_WIN32_WINNT_WINBLUE'),
# NOMINMAX: prevent minwindef.h min/max macro definition, which unexpectedly override developer
# expectations
'NOMINMAX',
Expand All @@ -102,10 +93,10 @@ env.Append(CPPPATH=[
'#/miscDeps/include',
Dir('.').abspath
])
if TARGET_ARCH == "arm64":
subsystem = "/subsystem:windows,6.02"
else:
subsystem = "/subsystem:windows,6.01"

# Windows 8.1 (blue)
subsystem = "/subsystem:windows,6.03"

env.Append(
LINKFLAGS=[
'/incremental:no',
Expand Down
29 changes: 4 additions & 25 deletions nvdaHelper/local/nvdaHelperLocal.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
/*
This file is a part of the NVDA project.
URL: http://www.nvda-project.org/
Copyright 2008-2014 NV Access Limited.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2.0, as published by
the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This license can be found at:
http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
A part of NonVisual Desktop Access (NVDA)
Copyright (C) 2008-2023 NV Access Limited
This file may be used under the terms of the GNU General Public License, version 2 or later.
For more details see: https://www.gnu.org/licenses/gpl-2.0.html
*/

#include <cstdio>
Expand All @@ -28,20 +21,6 @@ decltype(&SendMessageW) real_SendMessageW = nullptr;
decltype(&SendMessageTimeoutW) real_SendMessageTimeoutW = nullptr;
decltype(&OpenClipboard) real_OpenClipboard = nullptr;

typedef struct _RPC_SECURITY_QOS_V5_W {
unsigned long Version;
unsigned long Capabilities;
unsigned long IdentityTracking;
unsigned long ImpersonationType;
unsigned long AdditionalSecurityInfoType;
union
{
RPC_HTTP_TRANSPORT_CREDENTIALS_W *HttpCredentials;
} u;
void *Sid;
unsigned int EffectiveOnly;
void *ServerSecurityDescriptor;
} RPC_SECURITY_QOS_V5_W, *PRPC_SECURITY_QOS_V5_W;

handle_t createRemoteBindingHandle(wchar_t* uuidString) {
RPC_STATUS rpcStatus;
Expand Down
4 changes: 2 additions & 2 deletions nvdaHelper/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ You should still build on the command line to verify errors.
- Press next
- Specify Debug Configuration Settings
- Build command line: `scons source`
- Preprocessor definitions (/D): `WIN32;_WINDOWS;_USRDLL;NVDAHELPER_EXPORTS;UNICODE;_CRT_SECURE_NO_DEPRECATE;LOGLEVEL=15;_WIN32_WINNT=_WIN32_WINNT_WIN7;NOMINMAX`
- Preprocessor definitions (/D): `WIN32;_WINDOWS;_USRDLL;NVDAHELPER_EXPORTS;UNICODE;_CRT_SECURE_NO_DEPRECATE;LOGLEVEL=15;_WIN32_WINNT=_WIN32_WINNT_WINBLUE;NOMINMAX`
Comment thread
seanbudd marked this conversation as resolved.
- Include search paths (/I): `../include;../miscDeps/include;./;../build\x86_64;../include/minhook/include`
- Forced Included files (/FI): `winuser.h`
- Press next
Expand All @@ -90,7 +90,7 @@ You should still build on the command line to verify errors.
```
cl /Fobuild\x86\vbufBackends\gecko_ia2\gecko_ia2.obj /c build\x86\vbufBackends\gecko_ia2\gecko_ia2.cpp
/TP /EHsc /nologo /std:c++20 /permissive- /Od /MT /W3 /WX
/DUNICODE /D_CRT_SECURE_NO_DEPRECATE /DLOGLEVEL=15 /D_WIN32_WINNT=_WIN32_WINNT_WIN7 /DNOMINMAX /DNDEBUG
/DUNICODE /D_CRT_SECURE_NO_DEPRECATE /DLOGLEVEL=15 /D_WIN32_WINNT=_WIN32_WINNT_WINBLUE /DNOMINMAX /DNDEBUG
/Iinclude /Imiscdeps\include /Ibuild\x86
/Z7
```
Expand Down
2 changes: 1 addition & 1 deletion projectDocs/dev/createDevEnvironment.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The NVDA source depends on several other packages to run correctly.
### Installed Dependencies
The following dependencies need to be installed on your system:

* [Python](https://www.python.org/), version 3.7, 32 bit
* [Python](https://www.python.org/), version 3.11, 32 bit
* Use latest minor version if possible.
* Microsoft Visual Studio 2019 or 2022:
* To replicate the production build environment, use the [version of Visual Studio 2019 that AppVeyor is using](https://www.appveyor.com/docs/windows-images-software/#visual-studio-2019).
Expand Down
33 changes: 13 additions & 20 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,30 @@ SCons==4.5.2
# NVDA's runtime dependencies
comtypes==1.2.0
pyserial==3.5
wxPython==4.1.1
git+https://github.com/DiffSK/configobj@3e2f4cc#egg=configobj
wxPython==4.2.1
git+https://github.com/DiffSK/configobj@e2ba4457c4651fa54f8d59d8dcdd3da950e956b8#egg=configobj
requests==2.31.0
# Required to use a pinned old version for requests.
# py2exe fails to compile properly without this.
# This can be removed when upgrading py2exe to 0.13+ and python to 3.8+.
# https://github.com/Ousret/charset_normalizer/issues/253
charset-normalizer==2.1.1
# Pillow is an implicit dependency and requires zlib and jpeg by default, but we don't need it
Pillow==10.0.1 -C "zlib=disable" -C "jpeg=disable"

#NVDA_DMP requires diff-match-patch
fast_diff_match_patch==2.0.1

# Packaging NVDA
py2exe==0.11.1.0
git+https://github.com/py2exe/py2exe@4e7b2b2c60face592e67cb1bc935172a20fa371d#egg=py2exe

# For building developer documentation
sphinx==5.1.1
sphinx_rtd_theme==1.0.0
# Creating XML unit test reports
unittest-xml-reporting==3.2.0

# Requirements for type checking.
# typing_extensions is incorporated in py3.8+, also available via mypy
typing_extensions==4.3.0
Comment thread
seanbudd marked this conversation as resolved.
# For building developer documentation
sphinx==7.2.6
sphinx_rtd_theme==1.3.0

# Requirements for automated linting
flake8 ~= 3.7.7
flake8-tabs == 2.1.0

# Requirements for unit tests
nose==1.3.7

# Requirements for system tests
robotframework==3.2.2
robotremoteserver==1.1
robotframework-screencaplibrary==1.5.0
robotframework==6.1.1
robotremoteserver==1.1.1
robotframework-screencaplibrary==1.6.0
4 changes: 3 additions & 1 deletion rununittests.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ set here=%hereOrig%
if #%hereOrig:~-1%# == #\# set here=%hereOrig:~0,-1%
set scriptsDir=%here%\venvUtils
set unitTestsPath=%here%\tests\unit
set testOutput=%here%\testOutput\unit
md %testOutput%

call "%scriptsDir%\venvCmd.bat" py -m nose -sv --traverse-namespace -w "%unitTestsPath%" %*
call "%scriptsDir%\venvCmd.bat" py -m xmlrunner discover -v -s "%unitTestsPath%" -t "%here%" --output-file "%testOutput%\unitTests.xml" %*
14 changes: 5 additions & 9 deletions sconstruct
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ if nvdaVenv != virtualEnv:
print("Warning: SCons launched within a custom Python virtual environment.")

# Variables for storing required version of Python, and the version which is used to run this script.
requiredPythonMajor ="3"
requiredPythonMinor = "7"
requiredPythonMajor = "3"
requiredPythonMinor = "11"
requiredPythonArchitecture = "32bit"
installedPythonMajor = str(sys.version_info.major)
installedPythonMinor = str(sys.version_info.minor)
Expand Down Expand Up @@ -308,16 +308,12 @@ def NVDADistGenerator(target, source, env, for_signature):
# which scons treats as an error code.
and None]

buildCmd = ["cd", source[0].path, "&&",
sys.executable]
buildCmd = ["cd", source[0].path, "&&", sys.executable]
if release:
buildCmd.append("-O")
# Issue errors about str(bytes_instance), str(bytearray_instance)
buildCmd.append("-bb")
buildCmd.extend(("setup.py", "-vv", "build", "--build-base", buildDir.abspath,
"py2exe", "--dist-dir", target[0].abspath))
if release:
Comment thread
seanbudd marked this conversation as resolved.
buildCmd.append("-O1")
buildCmd.append("setup.py")
if env.get("uiAccess"):
buildCmd.append("--enable-uiAccess")

Expand Down Expand Up @@ -346,7 +342,7 @@ def NVDADistGenerator(target, source, env, for_signature):
action.append(Copy(target[0], file.path))

if certFile:
for prog in "nvda_noUIAccess.exe", "nvda_uiAccess.exe", "nvda_slave.exe", "nvda_eoaProxy.exe":
for prog in "nvda_noUIAccess.exe", "nvda_uiAccess.exe", "nvda_slave.exe":
action.append(lambda target,source,env, progByVal=prog: signExec([target[0].File(progByVal)],source,env))

action.extend((
Expand Down
2 changes: 0 additions & 2 deletions source/UIAHandler/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

from typing import (
List,
)
from typing_extensions import (
Protocol,
)

Expand Down
4 changes: 1 addition & 3 deletions source/_addonStore/models/addon.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@
Generator,
List,
Optional,
Union,
)
from typing_extensions import (
Protocol,
Union,
)

from requests.structures import CaseInsensitiveDict
Expand Down
4 changes: 1 addition & 3 deletions source/_addonStore/models/status.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,10 @@
Dict,
Optional,
OrderedDict,
Protocol,
Set,
TYPE_CHECKING,
)
from typing_extensions import (
Protocol,
)

import globalVars
from logHandler import log
Expand Down
2 changes: 1 addition & 1 deletion source/_addonStore/models/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from typing import (
NamedTuple,
Optional,
Protocol,
)
from typing_extensions import Protocol # Python 3.8 adds native support
import addonAPIVersion


Expand Down
2 changes: 1 addition & 1 deletion source/config/aggregatedSection.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

from typing import (
Dict,
Protocol,
Union,
)
from typing_extensions import Protocol


class _SupportsStrT(Protocol):
Expand Down
5 changes: 1 addition & 4 deletions source/config/featureFlagEnums.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,13 @@
"""
import enum
import typing
from typing import Protocol

from utils.displayString import (
DisplayStringEnum,
_DisplayStringEnumMixin,
)

from typing_extensions import (
Protocol, # Python 3.8 adds native support
)


class FeatureFlagEnumProtocol(Protocol):
""" All feature flags are expected to have a "DEFAULT" value.
Expand Down
2 changes: 1 addition & 1 deletion source/globalVars.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
from typing import (
TYPE_CHECKING,
List,
Literal,
Optional,
)
from typing_extensions import Literal

if TYPE_CHECKING:
import documentBase # noqa: F401 used for type checking only
Expand Down
64 changes: 42 additions & 22 deletions source/installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,25 +698,45 @@ def registerEaseOfAccess(installDir):
versionInfo.name)
winreg.SetValueEx(appKey, "Description", None, winreg.REG_SZ,
versionInfo.longName)
if easeOfAccess.canConfigTerminateOnDesktopSwitch:
winreg.SetValueEx(appKey, "Profile", None, winreg.REG_SZ,
'<HCIModel><Accommodation type="severe vision"/></HCIModel>')
winreg.SetValueEx(appKey, "SimpleProfile", None, winreg.REG_SZ,
"screenreader")
winreg.SetValueEx(appKey, "ATExe", None, winreg.REG_SZ,
"nvda.exe")
winreg.SetValueEx(appKey, "StartExe", None, winreg.REG_SZ,
os.path.join(installDir, u"nvda.exe"))
winreg.SetValueEx(appKey, "StartParams", None, winreg.REG_SZ,
"--ease-of-access")
winreg.SetValueEx(appKey, "TerminateOnDesktopSwitch", None,
winreg.REG_DWORD, 0)
else:
# We don't want NVDA to appear in EoA because
# starting NVDA from there won't work in this case.
# We can do this by not setting Profile and SimpleProfile.
# NVDA can still change the EoA logon settings.
winreg.SetValueEx(appKey, "ATExe", None, winreg.REG_SZ,
"nvda_eoaProxy.exe")
winreg.SetValueEx(appKey, "StartExe", None, winreg.REG_SZ,
os.path.join(installDir, u"nvda_eoaProxy.exe"))
winreg.SetValueEx(
appKey,
"Profile",
None,
winreg.REG_SZ,
'<HCIModel><Accommodation type="severe vision"/></HCIModel>'
)
winreg.SetValueEx(
appKey,
"SimpleProfile",
None,
winreg.REG_SZ,
"screenreader"
)
winreg.SetValueEx(
appKey,
"ATExe",
None,
winreg.REG_SZ,
"nvda.exe"
)
winreg.SetValueEx(
appKey,
"StartExe",
None,
winreg.REG_SZ,
os.path.join(installDir, "nvda.exe")
)
winreg.SetValueEx(
appKey,
"StartParams",
None,
winreg.REG_SZ,
"--ease-of-access"
)
winreg.SetValueEx(
appKey,
"TerminateOnDesktopSwitch",
None,
winreg.REG_DWORD,
0
)
Loading