aboutsummaryrefslogtreecommitdiffstats
path: root/build_scripts/platforms/windows_desktop.py
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2018-05-14 13:03:57 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2018-05-14 15:54:37 +0000
commit6f894c2667c77e2580e7312d2ebed05efa7d654e (patch)
tree98dabd469abc54d72c594f56076d4e451992df08 /build_scripts/platforms/windows_desktop.py
parent601ab76776769eaec0d4fdfd4f33256d58beb114 (diff)
Reduce generated package size by removing unnecessary files
1) Don't copy pdb files for QML plugins on Windows 2) Don't copy debug variants of EGL library on Windows 3) Don't copy debug variants of shared libraries on macOS Task-number: PYSIDE-661 Change-Id: I37c701f3b12f3ad08fbdd24ab70587132ddc0c95 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'build_scripts/platforms/windows_desktop.py')
-rw-r--r--build_scripts/platforms/windows_desktop.py32
1 files changed, 24 insertions, 8 deletions
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,