QML modules packaging guidelines
This guidelines are meant to provide consistent naming for QML modules. The reasoning behind this scheme can be found here.Previous notes
- There are legacy modules whose specification qmldir file does not contain a module identifier directive. These are deprecated. The rest of the modules are versioned.
- QML modules are installed in $QT_INSTALL_QML which in Debian is /usr/lib/<arch triplet>/qt5/qml
- They can be nested. As an example, QtQuick.Controls is installed in $QT_INSTALL_QML/QtQuick/Controls
- Versioning can be defined either in the path or in the qmldir file itself. Multiple versions can exist in the same qmlfile, although this is not preferred by the documentation. They can even be combined.
Naming scheme, Qt 5
The naming scheme should follow the following template:qml-module-{module-name}[version]Where module-name is the lower-cased path replacing slashes with '-'. The version is optional if the version is not part of the module path, but required if it's part of it.
Examples
$QT_INSTALL_QML/foo/var/ would be packaged as qml-module-foo-var$QT_INSTALL_QML/foo/var.2/ would be packaged as qml-module-foo-var2
$QT_INSTALL_QML/foo.2/var/ would be packaged as qml-module-foo2-var
$QT_INSTALL_QML/foo2/var.2/ would be packaged as qml-module-foo2-var2
Naming scheme, Qt 6 and onwards
The naming scheme should follow the following template:qml{Qt-major}-module-{module-name}[version]This is the same as above except that {Qt-major} is added. For Qt 6 this would obviously be 6.
Examples
$QT_INSTALL_QML/foo/var/ would be packaged as qml6-module-foo-var$QT_INSTALL_QML/foo/var.2/ would be packaged as qml6-module-foo-var2
$QT_INSTALL_QML/foo.2/var/ would be packaged as qml6-module-foo2-var
$QT_INSTALL_QML/foo2/var.2/ would be packaged as qml6-module-foo2-var2