diff options
author | Cristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2023-04-11 17:34:24 +0200 |
---|---|---|
committer | Cristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io> | 2023-04-12 15:22:43 +0200 |
commit | 77a3d93c83c7c485bc7347507783af59665eaa99 (patch) | |
tree | 50511a5e4f73bcfe3673886926e20a5d30352fbc /sources/pyside-tools/deploy_lib | |
parent | 504050245b02f2c4ad6cee2438230323fb06592b (diff) |
deploy: keep structure of qml files
This avoids using the filename without a directory structure
as destination directory when include them in the deployed application.
Fixes: PYSIDE-2293
Pick-to: 6.5
Change-Id: I9515c6cb63d9008fa95d6749cd6e77d595b276fc
Reviewed-by: Shyamnath Premnadh <Shyamnath.Premnadh@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Diffstat (limited to 'sources/pyside-tools/deploy_lib')
-rw-r--r-- | sources/pyside-tools/deploy_lib/nuitka_helper.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sources/pyside-tools/deploy_lib/nuitka_helper.py b/sources/pyside-tools/deploy_lib/nuitka_helper.py index cc91ab924..52670b2f9 100644 --- a/sources/pyside-tools/deploy_lib/nuitka_helper.py +++ b/sources/pyside-tools/deploy_lib/nuitka_helper.py @@ -24,8 +24,12 @@ class Nuitka: qml_args = [] if qml_files: qml_args.append("--include-qt-plugins=all") + # This will generate options for each file using: + # --include-data-files=ABSOLUTE_PATH_TO_FILE=RELATIVE_PATH_TO ROOT + # for each file. This will preserve the directory structure of QML resources. qml_args.extend( - [f"--include-data-files={qml_file}=./{qml_file.name}" for qml_file in qml_files] + [f"--include-data-files={qml_file}=./{qml_file.relative_to(source_file.parent)}" + for qml_file in qml_files] ) if excluded_qml_plugins: |