From 3ea5fedfa3cc2620a80a38dbcae42c09d92b018c Mon Sep 17 00:00:00 2001 From: oop7 <110548351+oop7@users.noreply.github.com> Date: Tue, 3 Feb 2026 15:20:09 +0200 Subject: [PATCH] Remove Qt DLLs from PySide6 and suppress errors Add -ErrorAction SilentlyContinue to Get-ChildItem calls and add a check for a lib\PySide6 folder to remove matching Qt DLLs there as well. This prevents failures when no files match the patterns and ensures duplicate Qt DLLs packaged under PySide6 are cleaned up. Applied to both DLL-cleanup sections of the Windows build workflow. --- .github/workflows/build-windows.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 51af56a..42a554e 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -229,7 +229,12 @@ jobs: # Remove any duplicate or unnecessary DLLs (e.g., Qt6Qml, Qt6Quick, Qt6OpenGL from root lib) $bloatDlls = @("Qt6Web*", "Qt6Pdf*", "Qt6Qml*", "Qt6Quick*", "Qt6VirtualKeyboard*", "Qt6OpenGL*") foreach ($pattern in $bloatDlls) { - Get-ChildItem -Path $libDir -Filter $pattern | Remove-Item -Force + # Check in root lib + Get-ChildItem -Path $libDir -Filter $pattern -ErrorAction SilentlyContinue | Remove-Item -Force + # Check in PySide6 folder + if (Test-Path "$libDir\PySide6") { + Get-ChildItem -Path "$libDir\PySide6" -Filter $pattern -ErrorAction SilentlyContinue | Remove-Item -Force + } } Write-Host "Removed unnecessary Qt DLLs" @@ -373,7 +378,12 @@ jobs: # Remove any duplicate or unnecessary DLLs (e.g., Qt6Qml, Qt6Quick, Qt6OpenGL from root lib) $bloatDlls = @("Qt6Web*", "Qt6Pdf*", "Qt6Qml*", "Qt6Quick*", "Qt6VirtualKeyboard*", "Qt6OpenGL*") foreach ($pattern in $bloatDlls) { - Get-ChildItem -Path $libDir -Filter $pattern | Remove-Item -Force + # Check in root lib + Get-ChildItem -Path $libDir -Filter $pattern -ErrorAction SilentlyContinue | Remove-Item -Force + # Check in PySide6 folder + if (Test-Path "$libDir\PySide6") { + Get-ChildItem -Path "$libDir\PySide6" -Filter $pattern -ErrorAction SilentlyContinue | Remove-Item -Force + } } Write-Host "Removed unnecessary Qt DLLs"