[Interest] .rcc files and modules
Jérôme Godbout
jerome at bodycad.com
Mon Jun 29 22:09:05 CEST 2015
Hi,
I'm looking for a way to load a specific resources files (.rcc) when a
modules or a plugins is used.
Small example:
Module A (qml module with qmldir that include plugin A)
Plugin A (c++ implementation for some part of Module A)
A.rcc (would be the required resources for module A made with the ressource
compiler)
I would like to register A.rcc (QResource::registerResource()) when the
engine start loading module A or plugin A. We have many modules and not all
them will be used. Right now, the only way is to gather all resources when
packaging the application and the executable to load all of them uppon
starting (which slow down boot and load many unused resources for that
application run).
We use the same executable for all applications and only the start script
is different. We can deploy our application in plugin model (core package
contain main lib and executable), other application just add the necessary
modules/plugins and a startup script. But that also make the application
have many unnecessary resources available that I would rather not load them
all (they are already split with proper prefix to avoid name clashing).
Anybody know of a way to do this? Any signal sent somwhere (looked at
QJSEngine, QQmlEngine and QQmlApplicationEngine without any luck).
Essentially I would like a signal before load a module/plugin name and
version.
The only way I see is to determine which modules/plugins are required from
qml main script (we already have a script walker that does this for
packaging purpose) and generate a list of used modules/plugins that need to
load resources for a particular application. The main script come with it's
own list of resources.
Anybody have a better way to release resources/modules/plugins?
Thanks,
Jerome
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20150629/d2039ccf/attachment.html>
More information about the Interest
mailing list