Details
-
Technical task
-
Resolution: Done
-
P2: Important
-
None
-
Qt6 Installer Sprint 7, Qt6 Installer Sprint 8
Description
The package layout needs to match with Qt's package layout for the given platform configuration.
Also it's possible to deploy with different generators. Study the alternatives.
"deploy" generator findings:
def deploy(self): self.copy("*") # (1) copy from current package self.copy_deps("*") # (2) copy from dependencies
MP Qt module:
When invoking conan install from command line using full conan reference:
$ conan install qtmodule/1.2.3@qt/final --build=missing --build=qtmodule -if=/destination/directory
- (1) is enough to copy everything from the built Conan package to destination directory. The deploy layout is the same as in the created conan package plus manifest files are added to the root directory. The transitive dependencies are not deployed with plain (1).
- (2) to include transitive dependencies also the (2) is required. Note, these are Conan dependencies only! If deploying outside Qt binary installation the essential Qt binaries are not included!
- To include the full Qt installation the deploy method needs to copy files from QT_INSTALL_PREFIX (can be parsed from 'qmake -query')
- TODO: is it known inside the recipe what '--install-folder' was given from command line?
- To include the full Qt installation the deploy method needs to copy files from QT_INSTALL_PREFIX (can be parsed from 'qmake -query')
When invoking conan install from command line without conan reference i.e. the current dir contains conanfile.txt/conanfile.py:
$ conan install . --build=missing --build=qtmodule -if=/destination/directory
- only the dependencies declared in conanfile.txt/conanfile.py are built, not the module itself
- the dependencies are deployed differently, each dependency is deployed to subdirectory named by the module
- all the generators create .sh/.cmake scripts for further inclusion of the consumer app but the paths point to Cache instead of the deployed target directory
- to include deployed binaries from subdirectories further packaging steps may be needed so that consumer app can use those
Consumer for MP module(s):
- If using conan.cmake macro it writes temporary 'conanfile.txt' that contains the dependencies and invokes the 'conan install .' i.e. all dependencies are deployed to individual subdirectories named by the dependency module names.
- Using 'conan install .' directly (consumer app needs to write conanfile.txt to declare required dependencies) has the same effect
- Using 'conan install <conan package reference>' will deploy files without subdirectory layout
- cons: the consumer app needs to run 'conan install' for each direct dependency module, not very handy