[Solved] DEPLOYMENTFOLDERS in .pro working in simulator,symbian but not maemo,meego



  • Hello there everyone

    I hope someone could help me with Qt
    
    I have some files that are in resourc directory under my project.
    
    
    I have added the following in my project.pro
    

    @
    dir1.source = resourc*
    DEPLOYMENTFOLDERS = dir1
    @
    Working nice on Symbian, Simulator..ie, image files appears in my app.

    In maemo "N900", I can see the files in terminal,(it's in opt/appname/bin and all resources are in opt/appname ) but It's not opening in my app, the app can't see the file, also I have managed to make everything in one folder,ie resources and bin in one folder, but still nothing happen, Maybe we have to change the working directory of the application or something?
    
    In meego "N950" it's even worse, I can't run the app on N950.
    

    @
    :-1: error: [copydeploymentfolders] Error 1
    File Not Found
    @
    I hope someone can help me,

    Also I have deployment.pri but not touched.
    
    Before adding some files the app was working nice on N950, but now this error came in.
    
    Thank you.


  • Hi there,

    My guess was right, it's the working directory that was wrong, I solved the problem related to maemo N900, but still N950 with the build issue. I'll search in this too, anyways here is the N900 maemo solution, add this code in main, first
    @
    #include <QDir>
    @

    and then just under this line

    @ QApplication app(argc, argv);@

    I added these so it looks like this

    @int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);
    QDir dir(QCoreApplication::applicationDirPath());
    #if defined(Q_WS_MAEMO_5)
    if (dir.dirName().toLower() == "bin")
    {
    dir.cdUp();
    }

    #endif
    QDir::setCurrent(dir.absolutePath());
    // rest of main
    return app.exec();
    

    }@



  • Hello guys, I solved the problem for N950 also and Harmattan in general, this is the modified .pro.

    @unix {
    dir1.files = resourc/*
    dir1.path = /opt/$${TARGET}
    INSTALLS += dir1
    } else {
    dir1.source += resourc/*
    DEPLOYMENTFOLDERS = dir1
    }@

    Thanks to the guy "over here":http://forum.meego.com/showthread.php?p=30569#post30569.


  • Moderators

    Glad it's working for you now! Be sure and edit the thread title to add [Solved]. Thanks!



  • Thanks, Done the editing.



  • The INSTALLS directive won't install the additional files on Symbian?


Log in to reply
 

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