Assistant can't find my help file after uninstalling 32-bit version and installing 64-bit version on Win 10 x64



  • I build my application both for 32-bit and 64-bit Windows. I can install the 32-bit version of my app on a Windows 10 x64 machine, and Assistant shows my help file just fine. On a separate Windows 10 x64 mahcine, I can install the 64-bit version of my app and Assistant shows my help file just fine.

    However, if on the machine with the 32-bit version of my app, I uninstall the 32-bit version and install the 64-bit version, when I launch Assistant to show my help file, instead of my help, I get:

    The page could not be found!
    Error loading: qthelp://fmosoft.com.mapcreator.1.0/doc/registration.htm
    Please make sure that you have all documentation sets installed.
    

    I tried looking at the installer logs but nothing jumped out at me. I'd appreciate any guidance on how to fix this issue.


  • Lifetime Qt Champion

    Hi,

    Some ideas:

    • Where are you storing the documentation file ?
    • Do you have any settings related to that ?
    • Did you took a look at the registry to see if there was anything there related ?


  • Thanks @SGaist for pushing me in the right direction.

    The documentation file is stored in a subdir of where the exe is installed. The subdir is called "help". So for x64, the paths are: c:\Program Files\FMOsoft\MapCreator for my application exe, my assistant exe (I have slightly modified the Assistant code so it is called MapCreatorHelp.exe), and dll's. c:\Program Files\FMOsoft\MapCreator\help has my .qch and .qhc files.

    I discovered that assistant creates a .qhc file in %QDesktopServices::DataLocation%/mycompany/myapplication/mycollection.qhc (see http://doc.qt.io/qt-5/assistant-custom-help-viewer.html) which seems to be where the problem resides. If I delete %QDesktopServices::DataLocation%/mycompany then my help file works again. I guess the .qhc that assistant creates must include the absolute path, since that would be different (Program Files vs. Program Files (x86)).

    So, I guess my options are:

    1. Change Qt Assistant to use a relative path
    2. Change where I install my help files to a location that would have the same absolute path for 32 and 64 bit (such as ProgramData)
    3. Use a different cacheDirectory in my qhcp for 32 and 64 bit
    4. document the work-around of deleting %QDesktopServices::DataLocation%/mycompany (which on Win 10 is: C:\Users[username]\AppData\Local[company name]), and give it as the solution if anybody ever actually bumps into this.

    Leaning toward #2 or #3 if I can avoid #4...If anyone sees a better option, please post it! Also, if there is a standard best practice for how to handle this issue, please post.


  • Lifetime Qt Champion

    What about removing that folder as part of the uninstallation process ?



  • @SGaist Good thought. I'll have to look into that possibility. Is that the normal way to handle this?


  • Lifetime Qt Champion

    Cleanup on uninstallation ? Nothing unusual AFAIK, it's not a user generated file or configuration file.



  • It does have user settings such as the position and size of the help window. But if they're uninstalling, no reason to keep that I guess.


  • Lifetime Qt Champion

    Some software leave they user preferences intact in case there's a new installation done, e.g. update from a major version which requirers to remove the old one.

    One thing you could do is remove the documentation stuff anyway and provide an option to the user to remove everything else.


Log in to reply
 

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