From fb85421db83a9c808bfee53aa5f1be07a51e68a0 Mon Sep 17 00:00:00 2001 From: deeplow Date: Tue, 21 Feb 2023 10:20:26 +0000 Subject: [PATCH] Fix Windows build for PySide6 (illegal file names) Building the `.msi` on Windows was failing in the `candle.exe` step due to some files in the PySide6 library being too long (PySide6/examples) or having illegal character (`+`) in their file names (PySide6/qml/QtQuick). Skipping copying these files to the `.msi` fixes the issue. Skipping `examples/` should be of no impact since they're just examples and skipping `qml/QtQuick` shouldn't cause issues because we don't use QML. Reverts commit `bbbf822` and adapts it from PySide2 to PySide6. --- install/windows/build-wxs.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/install/windows/build-wxs.py b/install/windows/build-wxs.py index 774f9f7..5c70e78 100644 --- a/install/windows/build-wxs.py +++ b/install/windows/build-wxs.py @@ -22,6 +22,15 @@ def build_data(dirname, dir_prefix, id_, name): else: id_prefix = id_ + # Skip lib/PySide6/examples folder due to ilegal file names + if "\\build\\exe.win-amd64-3.10\\lib\\PySide6\\examples" in dirname: + continue + + # Skip lib/PySide6/qml/QtQuick folder due to ilegal file names + # XXX Since we're not using Qml it should be no problem + if "\\build\\exe.win-amd64-3.10\\lib\\PySide6\\qml\\QtQuick" in dirname: + continue + id_value = f"{id_prefix}{basename.capitalize().replace('-', '_')}" data["dirs"].append( build_data(