QtHelpEngine not working in deployed application



  • I'm hoping someone can help me out, in my deployed application on a rather clean version of Windows 7 setupData() is failing when I try to initialize my help file. I have logged the path to the help file and it is the correct path+file. This same help works fine on my development box. Is there any additional files I need to include when deploying the help system, or... ?

    Thanks.



  • I'm not clear with your error...

    Do you need .dll lib files for your deployment?
    QtHelp Engine needs QtHelp4.dll.
    That dll also needs QtSql4.dll, QtXml4.dll, QtNetwork4.dll, QtCLucene4.dll.
    Others dll such as QtCore.dll, QtGui.dll, mingwm10.dll, libgcc_s_dw2-1.dll will be need.

    Additional lib files may be needed depend upon your usage..



  • I dont think it is a dll error, otherwise my app would not load and depends is showing me I have all the dependencies.

    Here is the error, in this code:

    @
    QDir appDir(QApplication::applicationDirPath());
    QString helpFile = appDir.absoluteFilePath("help.qhc");

    _engine = new QHelpEngine(helpFile, this);
    if( !_engine->setupData() ) // <-- fails on deployment
    {
    QMessageBox::information(this, tr("Help Load Failed"), "Failed loading the help file: " + helpFile);

    delete _engine;
    _engine = NULL;
    qDebug() << "failed to setup help.";
    return;
    }
    @

    On my development machine release and debug mode both load the file however when I deploy to a non development machine the setupData() call fails even though the help.qhc and help.qch are both at the same location as the exe.



  • If code work well on development platform, it's mostly due to error in dll deployment.

    Place all above necessary files in same folder with exe file.
    And then make a new folder namely "sqldrivers" inside same folder with exe file.

    place qsqlite4.dll file inside this folder. If you use exe compressor for exe & dll files, don't use on that file. That'll cause similar error like that.

    You can check dependent dll files with dependency checkers. But qsqlite4.dll file will not found because it needs on run time.
    Although Qt codes are same for cross platform, deployment is very different procedures.. :)



  • Ah right! I remember reading that early on during this project but it seems to have slipped the way of the dodo. I'll give it a shot. Thanks!


Log in to reply
 

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