From 5a94d24095c3f817310a82ef739952416b00a704 Mon Sep 17 00:00:00 2001 From: dundargoc <33953936+dundargoc@users.noreply.github.com> Date: Mon, 23 Jan 2023 23:47:06 +0100 Subject: [PATCH] fix: add manifest file to correctly determine Windows version (#21953) In Windows 8.1 and later, GetVersionEx does not automatically give the correct information if a manifest file doesn't explicitly mention we support that version. This will enable further detection for Windows 8.1 and Windows 10/11 when using windowsversion(), with an easy way to add future versions. A list of all operating system versions can be found here: https://learn.microsoft.com/en-us/windows/win32/sysinfo/operating-system-version --- src/nvim/CMakeLists.txt | 2 ++ src/nvim/os/nvim.manifest | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 src/nvim/os/nvim.manifest diff --git a/src/nvim/CMakeLists.txt b/src/nvim/CMakeLists.txt index ac067efef9..74aba526f9 100755 --- a/src/nvim/CMakeLists.txt +++ b/src/nvim/CMakeLists.txt @@ -92,6 +92,8 @@ if(MSVC) # Disable warnings that give too many false positives. target_compile_options(main_lib INTERFACE -wd4311 -wd4146) target_compile_definitions(main_lib INTERFACE _CRT_SECURE_NO_WARNINGS _CRT_NONSTDC_NO_DEPRECATE) + + target_sources(main_lib INTERFACE ${CMAKE_CURRENT_LIST_DIR}/os/nvim.manifest) else() target_compile_options(main_lib INTERFACE -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion diff --git a/src/nvim/os/nvim.manifest b/src/nvim/os/nvim.manifest new file mode 100644 index 0000000000..8878822a5d --- /dev/null +++ b/src/nvim/os/nvim.manifest @@ -0,0 +1,20 @@ + + + + Neovim + + + + + + + + + + +