aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'build_scripts')
-rw-r--r--build_scripts/platforms/macos.py28
-rw-r--r--build_scripts/platforms/windows_desktop.py32
2 files changed, 51 insertions, 9 deletions
diff --git a/build_scripts/platforms/macos.py b/build_scripts/platforms/macos.py
index a45192667..936f4ca90 100644
--- a/build_scripts/platforms/macos.py
+++ b/build_scripts/platforms/macos.py
@@ -49,6 +49,16 @@ def prepare_standalone_package_macos(self, executables, vars):
return False
return True
+ # Filter out debug plugins and qml plugins in the
+ # debug_and_release config.
+ no_copy_debug = True
+ def file_variant_filter(file_name, file_full_path):
+ if self.qtinfo.build_type != 'debug_and_release':
+ return True
+ if file_name.endswith('_debug.dylib') and no_copy_debug:
+ return False
+ return True
+
# <qt>/lib/* -> <setup>/PySide2/Qt/lib
if self.qt_is_framework_build():
framework_built_modules = [
@@ -71,10 +81,23 @@ def prepare_standalone_package_macos(self, executables, vars):
return general_dir_filter(dir_name, parent_full_path,
dir_full_path)
+ # Filter out debug frameworks in the
+ # debug_and_release config.
+ no_copy_debug = True
+ def framework_variant_filter(file_name, file_full_path):
+ if self.qtinfo.build_type != 'debug_and_release':
+ return True
+ dir_path = os.path.dirname(file_full_path)
+ in_framework = dir_path.endswith("Versions/5")
+ if file_name.endswith('_debug') and in_framework and no_copy_debug:
+ return False
+ return True
+
copydir("{qt_lib_dir}", "{pyside_package_dir}/PySide2/Qt/lib",
recursive=True, vars=vars,
ignore=["*.la", "*.a", "*.cmake", "*.pc", "*.prl"],
- dir_filter_function=framework_dir_filter)
+ dir_filter_function=framework_dir_filter,
+ file_filter_function=framework_variant_filter)
# Fix rpath for WebEngine process executable. The already
# present rpath does not work because it assumes a symlink
@@ -102,6 +125,7 @@ def prepare_standalone_package_macos(self, executables, vars):
"{pyside_package_dir}/PySide2/Qt/lib",
filter=accepted_modules,
ignore=ignored_modules,
+ file_filter_function=file_variant_filter,
recursive=True, vars=vars, force_copy_symlinks=True)
if self.is_webengine_built(built_modules):
@@ -137,6 +161,7 @@ def prepare_standalone_package_macos(self, executables, vars):
filter=["*.dylib"],
recursive=True,
dir_filter_function=general_dir_filter,
+ file_filter_function=file_variant_filter,
vars=vars)
# <qt>/qml/* -> <setup>/PySide2/Qt/qml
@@ -146,6 +171,7 @@ def prepare_standalone_package_macos(self, executables, vars):
recursive=True,
force=False,
dir_filter_function=general_dir_filter,
+ file_filter_function=file_variant_filter,
vars=vars)
# <qt>/translations/* -> <setup>/PySide2/Qt/translations
diff --git a/build_scripts/platforms/windows_desktop.py b/build_scripts/platforms/windows_desktop.py
index 6a18659c5..f4b4aed6e 100644
--- a/build_scripts/platforms/windows_desktop.py
+++ b/build_scripts/platforms/windows_desktop.py
@@ -180,8 +180,6 @@ def prepare_packages_win32(self, vars):
qt_artifacts_permanent = [
"opengl*.dll",
"d3d*.dll",
- "libEGL*.dll",
- "libGLESv2*.dll",
"designer.exe",
"linguist.exe",
"lrelease.exe",
@@ -189,6 +187,21 @@ def prepare_packages_win32(self, vars):
"lconvert.exe",
"qtdiag.exe"
]
+
+ # Choose which EGL library variants to copy.
+ qt_artifacts_egl = [
+ "libEGL{}.dll",
+ "libGLESv2{}.dll"
+ ]
+ if self.qtinfo.build_type != 'debug_and_release':
+ egl_suffix = '*'
+ elif self.debug:
+ egl_suffix = 'd'
+ else:
+ egl_suffix = ''
+ qt_artifacts_egl = [a.format(egl_suffix) for a in qt_artifacts_egl]
+ qt_artifacts_permanent += qt_artifacts_egl
+
copydir("{qt_bin_dir}", "{pyside_package_dir}/PySide2",
filter=qt_artifacts_permanent,
recursive=False, vars=vars)
@@ -273,18 +286,21 @@ def prepare_packages_win32(self, vars):
# <qt>/qml/* -> <setup>/PySide2/qml
qml_dll_patterns = ["*{}.dll"]
qml_ignore_patterns = qml_dll_patterns + [pdb_pattern]
- # Remove the "{}" from the patterns
qml_ignore = [a.format('') for a in qml_ignore_patterns]
- if copy_pdbs:
- qml_dll_patterns += [pdb_pattern]
- qml_ignore = [a.format('') for a in qml_dll_patterns]
- qml_dll_filter = functools.partial(qt_build_config_filter,
- qml_dll_patterns)
+
+ # Copy all files that are not dlls and pdbs (.qml, qmldir).
copydir("{qt_qml_dir}", "{pyside_package_dir}/PySide2/qml",
ignore=qml_ignore,
force=False,
recursive=True,
vars=vars)
+
+ if copy_pdbs:
+ qml_dll_patterns += [pdb_pattern]
+ qml_dll_filter = functools.partial(qt_build_config_filter,
+ qml_dll_patterns)
+
+ # Copy all dlls (and possibly pdbs).
copydir("{qt_qml_dir}", "{pyside_package_dir}/PySide2/qml",
file_filter_function=qml_dll_filter,
force=False,