From 158e5b729c6379f1e3bec64b7e3c4a7aa7cf06a5 Mon Sep 17 00:00:00 2001 From: Tobias Markmann Date: Thu, 17 May 2018 16:55:13 +0200 Subject: Add support for QtWebKit 5.6 and newer to packaging on Windows Qt's windeployqt tool does not know about QtWebKit's dependencies, as it is not shipped together anymore and QtWebKit is not maintained by the same maintainers as Qt anymore. Test-Information: With this patch ./scons dist=1 on Windows with latest Qt 5.10 and QtWebKit 5.212.0 Alpha 2 creates a Swift/QtUI/Swift directory with a running Swift.exe inside. Without this patch Swift.exe crashes due to missing libxml2.dll and missing libxslt.dll. Change-Id: I2f8e658bf417bde20648618bac19b1c148831e1e diff --git a/BuildTools/SCons/Tools/WindowsBundle.py b/BuildTools/SCons/Tools/WindowsBundle.py index 20d41ff..b0f7772 100644 --- a/BuildTools/SCons/Tools/WindowsBundle.py +++ b/BuildTools/SCons/Tools/WindowsBundle.py @@ -83,6 +83,19 @@ def generate(env) : qtmappings = captureWinDeployQtMapping() assert(qtmappings) + # Add QtWebKit dependencies. + # This is needed as QtWebKit since 5.6 is developed and released seperately + # of Qt and windeployqt does not know about its dependencies anymore. + for map_from, map_to in qtmappings: + if map_to == "Qt5WebKit.dll": + # hidden Qt5WebKit dependencies + hidden_dependencies = ["libxml2.dll", "libxslt.dll"] + for dependency in hidden_dependencies: + dependency_from_path = os.path.join(env["QTDIR"], "bin", dependency) + if os.path.isfile(dependency_from_path): + qtmappings.append((dependency_from_path, dependency)) + break + # handle core DLLs qt_corelib_regex = re.compile(ur".*bin.*\\(.*)\.dll") @@ -119,4 +132,3 @@ def generate(env) : def exists(env) : return env["PLATFORM"] == "win32" - -- cgit v0.10.2-6-g49f6