How to deploy qml application on machine (Windows XP) without QtSDK



  • I created small test qml project. I have small main.qml file:

    @import QtQuick 1.0
    import com.nokia.symbian 1.0

    Rectangle {
    id: main
    width: 320
    height: 480
    color: "orange"

    Button
    {
        text: "click"
    }
    

    }
    @

    I add next line in my QMLTest.pro file:

    @QML_IMPORT_PATH = C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\imports@

    main.cpp file looks like this:

    @#include <QtGui/QApplication>
    #include "qmlapplicationviewer.h"

    Q_DECL_EXPORT int main(int argc, char *argv[])
    {
    QScopedPointer<QApplication> app(createApplication(argc, argv));

    QmlApplicationViewer viewer;
    
    viewer.addImportPath("C:\\QtSDK\\Desktop\\Qt\\4.7.4\\msvc2008\\imports");
    viewer.setOrientation(QmlApplicationViewer::ScreenOrientationAuto);
    viewer.setMainQmlFile&#40;QLatin1String("qml/QMLTest/main.qml"&#41;);
    viewer.showExpanded();
    
    return app->exec&#40;&#41;;
    

    }@

    The structure of catalog looks like:

    @QMLTest
    |
    ----QMLTest.exe
    |
    ----qml
    |
    ----QMLTest
    |
    ----main.qml@

    When I launched the QMLTest.exe on my developing machine, I saw a button on an orange background.
    Then I made next actions:

    comment next line in main.cpp:

    // viewer.addImportPath("C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\imports");

    comment next line in QMLTest.pro file:

    #QML_IMPORT_PATH = C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\imports

    copy folder "com" from C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\imports to "QMLTest/qml/QMLTest" folder

    The structure of catalog looks like:

    @QMLTest
    |
    ----QMLTest.exe
    |
    ----qml
    |
    ----QMLTest
    |
    ----main.qml
    |
    ----com
    |
    ----nokia
    |
    ----symbian
    |
    ----Button.qml and others@

    When I launched the QMLTest.exe on my developing machine, I saw a button on an orange background.

    I add QtCore4.dll, QtDeclarative4.dll, QtGui4.dll, QtNetwork4.dll, QtScript4.dll, QtSql4.dll, QtXmlPatterns4.dll
    The structure of catalog on virtual machine looks like:

    @QMLTest
    |
    ----QMLTest.exe
    |
    ----QtCore4.dll, QtDeclarative4.dll, QtGui4.dll, QtNetwork4.dll, QtScript4.dll, QtSql4.dll, QtXmlPatterns4.dll
    |
    ----qml
    |
    ----QMLTest
    |
    ----main.qml
    |
    ----com
    |
    ----nokia
    |
    ----symbian
    |
    ----Button.qml and others@

    When I launched the QMLTest.exe on virtual machine (windows XP), I saw white window without button.
    I copy qmlviewer.exe and QtOpenGL4.dll from C:\QtSDK\Desktop\Qt\4.8.0\msvc2010\bin (developing machine) to QMLTest folder

    on virtual machine. Then I add QML_IMPORT_TRACE enviroment variable with value 1 and run qmlviewer:

    ...
    QDeclarativeImports(file:///C:/QMLTest/qml/QMLTest/main.qml)::addImport: "." -1.-1 File as ""
    QDeclarativeImports(file:///C:/QMLTest/qml/QMLTest/main.qml)::addImport: "QtQuick" 1.0 Library as ""
    QDeclarativeImports(file:///C:/QMLTest/qml/QMLTest/main.qml)::addImport: "com/nokia/symbian" -1.-1 File as ""
    QDeclarativeImportDatabase::importPlugin: "qml.QMLTest.com.nokia.symbian" from

    "C:/QMLTest/qml/QMLTest/com/nokia/symbian/symbianplugin_1_0.dll"
    file:///C:/QMLTest/qml/QMLTest/main.qml:3:1: plugin cannot be loaded for module "qml.QMLTest.com.nokia.symbian": Cannot load

    library C:/QMLTest/qml/QMLTest/com/nokia/symbian/symbianplugin_1_0.dll: ?? ?????? ????????? ??????.
    import "com/nokia/symbian"

    Any ideas?



  • The sure thing is that you try to use the Symbian Components at an application that targets Desktop (Windows). It sounds enough for me. You have to find an other plugin that will replace the Symbian components that you try to use or you have to create them by your own. A project that i know of that you can use is "Qt Quick Colibri":https://projects.developer.nokia.com/colibri .



  • It's working on developing machine (Windows 7). Thanks for the Colibri project. I didn't know about it.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.