From 12ad2fce8f08b7be29afc6c8706c85b36793fc91 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 21 Jun 2022 19:05:49 +0200 Subject: build-release: Reenable partial macOS symlinking See #7252 --- scripts/dev/build_release.py | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/scripts/dev/build_release.py b/scripts/dev/build_release.py index 6337f2da3..dd75c22fd 100755 --- a/scripts/dev/build_release.py +++ b/scripts/dev/build_release.py @@ -254,18 +254,9 @@ def patch_mac_app(qt6: bool) -> None: resources_path = contents_path / 'Resources' pyqt_path = macos_path / f'PyQt{ver}' - # FIXME:qt6 Bring this back and upstream? - if qt6: - return - # Replace some duplicate files by symlinks framework_path = pyqt_path / f'Qt{ver}' / 'lib' / 'QtWebEngineCore.framework' - core_lib = framework_path / 'Versions' / ('A' if qt6 else '5') / 'QtWebEngineCore' - core_lib.unlink() - core_target = pathlib.Path(*[os.pardir] * 7, 'MacOS', 'QtWebEngineCore') - core_lib.symlink_to(core_target) - framework_resource_path = framework_path / 'Resources' for file_path in framework_resource_path.iterdir(): target = pathlib.Path(*[os.pardir] * 5, file_path.name) @@ -275,6 +266,16 @@ def patch_mac_app(qt6: bool) -> None: file_path.unlink() file_path.symlink_to(target) + if qt6: + # Symlinking QtWebEngineCore.framework does not seem to work with Qt 6. + # Also, the symlinking/moving before signing doesn't seem to be required. + return + + core_lib = framework_path / 'Versions' / '5' / 'QtWebEngineCore' + core_lib.unlink() + core_target = pathlib.Path(*[os.pardir] * 7, 'MacOS', 'QtWebEngineCore') + core_lib.symlink_to(core_target) + # Move stuff around to make things signable on macOS # See https://github.com/pyinstaller/pyinstaller/issues/6612 pyqt_path_dest = resources_path / pyqt_path.name -- cgit v1.2.3-54-g00ecf