From 52e6aa97b5c1587a2406bf758864b2931d1cbfeb Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Wed, 1 Feb 2023 22:50:35 +0000 Subject: [PATCH] build: sys: pacify hardware center validation Infverif /k no longer likes "undecorated" [DefaultInstall] sections and instead it wants them "architecture decorated". For example, [DefaultInstall.ntarm64]. So play along to have our driver signed. For more information see: https://learn.microsoft.com/en-us/windows-hardware/drivers/develop/creating-a-primitive-driver --- build/VStudio/winfsp_sys.vcxproj | 18 ++++++++++++++++++ src/sys/driver.inf.in | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/build/VStudio/winfsp_sys.vcxproj b/build/VStudio/winfsp_sys.vcxproj index 03b7bcb6..4d89bb60 100644 --- a/build/VStudio/winfsp_sys.vcxproj +++ b/build/VStudio/winfsp_sys.vcxproj @@ -291,6 +291,9 @@ set DriverFile=$(TargetFileName) set Provider="$(MyCompanyName)" set CatalogFile=driver-$(MyProductFileArch).cat +if "$(MyProductFileArch)"=="a64" set ArchDecoration=ntarm64 +if "$(MyProductFileArch)"=="x64" set ArchDecoration=ntamd64 +if "$(MyProductFileArch)"=="x86" set ArchDecoration=ntx86 setlocal EnableDelayedExpansion if exist $(OutDir)driver-$(MyProductFileArch).inf del $(OutDir)driver-$(MyProductFileArch).inf @@ -304,6 +307,9 @@ stampinf -d * -v $(MyVersion) -f $(OutDir)driver-$(MyProductFileArch).infset DriverFile=$(TargetFileName) set Provider="$(MyCompanyName)" set CatalogFile=driver-$(MyProductFileArch).cat +if "$(MyProductFileArch)"=="a64" set ArchDecoration=ntarm64 +if "$(MyProductFileArch)"=="x64" set ArchDecoration=ntamd64 +if "$(MyProductFileArch)"=="x86" set ArchDecoration=ntx86 setlocal EnableDelayedExpansion if exist $(OutDir)driver-$(MyProductFileArch).inf del $(OutDir)driver-$(MyProductFileArch).inf @@ -317,6 +323,9 @@ stampinf -d * -v $(MyVersion) -f $(OutDir)driver-$(MyProductFileArch).infset DriverFile=$(TargetFileName) set Provider="$(MyCompanyName)" set CatalogFile=driver-$(MyProductFileArch).cat +if "$(MyProductFileArch)"=="a64" set ArchDecoration=ntarm64 +if "$(MyProductFileArch)"=="x64" set ArchDecoration=ntamd64 +if "$(MyProductFileArch)"=="x86" set ArchDecoration=ntx86 setlocal EnableDelayedExpansion if exist $(OutDir)driver-$(MyProductFileArch).inf del $(OutDir)driver-$(MyProductFileArch).inf @@ -329,6 +338,9 @@ stampinf -d * -v $(MyVersion) -f $(OutDir)driver-$(MyProductFileArch).infset DriverFile=$(TargetFileName) set Provider="$(MyCompanyName)" set CatalogFile=driver-$(MyProductFileArch).cat +if "$(MyProductFileArch)"=="a64" set ArchDecoration=ntarm64 +if "$(MyProductFileArch)"=="x64" set ArchDecoration=ntamd64 +if "$(MyProductFileArch)"=="x86" set ArchDecoration=ntx86 setlocal EnableDelayedExpansion if exist $(OutDir)driver-$(MyProductFileArch).inf del $(OutDir)driver-$(MyProductFileArch).inf @@ -343,6 +355,9 @@ stampinf -d * -v $(MyVersion) -f $(OutDir)driver-$(MyProductFileArch).infset DriverFile=$(TargetFileName) set Provider="$(MyCompanyName)" set CatalogFile=driver-$(MyProductFileArch).cat +if "$(MyProductFileArch)"=="a64" set ArchDecoration=ntarm64 +if "$(MyProductFileArch)"=="x64" set ArchDecoration=ntamd64 +if "$(MyProductFileArch)"=="x86" set ArchDecoration=ntx86 setlocal EnableDelayedExpansion if exist $(OutDir)driver-$(MyProductFileArch).inf del $(OutDir)driver-$(MyProductFileArch).inf @@ -355,6 +370,9 @@ stampinf -d * -v $(MyVersion) -f $(OutDir)driver-$(MyProductFileArch).infset DriverFile=$(TargetFileName) set Provider="$(MyCompanyName)" set CatalogFile=driver-$(MyProductFileArch).cat +if "$(MyProductFileArch)"=="a64" set ArchDecoration=ntarm64 +if "$(MyProductFileArch)"=="x64" set ArchDecoration=ntamd64 +if "$(MyProductFileArch)"=="x86" set ArchDecoration=ntx86 setlocal EnableDelayedExpansion if exist $(OutDir)driver-$(MyProductFileArch).inf del $(OutDir)driver-$(MyProductFileArch).inf diff --git a/src/sys/driver.inf.in b/src/sys/driver.inf.in index 2304337e..dba993a9 100644 --- a/src/sys/driver.inf.in +++ b/src/sys/driver.inf.in @@ -8,7 +8,7 @@ Provider = !Provider! [DestinationDirs] DefaultDestDir = 12 -[DefaultInstall] +[DefaultInstall.!ArchDecoration!] CopyFiles = Driver.CopyFiles [Driver.CopyFiles]