From ce2c144eb5e4286297c37e69f702248aed17f3eb Mon Sep 17 00:00:00 2001 From: Sean Budd Date: Fri, 3 Nov 2023 10:21:00 +1100 Subject: [PATCH 1/5] Use VS 2022 --- .vsconfig | 14 ++++++++ appveyor.yml | 2 +- projectDocs/dev/createDevEnvironment.md | 48 +++++++++++++------------ tests/system/libraries/NotepadLib.py | 8 ++--- user_docs/en/changes.t2t | 2 ++ 5 files changed, 44 insertions(+), 30 deletions(-) create mode 100644 .vsconfig diff --git a/.vsconfig b/.vsconfig new file mode 100644 index 00000000000..1e9cda55a6f --- /dev/null +++ b/.vsconfig @@ -0,0 +1,14 @@ +{ + "version": "1.0", + "components": [ + "Microsoft.VisualStudio.Workload.NativeDesktop", + "Microsoft.VisualStudio.Component.Windows11SDK.22621", + "Microsoft.VisualStudio.Component.VC.Llvm.ClangToolset", + "Microsoft.VisualStudio.Component.VC.Llvm.Clang", + "Microsoft.VisualStudio.Component.VC.Tools.x86.x64", + "Microsoft.VisualStudio.Component.VC.Tools.ARM64EC", + "Microsoft.VisualStudio.Component.VC.Tools.ARM64", + "Microsoft.VisualStudio.Component.VC.ATL", + "Microsoft.VisualStudio.Component.VC.ATL.ARM64" + ] +} diff --git a/appveyor.yml b/appveyor.yml index 47a8ac24506..8cc32ce7adb 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,7 +2,7 @@ # Many more options available, see docs: # https://www.appveyor.com/docs/appveyor-yml/ -os: Visual Studio 2019 +os: Visual Studio 2022 version: "{branch}-{build}" branches: diff --git a/projectDocs/dev/createDevEnvironment.md b/projectDocs/dev/createDevEnvironment.md index affa897758e..56b53a276fa 100644 --- a/projectDocs/dev/createDevEnvironment.md +++ b/projectDocs/dev/createDevEnvironment.md @@ -26,7 +26,7 @@ git pull ``` ## Supported Operating Systems -Although NVDA can run on any Windows version starting from Windows 7 Service pack 1, building NVDA from source is currently limited to only Windows 10 and above. +Although NVDA can run on any Windows version starting from Windows 8.1, building NVDA from source is currently limited to only Windows 10 and above. ## Dependencies The NVDA source depends on several other packages to run correctly. @@ -34,27 +34,28 @@ 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.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). - * When you do not use the Visual Studio IDE itself, you can download the [build tools](https://aka.ms/vs/16/release/vs_BuildTools.exe) - * When you are intending to use the Visual Studio IDE (not required for NVDA development), you can download [the community version](https://aka.ms/vs/16/release/vs_Community.exe), which is also used by appveyor - * The Professional and Enterprise versions are also supported - * Preview versions are *not* supported - * When installing Visual Studio 2019, you need to enable the following: - * In the list on the Workloads tab - * in the Windows grouping: - * Desktop development with C++ - * Then in the Installation details tree view, under Desktop for C++, Optional, ensure the following are selected: - * MSVC v142 - VS 2019 C++ x64/x86 build tools - * Windows 11 SDK (10.0.22000.0) - * C++ ATL for v142 build tools (x86 & x64) - * C++ Clang tools for Windows - * On the Individual components tab, ensure the following items are selected: - * MSVC v142 - VS 2019 C++ ARM64 build tools - * C++ ATL for v142 build tools (ARM64) - * If installing Visual Studio 2022: choose all the same above components as for 2019, but V143 variants, rather than V142. +#### Python +[Python](https://www.python.org/), version 3.11, 32 bit. + +To replicate the production build environment, use the 3.11.x minor version of Python that [AppVeyor uses for the Visual Studio 2022 environment](https://www.appveyor.com/docs/windows-images-software/#python). + +#### Microsoft Visual Studio +* Microsoft Visual Studio 2022 + * To replicate the production build environment, use the [version of Visual Studio 2022 that AppVeyor is using](https://www.appveyor.com/docs/windows-images-software/#visual-studio-2022). + * When you do not use the Visual Studio IDE itself, you can download the [build tools](https://aka.ms/vs/17/release/vs_BuildTools.exe) + * When you are intending to use the Visual Studio IDE (not required for NVDA development), you can download [the community version](https://aka.ms/vs/17/release/vs_Community.exe), which is also used by AppVeyor + * The Professional and Enterprise versions are also supported + * Preview versions are *not* supported +* When installing Visual Studio, you need to enable the following: + * In the list on the Workloads tab, in the Desktop grouping: + * Desktop development with C++. + * Once selected, ensure "C++ Clang tools for Windows" is included under the optional grouping. + * On the Individual components tab, ensure the following items are selected: + * Windows 11 SDK (10.0.22621.0) + * MSVC v143 - VS 2022 C++ ARM64 build tools + * MSVC v143 - VS 2022 C++ x64/x86 build tools + * C++ ATL for v143 build tools (x86 & x64) + * C++ ATL for v143 build tools (ARM64) ### Git Submodules Some of the dependencies are contained in Git submodules. @@ -74,13 +75,14 @@ For reference, the following run time dependencies are included in Git submodule * [Microsoft Detours](https://github.com/microsoft/Detours), commit `4b8c659f549b0ab21cf649377c7a84eb708f5e68` * brlapi Python bindings, version 0.8.5 or later, distributed with [BRLTTY for Windows](https://brltty.app/download.html), version 6.6 * lilli.dll, version 2.1.0.0 -* [Python interface to FTDI driver/chip](http://fluidmotion.dyndns.org/zenphoto/index.php?p=news&title=Python-interface-to-FTDI-driver-chip) +* Python interface to FTDI driver/chip * [Nullsoft Install System](https://nsis.sourceforge.io), version 3.08 * [Java Access Bridge 32 bit, from Zulu Community OpenJDK build 13.0.1+10Zulu (13.28.11)](https://github.com/nvaccess/javaAccessBridge32-bin) * [wil](https://github.com/microsoft/wil/) * [Microsoft UI Automation Remote Operations Library, forked from @microsoft by @michaeldcurran](https://www.github.com/michaeldcurran/microsoft-ui-uiautomation/) * Commit 224b22f3bf9e * The fork specifically adds support for CallExtension / IsExtensionSupported to the high-level API, see pr microsoft/microsoft-ui-uiautomation#84 and #95. +* [NVDA DiffMatchPatch](https://github.com/codeofdusk/nvda_dmp) Additionally, the following build time dependencies are included in the miscDeps git submodule: diff --git a/tests/system/libraries/NotepadLib.py b/tests/system/libraries/NotepadLib.py index f156d095636..afd192a066a 100644 --- a/tests/system/libraries/NotepadLib.py +++ b/tests/system/libraries/NotepadLib.py @@ -80,12 +80,8 @@ def exit_notepad(self): def start_notepad(self, filePath: str, expectedTitlePattern: re.Pattern) -> _Window: builtIn.log(f"starting notepad: {filePath}") NotepadLib.processRFHandleForStart = process.start_process( - "start" # windows utility to start a process - # https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/start - " /wait" # Starts an application and waits for it to end. - " notepad" - f' "{filePath}"', - shell=True, + "c:\\windows\\notepad.exe", + filePath, alias='NotepadAlias', ) process.process_should_be_running(NotepadLib.processRFHandleForStart) diff --git a/user_docs/en/changes.t2t b/user_docs/en/changes.t2t index d4cdda2781b..fff336b39a3 100644 --- a/user_docs/en/changes.t2t +++ b/user_docs/en/changes.t2t @@ -53,6 +53,8 @@ Please refer to [the developer guide https://www.nvaccess.org/files/nvda/documen - Note: this is an Add-on API compatibility breaking release. Add-ons will need to be re-tested and have their manifest updated. +- Building NVDA now requires Visual Studio 2022. +Please refer to the [NVDA docs https://github.com/nvaccess/nvda/blob/release-2024.1/projectDocs/dev/createDevEnvironment.md] for the specific list of Visual Studio components. (#14313) - Added the following extension points: - ``treeInterceptorHandler.post_browseModeStateChange``. (#14969, @nvdaes) - ``speech.speechCanceled``. (#15700, @LeonarddeR) From 15698fe030223069bf8dd35d4dc9145a77f61ca7 Mon Sep 17 00:00:00 2001 From: Sean Budd Date: Fri, 3 Nov 2023 11:18:35 +1100 Subject: [PATCH 2/5] add .vsconfig notes --- projectDocs/dev/createDevEnvironment.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/projectDocs/dev/createDevEnvironment.md b/projectDocs/dev/createDevEnvironment.md index 56b53a276fa..0da99bc47dd 100644 --- a/projectDocs/dev/createDevEnvironment.md +++ b/projectDocs/dev/createDevEnvironment.md @@ -46,7 +46,8 @@ To replicate the production build environment, use the 3.11.x minor version of P * When you are intending to use the Visual Studio IDE (not required for NVDA development), you can download [the community version](https://aka.ms/vs/17/release/vs_Community.exe), which is also used by AppVeyor * The Professional and Enterprise versions are also supported * Preview versions are *not* supported -* When installing Visual Studio, you need to enable the following: +* When installing Visual Studio, additional components must be included + * You can automatically fetch these using [NVDAs .vsconfig](../../.vsconfig) using the [import feature of the VS installer](https://learn.microsoft.com/en-us/visualstudio/install/import-export-installation-configurations?view=vs-2022#import-a-configuration) * In the list on the Workloads tab, in the Desktop grouping: * Desktop development with C++. * Once selected, ensure "C++ Clang tools for Windows" is included under the optional grouping. From f855ae0d265e00972ea5029118de86d4f910e9f4 Mon Sep 17 00:00:00 2001 From: Sean Budd Date: Fri, 3 Nov 2023 17:25:07 +1100 Subject: [PATCH 3/5] revert notepad changes --- tests/system/libraries/NotepadLib.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/system/libraries/NotepadLib.py b/tests/system/libraries/NotepadLib.py index afd192a066a..f156d095636 100644 --- a/tests/system/libraries/NotepadLib.py +++ b/tests/system/libraries/NotepadLib.py @@ -80,8 +80,12 @@ def exit_notepad(self): def start_notepad(self, filePath: str, expectedTitlePattern: re.Pattern) -> _Window: builtIn.log(f"starting notepad: {filePath}") NotepadLib.processRFHandleForStart = process.start_process( - "c:\\windows\\notepad.exe", - filePath, + "start" # windows utility to start a process + # https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/start + " /wait" # Starts an application and waits for it to end. + " notepad" + f' "{filePath}"', + shell=True, alias='NotepadAlias', ) process.process_should_be_running(NotepadLib.processRFHandleForStart) From 19ea89d3c0f9b39e6616f8ef48f7f49bd9b09d20 Mon Sep 17 00:00:00 2001 From: Sean Budd Date: Mon, 6 Nov 2023 09:17:50 +1100 Subject: [PATCH 4/5] fix up label --- projectDocs/dev/createDevEnvironment.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projectDocs/dev/createDevEnvironment.md b/projectDocs/dev/createDevEnvironment.md index 0da99bc47dd..94e20a99465 100644 --- a/projectDocs/dev/createDevEnvironment.md +++ b/projectDocs/dev/createDevEnvironment.md @@ -56,7 +56,7 @@ To replicate the production build environment, use the 3.11.x minor version of P * MSVC v143 - VS 2022 C++ ARM64 build tools * MSVC v143 - VS 2022 C++ x64/x86 build tools * C++ ATL for v143 build tools (x86 & x64) - * C++ ATL for v143 build tools (ARM64) + * C++ ATL for v143 build tools (ARM64/ARM64EC) ### Git Submodules Some of the dependencies are contained in Git submodules. From a9a88067668f32ca8c6154743614acc9ef654221 Mon Sep 17 00:00:00 2001 From: Sean Budd Date: Mon, 6 Nov 2023 12:27:27 +1100 Subject: [PATCH 5/5] disable notepad tests --- tests/system/robot/symbolPronunciationTests.robot | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/system/robot/symbolPronunciationTests.robot b/tests/system/robot/symbolPronunciationTests.robot index fbe3ef52448..c70a050b0a5 100644 --- a/tests/system/robot/symbolPronunciationTests.robot +++ b/tests/system/robot/symbolPronunciationTests.robot @@ -4,7 +4,7 @@ # For more details see: https://www.gnu.org/licenses/gpl-2.0.html *** Settings *** Documentation Symbol pronunciation tests -Force Tags NVDA smoke test symbols +Force Tags NVDA smoke test symbols excluded_from_build # for start & quit in Test Setup and Test Test Teardown Library NvdaLib.py