Details
-
Bug
-
Resolution: Unresolved
-
P2: Important
-
None
-
6.7.3, 6.8.0 Beta3
-
None
-
4fc0afc2b (dev), 840ceeb2c (6.8), 51bdf2dcc (6.7)
Description
Originally filed at QTBUG-127835
There is an example in qtdocs called lightningviewer that does not launch after installation and deployment.
The issue is that:
- there is an executable that is not a qml module
- the executable loads Main.qml from another shared library LitghtningViewer qml module.
- none of the qml files explicitly import the custom qml modules LightningViewer and LightningViewerStyle
- the executable does link against the qml module backing libraries, but that is not considered for deployment or qml tooling
- the automatic build-time qmlimportscanner run, doesn't include those qml modules for deployment because they are not referenced by any qml code, and the deployed app fails to launch.
This can be worked around by either adding a dummy qml file that imports those qml modules, or by switching the shared libraries to be static ones and link to them, thus avoiding deployment, or changing the executable to be a qml module with a qml file that explicitly one of the other qml modules, so that qmlimportscanner sees that.
Ideally though, the backing library linking relationship should be seen by the deployment implementation, and it include in the consideration of which qml modules are to be deployed.
In case if there is a project where the executable is not a qml module on purpose and doesn't link to the other qml modules at all, fully relying on runtime imports, then there is a lack of intent on what needs to be deployed, which would need to be handled by one of the above work arounds, or introducing some new explicit api to handle that.
Attachments
Issue Links
- resulted from
-
QTBUG-127835 demos/lightningviewer not launching when installed outside of build dir
-
- Closed
-
Gerrit Reviews
For Gerrit Dashboard: QTBUG-128225 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
582850,6 | WIP: CMake: Try to fix deployment of lightningviewer example | dev | qt/qtdoc | Status: DEFERRED | -2 | 0 |
583551,5 | CMake: Alternative fix of deployment for lightningviewer example | dev | qt/qtdoc | Status: MERGED | +2 | 0 |
584298,2 | CMake: Alternative fix of deployment for lightningviewer example | 6.8 | qt/qtdoc | Status: MERGED | +2 | 0 |
584397,2 | CMake: Alternative fix of deployment for lightningviewer example | 6.7 | qt/qtdoc | Status: MERGED | +2 | 0 |