[SOLVED]Qt assistant does not work in target machine
-
Hello, my application includes a custom Qt assistant .
When I run the application in this machine (Qt installed) the assistant works fine. When I install and run the application on another machine that does not have Qt, the assistant does not work and returns the following error in a dialog:Qt Error
Error registering documentation file 'C:\docs\assistantname.qch' : Cannot open documentation file C:\docs\assistantname.qch!The machine path on which I have the Qt assistant files is:
C:\appname\trunk\docs
inside this folder there are many html files, image files and qhcp, qhp files.
The path of installed program in the target machine is:
_C:\Program Files\appname_ > all the application.
C:\Program Files\appname\bin > binary files.First I thought it would be due to plugins, so I have included all but still the same error. Also the "dll" files.
I think it may be the settings of qhp and qhcp files:QHCP:
@<?xml version="1.0" encoding="UTF-8"?>
<QHelpCollectionProject version="1.0">
<assistant>
<title>App Name</title>
<applicationIcon>images/appname.png</applicationIcon>
<cacheDirectory>CompanyName/App Name</cacheDirectory>
<homePage>qthelp://org.qt-project.examples.appname/docs/index.html</homePage>
<startPage>qthelp://org.qt-project.examples.appname/docs/index.html</startPage>
<enableDocumentationManager>true</enableDocumentationManager>
<aboutMenuText>
<text>About App Name</text>
</aboutMenuText>
<aboutDialog>
<file>about.txt</file>
<icon>images/appname.png</icon>
</aboutDialog>
<enableDocumentationManager>false</enableDocumentationManager>
<enableAddressBar>false</enableAddressBar>
<enableFilterFunctionality>false</enableFilterFunctionality>
</assistant>
<docFiles>
<generate>
<file>
<input>assistantname.qhp</input>
<output>assistantname.qch</output>
</file>
</generate>
<register>
<file>assistantname.qch</file>
</register>
</docFiles>
</QHelpCollectionProject>@QHP:
@<?xml version="1.0" encoding="UTF-8"?>
<QtHelpProject version="1.0">
<namespace>org.qt-project.examples.appname</namespace>
<virtualFolder>docs</virtualFolder>
<filterSection>
<toc>
......
</toc>
<keywords>
........
</keywords>
<files>
<file>dojo.css</file>
<file>.html</file>
<file>images/.jpg</file>
<file>images/.png</file>
<file>images/.svg</file>
</files>
</filterSection>
</QtHelpProject>@I have also thought that the error may occur in the process of creating the qch and QHC. I use a bat file to do this:
@C:\Qt\Qt5.0.2\5.0.2\mingw47_32\bin\qcollectiongenerator assistantname.qhcp -o ..\installer\packages\com.companyname.appname\data\win\assistantname.qhc
C:\Qt\Qt5.0.2\5.0.2\mingw47_32\bin\assistant -collectionFile ..\installer\packages\com.companyname.appname\data\win\assistantname.qhc@
I don't know where the error is,
Thanks. -
I answer myself, the error was in the process of creating the qhc file.
Apparently it must be created in the same path where are its sources (qch, qhcp and qhp). I was sending it directly to my installer binary folder.
I don't know why but doing it in this way, the Qt assistant works on other machines which have no Qt installed.
I hope someone can serve this solution.