[Development] androiddeployqt - how it works or should work?
qt-project at b2-4ac.com
Mon Nov 4 14:34:25 CET 2013
Thank you. You literally answered all my questions... but I have more ;)
I included the "QT += network sql" to my project file and on further
inspection of the "compile output" it seems that the way it works is that
it will include any plugins that has all the dependencies match. Is that
how it works "now"?
I saw "Appending dependency from xml:....". What is this "xml" in this
case? Is the libs.xml android\res\values the "input" or "output" of this
process? If it is the output, what is the input?
I am sure that it is already in the plans (or if not for some good reason)
but just in case: it would be very helpful if we could have the
"androiddeployqt" or qtcreator detect the "required dependencies" based on
the "import statements" on the qml and automatically include them or at
least spit a "building error". I know it can't be 100% effective since it
probably won't be able to detect "exactly" what qml files are being used
and you can also have some embedded code stored as strings used to create
components on the fly that probably would be very hard to find/parse but it
would cover the "most common cases".
Thank you again!
On Mon, Nov 4, 2013 at 4:35 AM, Eskil Abrahamsen Blomfeldt <
eskil.abrahamsen-blomfeldt at digia.com> wrote:
> On 11/01/2013 07:01 PM, Felipe Crochik wrote:
> I understand androiddeployqt is supposed to separate the "deployment"
> from qt but to be honest so far it seems to be harder than before -
> probably because I just don't know how is supposed to work.
> Before you would have all the "android files" added to your project and
> could control them with the *.pro file and macros.
> If I am guessing right, now anything that is specific to android is
> "auto generated" and if the developer wants to customize he has to add to
> the project and add something like "ANDROID_PACKAGE_SOURCE_DIR =
> $$PWD/android" to the tell the tool to copy these files over the auto
> generated ones.
> Is there any documentation for how to control androiddeployqt? A few
> things that I couldn't figure out:
> The documentation is here:
> 1. how to get rid of all the "--Added-by-androiddeployqt--" items that
> get "bundled_in_assets" ? I assume I can edit the "libs.xml" but not sure
> this is the recommended way.
> You can override the autodetected dependencies by setting the
> variable in your .pro file. If you do this, then you will not benefit from
> the auto-detection and will need to list all the dependencies yourself.
> Note that right now, androiddeployqt will bundle all the QML imports which
> are supported by your application's module dependencies. In the future,
> only the imports which are actually used by your QML files will be included.
> 2. creating a "custom" AndroidManifest.xml file is something that I
> imagine will happen quite often but it seems that the file includes things
> that are auto generated. Is there any mechanism in place to merge "my
> version" with the changes from the tool?
> Take the AndroidManifest.xml template from Qt
> ($QT/src/android/java/AndroidManifest.xml), put it in a folder in your
> project and set this folder as the ANDROID_PACKAGE_SOURCE_DIR in your .pro
> file. Alternatively, you can click on the "Create AndroidManifest.xml"
> button in Qt Creator.
> 3. With the first qt5.2 beta all the plugins were included
> automatically. With the one today it seems that this has changed. For
> instance the qmllocalstorageplugin is not included automatically anymore.
> Is this a bug or is it something that I have to manually specify (if so,
> The plugins are included automatically, but you have to list the module
> dependencies of the plugin as dependencies of your app. For instance, since
> the local storage plugin depends on QtNetwork and QtSql, you have to add
> "QT += sql network" in your .pro file. This was also required in Qt 5.1.
> The reason for this is to avoid depending on all Qt libraries for all apps.
> When we implement scanning the actual imports used by your app, we can
> improve this for QML, and automatically include all imports that are used
> as well as their dependencies automatically. The logic will still be needed
> for regular plugins though, as there's no way to statically detect which
> plugins will be required at run-time.
> -- Eskil
> Development mailing list
> Development at qt-project.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Development