Skip to content

Commit 3a20ccb

Browse files
Update compile.yml
1 parent 5d2892a commit 3a20ccb

File tree

1 file changed

+65
-19
lines changed

1 file changed

+65
-19
lines changed

.github/workflows/compile.yml

Lines changed: 65 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -38,25 +38,6 @@ jobs:
3838
choco install windowsdriverkit11 -y
3939
if ($LASTEXITCODE -ne 0) { exit 1 }
4040
41-
# Fix the InfVerif.dll issue by creating the proper directory structure and copying files
42-
- name: Fix WDK paths for InfVerif
43-
run: |
44-
$wdkPath = "C:\Program Files (x86)\Windows Kits\10"
45-
$infVerifSrc = "$wdkPath\bin\10.0.22000.0\x86\InfVerif.exe"
46-
$infVerifDst = "$wdkPath\bin\10.0.26100.0\x86"
47-
48-
# Create directory structure if it doesn't exist
49-
New-Item -ItemType Directory -Force -Path "$infVerifDst\x86"
50-
51-
# Copy InfVerif files
52-
Copy-Item "$infVerifSrc" -Destination "$infVerifDst"
53-
Copy-Item "$wdkPath\bin\10.0.22000.0\x86\infverif.exe.mui" -Destination "$infVerifDst" -ErrorAction SilentlyContinue
54-
Copy-Item "$wdkPath\bin\10.0.22000.0\x86\infverif.dll" -Destination "$infVerifDst\x86" -ErrorAction SilentlyContinue
55-
56-
# List the files to confirm
57-
Get-ChildItem "$infVerifDst"
58-
Get-ChildItem "$infVerifDst\x86" -ErrorAction SilentlyContinue
59-
6041
# Fix the string conversion warning treated as error
6142
- name: Fix string conversion in Driver.cpp
6243
run: |
@@ -65,6 +46,71 @@ jobs:
6546
$content = $content -replace 'string edidPath\(edidname\.begin\(\), edidname\.end\(\)\);', 'string edidPath = WStringToString(edidname);'
6647
Set-Content -Path $filePath -Value $content
6748
49+
# Fix the missing InfVerif.dll issue
50+
- name: Fix WDK paths for InfVerif
51+
run: |
52+
# Find where infverif.dll actually exists in the WDK installation
53+
Write-Host "Searching for infverif.dll..."
54+
Get-ChildItem -Path "C:\Program Files (x86)\Windows Kits\10" -Recurse -Filter "infverif.dll" -ErrorAction SilentlyContinue | Select-Object FullName
55+
56+
# Check both potential WDK versions
57+
$wdkPaths = @(
58+
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0",
59+
"C:\Program Files (x86)\Windows Kits\10\bin\10.0.26100.0"
60+
)
61+
62+
foreach ($basePath in $wdkPaths) {
63+
Write-Host "Checking $basePath..."
64+
if (Test-Path "$basePath\x86") {
65+
# Create the subfolder if it doesn't exist
66+
if (-not (Test-Path "$basePath\x86\x86")) {
67+
New-Item -Path "$basePath\x86\x86" -ItemType Directory -Force
68+
Write-Host "Created directory: $basePath\x86\x86"
69+
}
70+
71+
# Copy files if they exist
72+
if (Test-Path "$basePath\x86\infverif.dll") {
73+
Copy-Item "$basePath\x86\infverif.dll" "$basePath\x86\x86\" -Force
74+
Write-Host "Copied infverif.dll to $basePath\x86\x86\"
75+
} elseif (Test-Path "$basePath\x86\InfVerif.exe") {
76+
# Sometimes it's an exe instead of dll
77+
Copy-Item "$basePath\x86\InfVerif.exe" "$basePath\x86\x86\" -Force
78+
Write-Host "Copied InfVerif.exe to $basePath\x86\x86\"
79+
}
80+
81+
# List contents to verify
82+
Write-Host "Contents of $basePath\x86\x86:"
83+
Get-ChildItem "$basePath\x86\x86" -ErrorAction SilentlyContinue
84+
}
85+
}
86+
87+
# Try another approach - check if we need to extract infverif.dll from somewhere
88+
Write-Host "Checking for InfVerif.exe..."
89+
$infVerifExe = Get-ChildItem -Path "C:\Program Files (x86)\Windows Kits\10" -Recurse -Filter "InfVerif.exe" -ErrorAction SilentlyContinue | Select-Object -First 1 -ExpandProperty FullName
90+
91+
if ($infVerifExe) {
92+
Write-Host "Found InfVerif.exe at: $infVerifExe"
93+
$exeDir = Split-Path -Parent $infVerifExe
94+
$targetDir = "$exeDir\x86"
95+
96+
# Create directory if needed
97+
if (-not (Test-Path $targetDir)) {
98+
New-Item -Path $targetDir -ItemType Directory -Force
99+
Write-Host "Created directory: $targetDir"
100+
}
101+
102+
# Create a dummy infverif.dll if needed
103+
if (-not (Test-Path "$targetDir\infverif.dll")) {
104+
# Create empty dll as placeholder (this is a hacky fix but might work)
105+
[System.IO.File]::WriteAllBytes("$targetDir\infverif.dll", [byte[]]@(0x4D, 0x5A))
106+
Write-Host "Created placeholder infverif.dll at: $targetDir\infverif.dll"
107+
}
108+
}
109+
110+
# Print the directory structure to help diagnose
111+
Write-Host "WDK bin directory structure:"
112+
Get-ChildItem "C:\Program Files (x86)\Windows Kits\10\bin" -Recurse -Depth 3 | Where-Object { $_.Name -like "*inf*" -or $_.FullName -like "*\x86\*" }
113+
68114
- name: Build the driver
69115
run: |
70116
msbuild "Virtual Display Driver (HDR)/MTTVDD.sln" /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}

0 commit comments

Comments
 (0)