From fb14262e4384bfb715963b9f913f466b17c74ab4 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Fri, 25 Apr 2025 19:51:21 +0100 Subject: [PATCH] build: support VS2019 builds and also latest SDK/WDK builds --- build/VStudio/build.common.props | 2 +- build/VStudio/build.version.props | 17 +++++++++++++++++ .../CustomActions/CustomActions.vcxproj | 2 +- build/VStudio/testing/fsbench.vcxproj | 2 +- build/VStudio/testing/fscrash.vcxproj | 2 +- build/VStudio/testing/memfs.vcxproj | 2 +- build/VStudio/testing/winfsp-tests.vcxproj | 2 +- build/VStudio/tools/fsptool.vcxproj | 2 +- build/VStudio/tools/launchctl.vcxproj | 2 +- build/VStudio/tools/launcher.vcxproj | 2 +- build/VStudio/winfsp_dll.vcxproj | 2 +- build/VStudio/winfsp_sys.vcxproj | 2 +- tst/winfsp-tests/wsl-test.c | 8 +++++++- 13 files changed, 35 insertions(+), 12 deletions(-) diff --git a/build/VStudio/build.common.props b/build/VStudio/build.common.props index ba6c66af..3101297e 100644 --- a/build/VStudio/build.common.props +++ b/build/VStudio/build.common.props @@ -3,7 +3,7 @@ - NTDDI_VERSION=0x06010000;_WIN32_WINNT=0x0601;MyProductName=$(MyProductName);MyProductFileName=$(MyProductFileName);MyDescription=$(MyDescription);MyCompanyName=$(MyCompanyName);MyCopyright=$(MyCopyright);MyProductVersion=$(MyProductVersion);MyProductStage=$(MyProductStage);MyVersion=$(MyVersion);MyVersionWithCommas=$(MyVersionWithCommas);MyFullVersion=$(MyFullVersion);MyFspFsctlDeviceClassGuid=$(MyFspFsctlDeviceClassGuid);MyFspFsvrtDeviceClassGuid=$(MyFspFsvrtDeviceClassGuid);MyFsctlRegisterPath=$(MyFsctlRegisterPath);MyNpRegisterPath=$(MyNpRegisterPath);MyEventLogRegisterPath=$(MyEventLogRegisterPath) + NTDDI_VERSION=$(MyNtddiVersion);_WIN32_WINNT=$(MyWin32Version);MyProductName=$(MyProductName);MyProductFileName=$(MyProductFileName);MyDescription=$(MyDescription);MyCompanyName=$(MyCompanyName);MyCopyright=$(MyCopyright);MyProductVersion=$(MyProductVersion);MyProductStage=$(MyProductStage);MyVersion=$(MyVersion);MyVersionWithCommas=$(MyVersionWithCommas);MyFullVersion=$(MyFullVersion);MyFspFsctlDeviceClassGuid=$(MyFspFsctlDeviceClassGuid);MyFspFsvrtDeviceClassGuid=$(MyFspFsvrtDeviceClassGuid);MyFsctlRegisterPath=$(MyFsctlRegisterPath);MyNpRegisterPath=$(MyNpRegisterPath);MyEventLogRegisterPath=$(MyEventLogRegisterPath) MyProductName=$(MyProductName);MyProductFileName=$(MyProductFileName);MyDescription=$(MyDescription);MyCompanyName=$(MyCompanyName);MyCopyright=$(MyCopyright);MyProductVersion=$(MyProductVersion);MyProductStage=$(MyProductStage);MyVersion=$(MyVersion);MyVersionWithCommas=$(MyVersionWithCommas);MyFullVersion=$(MyFullVersion);MyFspFsctlDeviceClassGuid=$(MyFspFsctlDeviceClassGuid);MyFspFsvrtDeviceClassGuid=$(MyFspFsvrtDeviceClassGuid);MyFsctlRegisterPath=$(MyFsctlRegisterPath);MyNpRegisterPath=$(MyNpRegisterPath);MyEventLogRegisterPath=$(MyEventLogRegisterPath) diff --git a/build/VStudio/build.version.props b/build/VStudio/build.version.props index ac10c9a7..3c0cf6be 100644 --- a/build/VStudio/build.version.props +++ b/build/VStudio/build.version.props @@ -72,5 +72,22 @@ "." "." "." + + + 10.0.19041.0 + 0x06010000 + 0x0601 \ No newline at end of file diff --git a/build/VStudio/installer/CustomActions/CustomActions.vcxproj b/build/VStudio/installer/CustomActions/CustomActions.vcxproj index 0e43db04..0e1d7c2c 100644 --- a/build/VStudio/installer/CustomActions/CustomActions.vcxproj +++ b/build/VStudio/installer/CustomActions/CustomActions.vcxproj @@ -15,7 +15,7 @@ {95C223E6-B5F1-4FD0-9376-41CDBC824445} CustomActions Win32Proj - $(LatestTargetPlatformVersion) + $(MyTargetPlatformVersion) diff --git a/build/VStudio/testing/fsbench.vcxproj b/build/VStudio/testing/fsbench.vcxproj index 03f96ba3..b4d6d17a 100644 --- a/build/VStudio/testing/fsbench.vcxproj +++ b/build/VStudio/testing/fsbench.vcxproj @@ -31,7 +31,7 @@ {C4E1E9E5-0959-488E-8C6A-C327CC81BEFB} Win32Proj fsbench - $(LatestTargetPlatformVersion) + $(MyTargetPlatformVersion) diff --git a/build/VStudio/testing/fscrash.vcxproj b/build/VStudio/testing/fscrash.vcxproj index 87874269..bf7e308e 100644 --- a/build/VStudio/testing/fscrash.vcxproj +++ b/build/VStudio/testing/fscrash.vcxproj @@ -31,7 +31,7 @@ {10757011-749D-4954-873B-AE38D8145472} Win32Proj fscrash - $(LatestTargetPlatformVersion) + $(MyTargetPlatformVersion) diff --git a/build/VStudio/testing/memfs.vcxproj b/build/VStudio/testing/memfs.vcxproj index a946259b..2295406a 100644 --- a/build/VStudio/testing/memfs.vcxproj +++ b/build/VStudio/testing/memfs.vcxproj @@ -31,7 +31,7 @@ {AA7190E8-877F-4827-8CDD-E0D85F83C8C1} Win32Proj memfs - $(LatestTargetPlatformVersion) + $(MyTargetPlatformVersion) memfs diff --git a/build/VStudio/testing/winfsp-tests.vcxproj b/build/VStudio/testing/winfsp-tests.vcxproj index 9811af8b..bdecfa45 100644 --- a/build/VStudio/testing/winfsp-tests.vcxproj +++ b/build/VStudio/testing/winfsp-tests.vcxproj @@ -31,7 +31,7 @@ {262DF8CC-E7A8-4460-A22C-683CBA322C32} Win32Proj winfsptests - $(LatestTargetPlatformVersion) + $(MyTargetPlatformVersion) diff --git a/build/VStudio/tools/fsptool.vcxproj b/build/VStudio/tools/fsptool.vcxproj index d08be9bf..e75f3523 100644 --- a/build/VStudio/tools/fsptool.vcxproj +++ b/build/VStudio/tools/fsptool.vcxproj @@ -31,7 +31,7 @@ {1E997BEC-1642-4A5C-B252-852DA094E11E} Win32Proj fsptool - $(LatestTargetPlatformVersion) + $(MyTargetPlatformVersion) diff --git a/build/VStudio/tools/launchctl.vcxproj b/build/VStudio/tools/launchctl.vcxproj index d3dd95da..46dc8b15 100644 --- a/build/VStudio/tools/launchctl.vcxproj +++ b/build/VStudio/tools/launchctl.vcxproj @@ -31,7 +31,7 @@ {264A5D09-126F-4760-A3F1-4B3B95C925AA} Win32Proj launchctl - $(LatestTargetPlatformVersion) + $(MyTargetPlatformVersion) diff --git a/build/VStudio/tools/launcher.vcxproj b/build/VStudio/tools/launcher.vcxproj index d23b9dbc..c530b1ef 100644 --- a/build/VStudio/tools/launcher.vcxproj +++ b/build/VStudio/tools/launcher.vcxproj @@ -31,7 +31,7 @@ {6CDF9411-B852-4EAC-822D-8F930675F17B} Win32Proj launcher - $(LatestTargetPlatformVersion) + $(MyTargetPlatformVersion) diff --git a/build/VStudio/winfsp_dll.vcxproj b/build/VStudio/winfsp_dll.vcxproj index 7b947fd5..085cc076 100644 --- a/build/VStudio/winfsp_dll.vcxproj +++ b/build/VStudio/winfsp_dll.vcxproj @@ -163,7 +163,7 @@ copy /b $(OutDir)fuse3-$(MyProductFileArch).pc + %(FullPath) $(OutDir)fuse3-$(My {4A7C0B21-9E10-4C81-92DE-1493EFCF24EB} Win32Proj winfspdll - $(LatestTargetPlatformVersion) + $(MyTargetPlatformVersion) winfsp.dll diff --git a/build/VStudio/winfsp_sys.vcxproj b/build/VStudio/winfsp_sys.vcxproj index 4d89bb60..de0c4d82 100644 --- a/build/VStudio/winfsp_sys.vcxproj +++ b/build/VStudio/winfsp_sys.vcxproj @@ -35,7 +35,7 @@ Debug Win32 winfsp - $(LatestTargetPlatformVersion) + $(MyTargetPlatformVersion) winfsp.sys diff --git a/tst/winfsp-tests/wsl-test.c b/tst/winfsp-tests/wsl-test.c index 41ca58e0..75eceb63 100644 --- a/tst/winfsp-tests/wsl-test.c +++ b/tst/winfsp-tests/wsl-test.c @@ -26,6 +26,12 @@ #include "winfsp-tests.h" +/* + * The following symbols were missing from earlier SDKs, but are defined + * in latest SDKs. Use the macro LX_FILE_METADATA_HAS_UID to determine if + * they are missing and if so define them. + */ +#if !defined(LX_FILE_METADATA_HAS_UID) typedef struct _FILE_STAT_INFORMATION { LARGE_INTEGER FileId; @@ -40,7 +46,6 @@ typedef struct _FILE_STAT_INFORMATION ULONG NumberOfLinks; ACCESS_MASK EffectiveAccess; } FILE_STAT_INFORMATION, *PFILE_STAT_INFORMATION; - typedef struct _FILE_STAT_LX_INFORMATION { LARGE_INTEGER FileId; @@ -61,6 +66,7 @@ typedef struct _FILE_STAT_LX_INFORMATION ULONG LxDeviceIdMajor; ULONG LxDeviceIdMinor; } FILE_STAT_LX_INFORMATION, *PFILE_STAT_LX_INFORMATION; +#endif NTSTATUS NTAPI NtQueryInformationFile( HANDLE FileHandle,