Forums

OverviewV-Play 2 Support (Qt 5) › VPlay as a shared library

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #11850

    spike

    Hi,

    I have written a library to share functionality which is used by my game and a seperate program. Now, that library

    uses V-Play components for obvious reasons.

    Before using V-Play in my library I could simply generate the qmltypes file by following this instructions:

    http://doc.qt.io/qt-5/qtqml-modules-qmldir.html#writing-a-qmltypes-file

    This does no longer work when depending on V-Play.

    I need the library in the qml module folder:

    $VPLAYSDK$/5.5/gcc_64/qml/VPlay/

    Copying the library from

    $VPLAYSDK$/5.5/gcc_64/lib/libVPlay.a

    is no problem.

    But because (in my opinion) of a bug in qmlplugindump it does not work with static libraries.

    Now, if I’m not totally wrong here and it’s really a bug, how can I get it to work? Would it be possible to provide a libVPlay.so for the time being?

     

    Thanks in advance.

     

    #11853

    Alex
    V-Play Team

    Hi Josh,

    Interesting question, here is some information:

    First of all, the qmlplugindump tool loads a dynamic library at runtime and searches for properties, methods and signals with the help of the QMetaObject methods. That requires the tool to use a shared runtime library, dumping a static library is not possible. So I don’t think that’s a bug, that’s just a technical restriction.

    Back to your topic: What’s the error you’re experiencing with qmlplugindump and V-Play? V-Play ships with stub QML files in the qml/V-Play subdirectory which should be enough for the tool to work.

    Thanks,

    Alex

    #11855

    spike

    Thanks for the fast answer.

    The complete output of qmlplugindump is:

    parsing <outputOfQmlimportscanner> skipping My.Module
    appending dependency VPlay 2.0
    appending dependency QtQuick 2.0
    appending dependency QtQuick 2.2
    appending dependency QtQuick.Controls.Styles 1.4
    appending dependency QtQuick.Controls 1.4
    appending dependency QtQuick.Window 2.2
    appending dependency QtMultimedia 5.0
    appending dependency QtMultimedia 5.4
    appending dependency QtQuick.Controls 1.1
    appending dependency QtQuick.Controls.Styles 1.1
    appending dependency QtQuick.Window 2.1
    appending dependency QtQuick.LocalStorage 2.0
    appending dependency QtQuick.Controls 1.0
    appending dependency QtQuick.Controls.Styles 1.0
    appending dependency QtQuick.Particles 2.0
    appending dependency QtGraphicalEffects 1.0
    appending dependency Qt3D 2.0
    appending dependency Qt3D.Renderer 2.0
    appending dependency QtQuick.Scene3D 2.0
    appending dependency QtQuick 2.4
    appending dependency QtQuick.Controls 1.2
    appending dependency QtQuick.Layouts 1.1
    appending dependency QtQuick.Controls 1.3
    appending dependency QtQuick.Controls.Styles 1.2
    appending dependency QtQuick.Controls.Styles 1.3
    skipping private dependecy QtQuick.Controls.Private 1.0
    skipping private dependecy QtQuick.Extras.Private 1.0
    appending dependency QtQuick.Extras 1.4
    appending dependency QtQuick.Extras.Private.CppUtils 1.0
    appending dependency QtQuick.Extras.Private.CppUtils 1.1
    appending dependency QtQuick 2.5
    appending dependency QtQuick.Layouts 1.0
    appending dependency QtQml.Models 2.2
    appending dependency QtQuick 2.1
    appending dependency HelperWidgets 2.0
    QQmlComponent: Component is not ready
    file:///home/supaiku/V-PlaySDK/5.5/gcc_64/qml/loaddependencies.qml:18:1: module "VPlay" plugin "VPlay" not found

     

    The VPlay subdirectory contains:

    $ ls qml/VPlay
    audio
    core
    editor
    gamenetwork
    input
    level
    particles
    physics
    qmldir
    rube
    slotmachine
    sprites
    video
    vplay.qmltypes

     

    My qmlplugindump call looks like this:

    qmlplugindump -v $typeinfo $version $source > $dest/$typeinfo.qmltypes

    $source points to the same parent folder in which the VPlay module resides. (My library is copied there beforehand).

    $dest looks like $source/My/Module

     

    Thanks for helping out.

     

    #11862

    Alex
    V-Play Team

    I see. You can try the following:

    1. Open the file /home/supaiku/V-PlaySDK/5.5/gcc_64/qml/qmldir

    2. Change the second line to

    # plugin VPlay # only set for SDK deployment

    (add the “#” to comment the line out)

    Does this solve the issue?

    Best,

    Alex

    #11877

    spike

    Hi Alex,

    this does indeed solve my problem.

    Many thanks.

Viewing 5 posts - 1 through 5 (of 5 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support