Skip to content

Commit eba1a29

Browse files
authored
Merge pull request #32 from micREsoft/fix-actions
Fix broken GitHub Actions release for Bind
2 parents 5d9af0d + af31016 commit eba1a29

2 files changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,14 +208,42 @@ jobs:
208208
$rccInput = "src/Res/resources.qrc"
209209
$rccOutput = "GeneratedFiles/qrc_resources.cpp"
210210
if (Test-Path $rccInput) {
211+
Write-Host "RCC Input: $rccInput"
212+
Write-Host "RCC Output: $rccOutput"
213+
Write-Host "Current directory: $(Get-Location)"
214+
215+
Write-Host "Verifying resource files..."
216+
$qrcContent = Get-Content $rccInput -Raw
217+
if ($qrcContent -match '<file>(.*?)</file>') {
218+
$resourceFiles = [regex]::Matches($qrcContent, '<file>(.*?)</file>') | ForEach-Object { $_.Groups[1].Value }
219+
$qrcDir = Split-Path (Resolve-Path $rccInput) -Parent
220+
foreach ($resFile in $resourceFiles) {
221+
$fullPath = Join-Path $qrcDir $resFile
222+
$fullPath = [System.IO.Path]::GetFullPath($fullPath)
223+
if (Test-Path $fullPath) {
224+
Write-Host " Found: $resFile"
225+
} else {
226+
Write-Host " WARNING: Missing resource file: $resFile (expected at: $fullPath)"
227+
}
228+
}
229+
}
230+
211231
& $rccPath -name resources $rccInput -o $rccOutput
212232
if ($LASTEXITCODE -eq 0) {
213233
Write-Host "Successfully generated RCC file: $rccOutput"
234+
if (Test-Path $rccOutput) {
235+
$fileSize = (Get-Item $rccOutput).Length
236+
Write-Host "RCC file size: $fileSize bytes"
237+
}
214238
} else {
215239
Write-Host "RCC generation failed with exit code: $LASTEXITCODE"
240+
Write-Host "RCC command: $rccPath -name resources $rccInput -o $rccOutput"
216241
}
217242
} else {
218243
Write-Host "RCC input file not found: $rccInput"
244+
Write-Host "Current directory: $(Get-Location)"
245+
Write-Host "Files in current directory:"
246+
Get-ChildItem -Recurse -Filter "resources.qrc" | ForEach-Object { Write-Host " Found: $($_.FullName)" }
219247
}
220248
} else {
221249
Write-Host "RCC tool not found, skipping resource compilation"

Bind/Bind.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@
185185
<ClCompile Include="GeneratedFiles\moc_Compatibility.cpp" />
186186
<ClCompile Include="GeneratedFiles\moc_Validator.cpp" />
187187
<ClCompile Include="GeneratedFiles\moc_Verification.cpp" />
188+
<ClCompile Include="GeneratedFiles\qrc_resources.cpp" />
188189
</ItemGroup>
189190
<ItemGroup>
190191
<QtMoc Include="include\Core\Integrity\Compatibility\Compatibility.h">

0 commit comments

Comments
 (0)