diff options
| author | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2023-09-21 16:38:49 +0200 |
|---|---|---|
| committer | Shyamnath Premnadh <Shyamnath.Premnadh@qt.io> | 2023-10-02 16:09:50 +0200 |
| commit | 0a1710429333001fbf5a96cdc9043f9ec2f559ba (patch) | |
| tree | 6ef9cbb818c63deff81bb30b6f47680aace02c33 /sources/pyside-tools/deploy_lib/config.py | |
| parent | 0363a8799eaaa394defc8b509c4c1858584512b8 (diff) | |
Android Deployment: copy required plugins to libs
- Copy the required Qt plugins from `site_packages` of the python
bundled with the application to the `libs` folder of the Android
gradle project. Android looks for required libraries in this `libs`
folder. A similar step is also done by `androiddeployqt` when it
created an Android gradle project from a C++ application.
- Dependent Qt libraries found during processing of
pyside6-android-deploy are also copied into the `libs` folder, if it
does not exist already.
- `plugins` key added to `pysidedeploy.spec`, which represents the
plugins to be copied.
- The Android dependency files shipped with Qt for Android platforms,
are prased to obtain all the dependent Qt plugins of an application.
- Some code refactoring to facilitate the plugin and library copy,
by passing the plugin and library names to the PySide6 recipe
template. `jinja2` does the job of using this template to create
the PySide6 recipe to be used by python-for-android.
- As an addition, fix some minor code issues and add extra logging.
Task-number: PYSIDE-1612
Pick-to: 6.6
Change-Id: I63ca1e48aa1e4c98c912a87e68f3ae912ce89ca4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside-tools/deploy_lib/config.py')
| -rw-r--r-- | sources/pyside-tools/deploy_lib/config.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sources/pyside-tools/deploy_lib/config.py b/sources/pyside-tools/deploy_lib/config.py index 8af341bad..5fcc54795 100644 --- a/sources/pyside-tools/deploy_lib/config.py +++ b/sources/pyside-tools/deploy_lib/config.py @@ -172,6 +172,10 @@ class Config(BaseConfig): if self.get_value("buildozer", "local_libs"): self.local_libs = self.get_value("buildozer", "local_libs").split(",") + self._qt_plugins = [] + if self.get_value("qt", "plugins"): + self._qt_plugins = self.get_value("qt", "plugins").split(",") + self._mode = self.get_value("buildozer", "mode") def set_or_fetch(self, config_property_val, config_property_key, config_property_group="app"): @@ -292,6 +296,15 @@ class Config(BaseConfig): self.set_value("buildozer", "local_libs", ",".join(local_libs)) @property + def qt_plugins(self): + return self._qt_plugins + + @qt_plugins.setter + def qt_plugins(self, qt_plugins): + self._qt_plugins = qt_plugins + self.set_value("qt", "plugins", ",".join(qt_plugins)) + + @property def ndk_path(self): return self._ndk_path |
