Generate qmltypes files with the help of qmlplugindump executed on a %{OsVariant} Emulator.

Due to the way it works, running qmlplugindump under build environment is not always possible. Usually, it is necessary to deploy binaries to a target and invoke qmlplugindump there in order to update qmltypes files.

This command makes this task less cumbersome, using a %{OsVariant} Emulator as the target environment, deploying the locally built packages automatically (unless overriden with '--no-deploy') and restoring the emulator to its original state when finished (unless overriden with '--no-restore-emulator').

It relies on the following convention:

[verse]
--
Every '*.qmltypes' file known to Git can be updated simply
by running `make qmltypes` under the containing directory
--

If you are adding a new qmltypes file, start by creating and empty file and adding it to Git index. Only files known to Git are recognized by this tool.

The 'qmltypes' make target is supposed to invoke qmlplugindump in the same way as if the respective QML modules were already installed system-wide - the recipe will be executed inside a %{OsVariant} Emulator after installing the respective packages.

Example how to achieve this with qmake-based projects:

    qmltypes.commands = \
        qmlplugindump -nonrelocatable org.example 1.0 \
            > $$PWD/plugins.qmltypes
    QMAKE_EXTRA_TARGETS += qmltypes

After successful execution, the emulator will be restored to its original state unless overriden with '--no-restore-emulator'. On failure, the emulator will be left in the modified state and can be restored manually with the '--restore-emulator' option at any time later.

The qmlplugindump tool is known to produce incomplete (or otherwise corrupted) results for some QML modules. For that reason it may be necessary to maintain manual additions in the generated qmltypes file, which implies the need to deal with unwanted deletion of these additions every time the qmltypes file is regenerated. In order to avoid that, the "sdk-make-qmltypes:keep" directive can be used in comments immediatelly preceding each manually added statement.  If the difference introduced by running qmlplugindump consists of nothing but removal of statements marked this way, sfdk will automatically revert such changes for your convenience (unless overriden with the '--no-keep' option).
