[Development] qmlbundle vs Qt Resource System
416365416c at gmail.com
Thu Aug 8 17:59:26 CEST 2013
On Thu, Aug 8, 2013 at 12:25 AM, Koehne Kai <Kai.Koehne at digia.com> wrote:
> I'm right now having a second look at the QML deployment story, specifically at qmlbundle ... and frankly speaking I'm not sure how it compares to the Qt Resource System (.qrc/rcc). qmlbundle is something that was added in Qt 5.0 already, but since the two developers working on it have moved on there's little information about it, except for the original commit https://codereview.qt-project.org/#change,23842 .
> That's what I found out so far:
> - both rcc and qmlbundle can be used to bundle resource files (.qml, .js, images ...)
> - qrc resources can be stored in separate files (.rcc), or embedded into the executable. Qmlbundle files are always separate files (.bundle).
It was designed for the QML entry point case. It's not just that it
needs to be separate files, as there's no user executable, but it
needs to be separate files which are directly loadable by the QML
engine (and doesn't need extra resource loading boilerplate).
> - rcc can optionally compress the content (on by default).
Because qmlbundle is intended to decrease the startup time of QML
applications, the lack of this feature is probably intentional. I
doubt the overhead of decompression is less than the overhead of
loading a larger file.
> - qrc/rcc is neatly integrated into qmake/cmake/qbs for the embedded case. There's no direct support for qmlbundle in any build system (yet).
> - rcc always processes a .qrc file, while qmlbundle individually add / remove /update files to a bundle by passing them on the command line.
> - qmlbundle has 'metalinks' that you can use e.g. store stripped / processed versions of individual files.
> - Rcc has file aliases and location language selectors.
QML is gaining selectors sometime soon too ;) .
> - qmlbundle is tightly integrated into QtDeclarative, e.g. a 'qmldir' file can actually be a bundle .
> Does anyone know more about the design goals for qmlbundle, specifically why it wasn't built on top of .qrc/rcc? Are there plans (yet) on how to move on with it?
I don't know specifically about why it wasn't built on top of QRC, but
my guess is the performance cost. qmlbundle is more intended as a
performance optimization for deployed applications than a deployment
optimization, unlike QRC which just happens to make some deployed apps
As far as I'm aware, there are no real plans on how to move on with
it. Especially since no-one's working on it now, or scheduled to.
More information about the Development