Skip to content

Commit 5d2892a

Browse files
Merge pull request #326 from VirtualDisplay/itsmikethetech-patch-6
Update compile.yml
2 parents 0505e34 + e87194f commit 5d2892a

File tree

1 file changed

+35
-11
lines changed

1 file changed

+35
-11
lines changed

.github/workflows/compile.yml

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
name: Virtual Display Driver Building
2-
32
on:
43
workflow_dispatch:
54
push:
@@ -8,7 +7,6 @@ on:
87
pull_request:
98
branches:
109
- master
11-
1210
jobs:
1311
build:
1412
runs-on: windows-latest
@@ -19,13 +17,13 @@ jobs:
1917
steps:
2018
- name: Checkout code
2119
uses: actions/checkout@v3
22-
20+
2321
- name: Setup MSBuild
2422
uses: microsoft/setup-msbuild@v1
25-
23+
2624
- name: Check Chocolatey installation
2725
run: choco --version
28-
26+
2927
- name: Install Visual Studio 2022 dependencies
3028
run: |
3129
choco install visualstudio2022-workload-manageddesktop -y
@@ -39,14 +37,41 @@ jobs:
3937
4038
choco install windowsdriverkit11 -y
4139
if ($LASTEXITCODE -ne 0) { exit 1 }
42-
40+
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+
60+
# Fix the string conversion warning treated as error
61+
- name: Fix string conversion in Driver.cpp
62+
run: |
63+
$filePath = "Virtual Display Driver (HDR)/MttVDD/Driver.cpp"
64+
$content = Get-Content -Path $filePath -Raw
65+
$content = $content -replace 'string edidPath\(edidname\.begin\(\), edidname\.end\(\)\);', 'string edidPath = WStringToString(edidname);'
66+
Set-Content -Path $filePath -Value $content
67+
4368
- name: Build the driver
4469
run: |
4570
msbuild "Virtual Display Driver (HDR)/MTTVDD.sln" /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }}
46-
71+
4772
- name: List build directory
4873
run: dir "Virtual Display Driver (HDR)\${{ matrix.platform }}\${{ matrix.configuration }}\MttVDD"
49-
74+
5075
- name: Upload built driver
5176
id: upload_artifact
5277
uses: actions/upload-artifact@v4
@@ -57,17 +82,16 @@ jobs:
5782
Virtual Display Driver (HDR)\${{ matrix.platform }}\${{ matrix.configuration }}\MttVDD\MttVDD.inf
5883
Virtual Display Driver (HDR)\${{ matrix.platform }}\${{ matrix.configuration }}\MttVDD\mttvdd.cat
5984
Virtual Display Driver (HDR)\${{ matrix.platform }}\${{ matrix.configuration }}\MttVDD\vdd_settings.xml
60-
85+
6186
- name: Generate release tag
6287
id: generate_tag
6388
run: |
6489
$releaseTag = (Get-Date).ToString('yy.MM.dd')
6590
echo "RELEASE_TAG=$releaseTag" >> $env:GITHUB_ENV
66-
91+
6792
- name: Show generated release tag
6893
run: |
6994
echo "Generated Release Tag: ${{ env.RELEASE_TAG }}"
7095
7196
- name: Verify Built Artifacts
7297
run: dir 'Virtual Display Driver (HDR)\${{ matrix.platform }}\${{ matrix.configuration }}\MttVDD'
73-

0 commit comments

Comments
 (0)