From ca4d971dd5671fa9c1efbdb66a03759b38cf1a56 Mon Sep 17 00:00:00 2001
From: LTRData
Date: Fri, 1 Mar 2024 12:32:18 +0100
Subject: [PATCH 1/2] Newer VS/SDK/DDK build compatibility
---
.gitignore | 1 +
Ext2Mgr/Ext2Mgr.vcxproj | 10 ++++----
Ext2Srv/Ext2Srv.vcxproj | 10 ++++----
Ext4Fsd/Ext4Fsd.vcxproj | 41 ++++++++++++++++++++++++++++-----
Ext4Fsd/Ext4Fsd.vcxproj.filters | 5 ----
Ext4Fsd/PropertySheet.props | 12 ++++++++++
Ext4Fsd/debug.c | 2 ++
Ext4Fsd/include/linux/module.h | 7 ++++++
Ext4Fsd/linux.c | 4 ++++
9 files changed, 71 insertions(+), 21 deletions(-)
create mode 100644 Ext4Fsd/PropertySheet.props
diff --git a/.gitignore b/.gitignore
index ecf6884..69a9e7c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@ Debug/
Release/
*.vcxproj.user
Ext2Fsd-setup.exe
+*/cab/
diff --git a/Ext2Mgr/Ext2Mgr.vcxproj b/Ext2Mgr/Ext2Mgr.vcxproj
index 38b2ddc..6c46d5a 100644
--- a/Ext2Mgr/Ext2Mgr.vcxproj
+++ b/Ext2Mgr/Ext2Mgr.vcxproj
@@ -22,20 +22,20 @@
15.0
{E1AF85D7-0179-4CF0-B0D1-21AE72B6DC2E}
Ext2Mgr
- 10.0
+ 10.0.19041.0
Application
true
- v143
+ v142
MultiByte
Dynamic
Application
false
- v143
+ v142
true
MultiByte
Dynamic
@@ -43,14 +43,14 @@
Application
true
- v143
+ v142
MultiByte
Dynamic
Application
false
- v143
+ v142
true
MultiByte
Dynamic
diff --git a/Ext2Srv/Ext2Srv.vcxproj b/Ext2Srv/Ext2Srv.vcxproj
index 8c9c070..b58da1d 100644
--- a/Ext2Srv/Ext2Srv.vcxproj
+++ b/Ext2Srv/Ext2Srv.vcxproj
@@ -22,32 +22,32 @@
15.0
{6A5A0B13-7E05-4CA9-9A2B-FADF76DBAC20}
Ext2Srv
- 10.0
+ 10.0.19041.0
Application
true
- v143
+ v142
MultiByte
Application
false
- v143
+ v142
true
MultiByte
Application
true
- v143
+ v142
MultiByte
Application
false
- v143
+ v142
true
MultiByte
diff --git a/Ext4Fsd/Ext4Fsd.vcxproj b/Ext4Fsd/Ext4Fsd.vcxproj
index 1c7427a..2f6eceb 100644
--- a/Ext4Fsd/Ext4Fsd.vcxproj
+++ b/Ext4Fsd/Ext4Fsd.vcxproj
@@ -42,26 +42,28 @@
Debug
Win32
Ext4Fsd
- $(LatestTargetPlatformVersion)
+ 10.0.19041.0
Windows10
true
WindowsKernelModeDriver10.0
- Driver
WDM
1
false
+ Driver
+ Windows Driver
Windows10
false
WindowsKernelModeDriver10.0
- Driver
WDM
1
false
+ Driver
+ Windows Driver
Windows10
@@ -71,6 +73,7 @@
WDM
1
false
+ Windows Driver
Windows10
@@ -80,6 +83,7 @@
WDM
1
false
+ Windows Driver
Windows10
@@ -88,6 +92,7 @@
Driver
WDM
1
+ Windows Driver
Windows10
@@ -96,6 +101,7 @@
Driver
WDM
1
+ Windows Driver
Windows10
@@ -104,6 +110,7 @@
Driver
WDM
1
+ Windows Driver
Windows10
@@ -112,6 +119,7 @@
Driver
WDM
1
+ Windows Driver
@@ -119,6 +127,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -359,9 +391,6 @@
-
-
-
diff --git a/Ext4Fsd/Ext4Fsd.vcxproj.filters b/Ext4Fsd/Ext4Fsd.vcxproj.filters
index f56846f..1593aa3 100644
--- a/Ext4Fsd/Ext4Fsd.vcxproj.filters
+++ b/Ext4Fsd/Ext4Fsd.vcxproj.filters
@@ -291,9 +291,4 @@
Resource Files
-
-
- Driver Files
-
-
\ No newline at end of file
diff --git a/Ext4Fsd/PropertySheet.props b/Ext4Fsd/PropertySheet.props
new file mode 100644
index 0000000..c19d57e
--- /dev/null
+++ b/Ext4Fsd/PropertySheet.props
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+ 4996;4064;4627;4627;4366;%(DisableSpecificWarnings)
+
+
+
+
\ No newline at end of file
diff --git a/Ext4Fsd/debug.c b/Ext4Fsd/debug.c
index fa12919..14179ea 100644
--- a/Ext4Fsd/debug.c
+++ b/Ext4Fsd/debug.c
@@ -12,6 +12,8 @@
#include "stdarg.h"
#include "ext2fs.h"
+#include
+
/* GLOBALS ***************************************************************/
#if EXT2_DEBUG
diff --git a/Ext4Fsd/include/linux/module.h b/Ext4Fsd/include/linux/module.h
index 5274425..15501b2 100644
--- a/Ext4Fsd/include/linux/module.h
+++ b/Ext4Fsd/include/linux/module.h
@@ -61,18 +61,23 @@ extern "C" {
#else
+#ifndef RtlUshortByteSwap
USHORT
FASTCALL
RtlUshortByteSwap(
IN USHORT Source
);
+#endif
+#ifndef RtlUlongByteSwap
ULONG
FASTCALL
RtlUlongByteSwap(
IN ULONG Source
);
+#endif
+#ifndef RtlUlonglongByteSwap
ULONGLONG
FASTCALL
RtlUlonglongByteSwap(
@@ -80,6 +85,8 @@ RtlUlonglongByteSwap(
);
#endif
+#endif
+
#define __swab16(x) RtlUshortByteSwap(x)
#define __swab32(x) RtlUlongByteSwap(x)
#define __swab64(x) RtlUlonglongByteSwap(x)
diff --git a/Ext4Fsd/linux.c b/Ext4Fsd/linux.c
index 96e6bdf..5708c39 100644
--- a/Ext4Fsd/linux.c
+++ b/Ext4Fsd/linux.c
@@ -1006,6 +1006,8 @@ int _strnicmp(const char* str1, const char* str2, size_t count)
return (int)c1 - (int)c2;
}
+#if !defined(_M_ARM64) && !defined(_M_ARM)
+
int strncmp(const char* str1, const char* str2, size_t count)
{
unsigned char c1, c2;
@@ -1037,6 +1039,8 @@ char* strncpy(char* dest, const char* src, size_t count)
#endif
+#endif
+
//
// initialzer and destructor
//
From 6a9c283a8579705f5ef3ceafc4fcd3cc7e8239c0 Mon Sep 17 00:00:00 2001
From: LTRData
Date: Fri, 1 Mar 2024 12:32:36 +0100
Subject: [PATCH 2/2] Package signing scripts
---
Ext4Fsd/ext2fsd_dummy.inf | 50 +++++++++++++++++++++++++++++++++++++++
Ext4Fsd/mkcab.cmd | 15 ++++++++++++
2 files changed, 65 insertions(+)
create mode 100644 Ext4Fsd/ext2fsd_dummy.inf
create mode 100644 Ext4Fsd/mkcab.cmd
diff --git a/Ext4Fsd/ext2fsd_dummy.inf b/Ext4Fsd/ext2fsd_dummy.inf
new file mode 100644
index 0000000..25d875b
--- /dev/null
+++ b/Ext4Fsd/ext2fsd_dummy.inf
@@ -0,0 +1,50 @@
+
+; DUMMY.INF
+; Dummy inf file.
+
+[Version]
+signature = "$Windows NT$"
+Class = SCSIAdapter
+ClassGUID = {4D36E97B-E325-11CE-BFC1-08002BE10318}
+Provider = "LTR Data"
+DriverVer = 02/22/2024,12.51.57.866
+CatalogFile = ext2fsd_dummy.cat
+
+
+[SourceDisksNames]
+1 = "EXT4 File System Driver"
+
+
+[SourceDisksFiles.x86]
+ext2fsd.sys = 1, x86
+
+[SourceDisksFiles.amd64]
+ext2fsd.sys = 1, x64
+
+[SourceDisksFiles.arm]
+ext2fsd.sys = 1, arm
+
+[SourceDisksFiles.arm64]
+ext2fsd.sys = 1, arm64
+
+[DestinationDirs]
+ext2fsdSysFiles = 12
+
+
+[DefaultInstall.ntx86]
+CopyFiles = ext2fsdSysFiles
+
+
+[ext2fsdSysFiles]
+ext2fsd.sys
+
+[DefaultInstall.ntx86.Services]
+AddService = ext2fsd, , ext2fsdDrv
+
+
+[ext2fsdDrv]
+DisplayName = "EXT4 File System Driver"
+StartType = 1
+ServiceType = 2
+ErrorControl = 0
+ServiceBinary = %12%\ext2fsd.sys
diff --git a/Ext4Fsd/mkcab.cmd b/Ext4Fsd/mkcab.cmd
new file mode 100644
index 0000000..c1a96b0
--- /dev/null
+++ b/Ext4Fsd/mkcab.cmd
@@ -0,0 +1,15 @@
+copy /y ext2fsd_dummy.inf Release\
+
+stampinf -d * -v * -f Release\ext2fsd_dummy.inf -a NTx86,NTamd64,NTia64,NTARM,NTARM64 || goto :eof
+
+inf2cat /driver:Release /os:XP_X86,2000,XP_X64,Vista_X86,Vista_X64,7_X86,7_X64,Server2003_X86,Server2003_X64,Server2003_IA64,Server2008_X86,Server2008_X64,Server2008_IA64,Server2008R2_X64,Server2008R2_IA64,8_X86,8_X64,8_ARM,10_RS3_X86,10_RS3_X64,10_RS3_ARM64 || goto :eof
+
+if exist cab\ext2fsd.cab del cab\ext2fsd.cab
+
+if not exist cab mkdir cab
+
+cabarc -p -r n cab\ext2fsd.cab Release\ext2fsd_dummy.inf Release\ext2fsd*.sys Release\ext2fsd*.pdb || goto :eof
+
+if not exist cab\ext2fsd.cab goto :eof
+
+signtool sign /a /as /v /sha1 a065b19d9f5a23bc67bb1cf6872283f504ba04b1 /fd sha256 /tr "http://sha256timestamp.ws.symantec.com/sha256/timestamp" cab\ext2fsd.cab || goto :eof