Results 1 to 19 of 19

Thread: Application deployment with assistant as help viewer

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Dec 2006
    Posts
    33
    Thanks
    10
    Thanked 5 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Application deployment with assistant as help viewer

    I am using assistant as a custom help viewer for my application, and it works fine on my machine with Qt installed. But I can't find anything in the Qt documentation about how to deploy asistant along with my application and my .qhc file to another target machine. Thanks for any help.
    Jim L
    Seattle, WA

  2. #2
    Join Date
    Dec 2006
    Posts
    33
    Thanks
    10
    Thanked 5 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application deployment with assistant as help viewer

    I managed to get assistant with all its dependencies to run on the target machine. EXCEPT, it now gives me the error message

    "The specified collection file coud not be read!"

    with no additional information.

    I should say that I'm developing on Windows/XP, VS2005 with Qt 4.4.1 commercial addition.

    If, on the target machine, I do this from the command prompt
    Qt Code:
    1. assistant -collectionFile foo.qhc
    To copy to clipboard, switch view to plain text mode 
    I get the above error message. The very same help collection file works fine on my development machine.

    Due to the under-whelming response to my initial post, I have no great expectations for any help here on this forum. But it is very frustrating that the QT documentation touts this new and improved assistant as a custom help tool, but says absolutely nothing about how to deploy it to a target machine, and evidently the QT employee(s) who monitor these forums have no knowledge either.
    Jim L
    Seattle, WA

  3. #3
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    5,372
    Thanks
    28
    Thanked 976 Times in 912 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Application deployment with assistant as help viewer

    Quote Originally Posted by jml View Post
    evidently the QT employee(s) who monitor these forums have no knowledge either.
    Qt Centre is not "monitored" by any company employees. It is run solely by volunteers. If you want help from Nokia's Qt Software division, contact the support.

  4. #4
    Join Date
    Dec 2006
    Posts
    33
    Thanks
    10
    Thanked 5 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Thumbs up Re: Application deployment with assistant as help viewer

    Well, after much conversation with Qt support, and my own sleuthing, I finally got my application to deploy successfully with assistant as a custom help viewer. For anyone interested, you need to know:

    1. The help collection file (.qhc) is an sqlite database. You need to ship
    %QTDIR%/plugins/sqldrivers/qsqlite4.dll with your application, AND it must be in the subdirectory sqldrivers. As far as the subdirectory goes, maybe it's possible to change that with qt.conf, but I don't know how.

    2. It was my impression the .qhc file had everything needed for deployment, though I don't think the QtHelp documentation says explicitly. But you also need to ship the .qch files - the intermediate files that are the output from qhelpgenerator and the input to qcollectiongenerator.


    I hope this saves someone the grief that I went through to get this to work. My impression is that QtHelp, being a new feature in Qt, isn't quite ready for prime time - at least the documentation of it isn't. Hopefully that will change in future releases.
    Jim L
    Seattle, WA

  5. The following 2 users say thank you to jml for this useful post:

    jacek (27th August 2008), MaxWedge426 (16th November 2008)

  6. #5
    Join Date
    Dec 2006
    Posts
    33
    Thanks
    10
    Thanked 5 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Thumbs down Re: Application deployment with assistant as help viewer

    Well, I've since upgraded to Qt4.4.2, and the advice in my previous post no longer works. The assistant simply exits with no error message and does nothing. .

    For all those who are considering using assistant as a custom stand-alone help viewer for applications, I have this word of advice: DON'T!!!.

    I'm very disappointed in Qt for documenting this as an option but not supporting it. I wish I had not gone down this path.
    Jim L
    Seattle, WA

  7. #6
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Application deployment with assistant as help viewer

    As far as I know this works quite fine so you must be having some deployment problems. Is your Qt taken from some binary package distribution or did you compile it yourself? What exactly happens, have you tried debugging?

  8. #7
    Join Date
    Dec 2006
    Posts
    33
    Thanks
    10
    Thanked 5 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application deployment with assistant as help viewer

    I'm using a binary distribution - I did not compile it myself.

    I'm not sure how I would go about debugging it. It's the application.exe that is not functioning - not my application.

    I have two versions of my application deployed on my machine - the same one I'm developing on running Vista, developing with Visual Studio 2005. I'm running the assistant from the command line (cygwin). Version 1 of my application was built using Qt 4.1.x, version 2 was built using Qt 4.4.2

    In the command line, if I go to C:\Program Files\myAppVersion1 and run
    > ./assistant -collectionFile myHelp.qhc
    it brings up the assistant with my help files just fine.

    But, if I set my current directory to C:\Program Files\myAppVersion2 and enter the same command, it returns to the command prompt and nothing happens.

    In both directories, if I leave out the "./" so that it runs the installed assistant in
    C:\Qt\4.4.2\bin, it works fine. I actually copied every .dll file from c:\Q\4.4.2\bin into the deployment directory under "Program Files" and still nothing happens.
    Jim L
    Seattle, WA

  9. #8
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Application deployment with assistant as help viewer

    Quote Originally Posted by jml View Post
    I'm not sure how I would go about debugging it. It's the application.exe that is not functioning - not my application.
    We usually debug executable files

    Try running assistant under gdb (or whatever other debugger you use) and when it crashes (it crashes, right?), check the backtrace to see where it crashes. Just make sure you are using a debug-enabled version of assistant.

    But, if I set my current directory to C:\Program Files\myAppVersion2 and enter the same command, it returns to the command prompt and nothing happens.
    Maybe it simply can't find the help collection file?

    In both directories, if I leave out the "./" so that it runs the installed assistant in
    C:\Qt\4.4.2\bin, it works fine. I actually copied every .dll file from c:\Q\4.4.2\bin into the deployment directory under "Program Files" and still nothing happens.
    Did you copy the sqlite driver to the sqldrivers subdirectory of the directory Qt searches for plugins (like the current directory or any directory defined in qt.conf file)? Does assistant work if you tell it to use one of the default help collections?

  10. #9
    Join Date
    Dec 2006
    Posts
    33
    Thanks
    10
    Thanked 5 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application deployment with assistant as help viewer

    Quote Originally Posted by wysota View Post
    We usually debug executable files
    What I meant to say is that assistant.exe is crashing, not my application.

    Quote Originally Posted by wysota View Post
    Try running assistant under gdb (or whatever other debugger you use) and when it crashes (it crashes, right?), check the backtrace to see where it crashes. Just make sure you are using a debug-enabled version of assistant.
    I don't see that I have a debug-enabled version of assistant. I'm guessing I need to download the source and compile it.

    And no, it is not crashing, is simply exits with nothing happening - no error messages. nothing.



    Quote Originally Posted by wysota View Post
    Maybe it simply can't find the help collection file?
    The collection file exists in the deployment directory in both cases, no difference.

    Quote Originally Posted by wysota View Post
    Did you copy the sqlite driver to the sqldrivers subdirectory of the directory Qt searches for plugins (like the current directory or any directory defined in qt.conf file)? Does assistant work if you tell it to use one of the default help collections?
    Yes. it took a long while to figure this out through trial and error with the version 1 of my application . I did not see this anywhere in the documentation, nor did Qt support help me with this, which is one reason you are seeing a lot of frustration coming through in my posts.
    Jim L
    Seattle, WA

  11. #10
    Join Date
    Dec 2006
    Posts
    33
    Thanks
    10
    Thanked 5 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application deployment with assistant as help viewer

    Quote Originally Posted by wysota View Post
    Does assistant work if you tell it to use one of the default help collections?
    I just tried

    ./assistant -collectionFile c:/Qt/4.4.2/examples/help/simpletextviewer/documentation/simpletextviewer.qhc

    with the same result - nothing happens. assistant exits with no messages. Again, if I drop the "./" at the beginning so that it uses the installed assistant, it works as expected, bringing up the simpletextviewer help window.
    Jim L
    Seattle, WA

  12. #11
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Application deployment with assistant as help viewer

    Use some dependency walker (like depends.exe) to check if you have all dependencies filled. In addtion make sure the sqldrivers folder exists in the directory with your assistant binary and that it contains sqlite driver library.

  13. #12
    Join Date
    Dec 2006
    Posts
    33
    Thanks
    10
    Thanked 5 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Application deployment with assistant as help viewer

    Quote Originally Posted by wysota View Post
    Use some dependency walker (like depends.exe) to check if you have all dependencies filled. In addtion make sure the sqldrivers folder exists in the directory with your assistant binary and that it contains sqlite driver library.
    I've done all that. I actually went back and compared the dependencies between the assistant that works (from Qt 4.1.3) and the one that does not (from Qt 4.4.2), and they appear to be identical.

    Also, if I copy assistent.exe, along with all the DLLs from my version 1 deployment (bulit with Qt 4.1.3) directory to my version 2 directory it works with the .qhc and .qch file I created with Qt 4.4.2
    Jim L
    Seattle, WA

Similar Threads

  1. Qt 4.1.3 application Deployment
    By sivaganesan in forum Installation and Deployment
    Replies: 1
    Last Post: 24th July 2008, 17:15
  2. qt application deployment issue?
    By vishal.chauhan in forum Installation and Deployment
    Replies: 0
    Last Post: 1st May 2007, 06:09
  3. Application deployment problem
    By shapirlex in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 13th April 2007, 00:11
  4. Deployment of Application to freescale board
    By AP.Sakkthivel in forum Qt for Embedded and Mobile
    Replies: 4
    Last Post: 26th April 2006, 04:17

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.