@@ -145,50 +145,113 @@ jobs:
145145 id : package_components
146146 run : |
147147 Write-Output "Creating unified package for signing..."
148- $packageDir = "unified-driver-package-${{ matrix.platform }} "
149- $zipFile = "${packageDir}.zip"
148+ $packageDir = "unified-driver-package"
149+ $zipFile = "${packageDir}-${{ matrix.platform }} .zip"
150150
151- # Create package directory
151+ # Create standardized package directory structure
152152 New-Item -ItemType Directory -Path $packageDir -Force
153+ $vddPackageDir = "$packageDir\VDD"
154+ $vadPackageDir = "$packageDir\VAD"
155+ $controlPackageDir = "$packageDir\ControlPanel"
156+ New-Item -ItemType Directory -Path $vddPackageDir -Force
157+ New-Item -ItemType Directory -Path $vadPackageDir -Force
158+ New-Item -ItemType Directory -Path $controlPackageDir -Force
153159
154- # Copy VDD files
160+ # Copy VDD files with standardized structure
155161 $vddDir = "Virtual Display Driver (HDR)\${{ matrix.platform }}\${{ env.BUILD_CONFIGURATION }}\MttVDD"
156162 if (Test-Path $vddDir) {
157- Write-Output "Copying VDD files..."
158- $vddPackageDir = "$packageDir\VDD"
159- New-Item -ItemType Directory -Path $vddPackageDir -Force
163+ Write-Output "Copying VDD files from: $vddDir"
160164 Copy-Item "$vddDir\*" -Destination $vddPackageDir -Force
161- Write-Output "VDD files copied to package"
165+ $vddFiles = Get-ChildItem $vddPackageDir
166+ Write-Output "VDD files in package:"
167+ foreach ($file in $vddFiles) {
168+ Write-Output " - $($file.Name)"
169+ }
162170 } else {
163- Write-Output "Warning: VDD build directory not found"
171+ Write-Output "Warning: VDD build directory not found at: $vddDir"
172+ Write-Output "Searching for alternative VDD locations..."
173+ $altVddDirs = Get-ChildItem -Path "Virtual Display Driver (HDR)" -Recurse -Directory -Name "*MttVDD*" -ErrorAction SilentlyContinue
174+ foreach ($dir in $altVddDirs) {
175+ Write-Output " Found: Virtual Display Driver (HDR)\$dir"
176+ }
164177 }
165178
166- # Copy VAD files
179+ # Copy VAD files with consistent structure regardless of platform
167180 Write-Output "Searching for VAD files..."
168- $vadFiles = Get-ChildItem -Path "Virtual-Audio-Driver (Latest Stable)" -Recurse -Include "*.sys", "*.inf", "*.cat", "*.dll" -ErrorAction SilentlyContinue
169- if ($vadFiles.Count -gt 0) {
170- $vadPackageDir = "$packageDir\VAD"
171- New-Item -ItemType Directory -Path $vadPackageDir -Force
172- foreach ($file in $vadFiles) {
173- Copy-Item $file.FullName -Destination $vadPackageDir -Force
174- Write-Output "Copied VAD file: $($file.Name)"
181+ $vadBaseDir = "Virtual-Audio-Driver (Latest Stable)"
182+
183+ # Look for platform-specific VAD files first
184+ $vadPlatformDirs = @(
185+ "$vadBaseDir\${{ matrix.platform }}\${{ env.BUILD_CONFIGURATION }}",
186+ "$vadBaseDir\${{ matrix.platform }}\Release",
187+ "$vadBaseDir\${{ matrix.platform }}"
188+ )
189+
190+ $vadFound = $false
191+ foreach ($vadDir in $vadPlatformDirs) {
192+ if (Test-Path $vadDir) {
193+ Write-Output "Found VAD platform directory: $vadDir"
194+ $vadFiles = Get-ChildItem -Path $vadDir -Recurse -Include "*.sys", "*.inf", "*.cat", "*.dll" -ErrorAction SilentlyContinue
195+ if ($vadFiles.Count -gt 0) {
196+ foreach ($file in $vadFiles) {
197+ Copy-Item $file.FullName -Destination $vadPackageDir -Force
198+ Write-Output "Copied VAD file: $($file.Name)"
199+ }
200+ $vadFound = $true
201+ break
202+ }
175203 }
176- } else {
177- Write-Output "Warning: No VAD files found"
178204 }
179205
180- # Copy Control Panel files
206+ # If no platform-specific files found, search globally
207+ if (-not $vadFound) {
208+ Write-Output "No platform-specific VAD files found, searching globally..."
209+ $vadFiles = Get-ChildItem -Path $vadBaseDir -Recurse -Include "*.sys", "*.inf", "*.cat", "*.dll" -ErrorAction SilentlyContinue
210+ if ($vadFiles.Count -gt 0) {
211+ foreach ($file in $vadFiles) {
212+ Copy-Item $file.FullName -Destination $vadPackageDir -Force
213+ Write-Output "Copied VAD file: $($file.Name)"
214+ }
215+ $vadFound = $true
216+ }
217+ }
218+
219+ if (-not $vadFound) {
220+ Write-Output "Warning: No VAD files found for ${{ matrix.platform }}"
221+ }
222+
223+ # Copy Control Panel files (platform-independent)
181224 if (Test-Path "control-panel-publish") {
182225 Write-Output "Copying Control Panel files..."
183- $controlPackageDir = "$packageDir\ControlPanel"
184- New-Item -ItemType Directory -Path $controlPackageDir -Force
185226 Copy-Item "control-panel-publish\*" -Destination $controlPackageDir -Recurse -Force
186- Write-Output "Control Panel files copied to package"
227+ $controlFiles = Get-ChildItem $controlPackageDir
228+ Write-Output "Control Panel files in package:"
229+ foreach ($file in $controlFiles) {
230+ Write-Output " - $($file.Name)"
231+ }
187232 } else {
188233 Write-Output "Warning: Control Panel build not found"
189234 }
190235
236+ # Create standardized folder structure summary
237+ Write-Output ""
238+ Write-Output "=== Final Package Structure ==="
239+ Write-Output "Package directory: $packageDir"
240+ if (Test-Path "$packageDir\VDD") {
241+ Write-Output "VDD folder contents:"
242+ Get-ChildItem "$packageDir\VDD" | ForEach-Object { Write-Output " VDD\$($_.Name)" }
243+ }
244+ if (Test-Path "$packageDir\VAD") {
245+ Write-Output "VAD folder contents:"
246+ Get-ChildItem "$packageDir\VAD" | ForEach-Object { Write-Output " VAD\$($_.Name)" }
247+ }
248+ if (Test-Path "$packageDir\ControlPanel") {
249+ Write-Output "ControlPanel folder contents:"
250+ Get-ChildItem "$packageDir\ControlPanel" | ForEach-Object { Write-Output " ControlPanel\$($_.Name)" }
251+ }
252+
191253 # Create ZIP file
254+ Write-Output ""
192255 Write-Output "Creating ZIP file: $zipFile"
193256 Compress-Archive -Path $packageDir -DestinationPath $zipFile -Force
194257
0 commit comments