From d2ef2acc1a58ef5c2006c224fa90aec9c77c4399 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simo=20F=C3=A4lt?= Date: Fri, 15 Jun 2018 12:49:28 +0300 Subject: Extract Qt Win dependencies to be included in wheels Task-number: PYSIDE-696 Change-Id: I20a4f80acceee5c056217a6c92e3b494ec34020d Reviewed-by: Alexandru Croitor --- build_scripts/main.py | 3 +++ build_scripts/platforms/windows_desktop.py | 23 +++++++++++++++++++++++ 2 files changed, 26 insertions(+) (limited to 'build_scripts') diff --git a/build_scripts/main.py b/build_scripts/main.py index 616cff600..8d3a58eb0 100644 --- a/build_scripts/main.py +++ b/build_scripts/main.py @@ -466,6 +466,7 @@ class PysideBuild(_build): self.py_include_dir = None self.py_library = None self.py_version = None + self.py_arch = None self.build_type = "Release" self.qtinfo = None self.build_tests = False @@ -474,6 +475,7 @@ class PysideBuild(_build): prepare_build() platform_arch = platform.architecture()[0] log.info("Python architecture is {}".format(platform_arch)) + self.py_arch = platform_arch[:-3] build_type = "Debug" if OPTION_DEBUG else "Release" if OPTION_RELWITHDEBINFO: @@ -1139,6 +1141,7 @@ class PysideBuild(_build): "qt_prefix_dir": self.qtinfo.prefix_dir, "qt_translations_dir": self.qtinfo.translations_dir, "qt_qml_dir": self.qtinfo.qml_dir, + "target_arch": self.py_arch, } os.chdir(self.script_dir) diff --git a/build_scripts/platforms/windows_desktop.py b/build_scripts/platforms/windows_desktop.py index f4b4aed6e..3bf386a17 100644 --- a/build_scripts/platforms/windows_desktop.py +++ b/build_scripts/platforms/windows_desktop.py @@ -42,6 +42,8 @@ import os, re, sys from ..options import * from ..utils import copydir, copyfile, rmtree, makefile from ..utils import regenerate_qt_resources, filter_match +from ..utils import download_and_extract_7z + def prepare_packages_win32(self, vars): # For now, debug symbols will not be shipped into the package. copy_pdbs = False @@ -187,6 +189,16 @@ def prepare_packages_win32(self, vars): "lconvert.exe", "qtdiag.exe" ] + # MSVC redistributable + msvc_redist = [ + "concrt140.dll", + "msvcp140.dll", + "ucrtbase.dll", + "vcamp140.dll", + "vccorlib140.dll", + "vcomp140.dll" , + "vcruntime140.dll" + ] # Choose which EGL library variants to copy. qt_artifacts_egl = [ @@ -201,6 +213,17 @@ def prepare_packages_win32(self, vars): egl_suffix = '' qt_artifacts_egl = [a.format(egl_suffix) for a in qt_artifacts_egl] qt_artifacts_permanent += qt_artifacts_egl + qt_artifacts_permanent += msvc_redist + + # Extract Qt dependency dll's when building on Qt CI + # There is no proper CI env variable, so using agent launch params + in_coin = os.environ.get('COIN_LAUNCH_PARAMETERS', None) + if in_coin is not None: + redist_url = "http://download.qt.io/development_releases/prebuilt/vcredist//" + zip_file = "pyside_qt_deps_64.7z" + if "{target_arch}".format(**vars) == "32": + zip_file = "pyside_qt_deps_32.7z" + download_and_extract_7z(redist_url + zip_file, "{qt_bin_dir}".format(**vars)) copydir("{qt_bin_dir}", "{pyside_package_dir}/PySide2", filter=qt_artifacts_permanent, -- cgit v1.2.3