How to generate CHM with Doxygen and HTML Help Compiler? - c++

The short story: I can generate a CHM file with Doxygen. Launching the CHM file, I observe that the Contents and Index tabs do list the pages, namespaces, classes, and members of those classes. However, clicking on the items in those Contents and Index lists do not display any content.
I am on a computer using Windows 7 Professional SP1, 64-bit.
I use Doxywizard to run Doxygen version 1.8.9.1 on my code. It correctly generates the HTML output; the pages, namespaces, classes, and members appear in the documentation.
I then further want to convert the HTML into a compressed HTML (CHM) file.
I downloaded the Microsoft HTML Help Workshop version 1.31 (i.e., htmlhelp.exe version 4.74.8703 ) from the Microsoft website ( https://msdn.microsoft.com/en-us/library/windows/desktop/ms669985(v=vs.85).aspx ). I ran the installer. As the installer was proceeding, a popup message appeared:
This computer already has a newer version of HTML Help.
However, installation completed successfully. And, the hhc.exe program is there where I told it to install.
I now specify these relevant Doxygen settings:
Wizard --> Output:
HTML is checked
"prepare for compressed HTML (.chm)" option is selected.
Expert --> HTML:
GENERATE_HTMLHELP = YES
CHM_FILE = Foo.chm
HHC_LOCATION = C:\Program Files(x86)\Microsoft\HTML Help Workshop\hhc.exe
When I run Doxygen again, it reports an error:
error: failed to run html help compiler on index.hhp
The Foo.chm file is generated where expected. But, as described above, it is missing a lot of content.
I tried running hhc.exe manually on the HHP file generated by Doxygen. It does not indicate any errors.
C:\Program Files (x86)\Microsoft\HTML Help Workshop>hhc c:\test\html\index.hhp
Microsoft HTML Help Compiler 4.74.8702
Compiling c:\test\html\Foo.chm
Compile time: 0 minutes, 3 seconds
292 Topics
3,855 Local links
83 Internet links
0 Graphics
Created c:\test\html\Foo.chm, 259,580 bytes
Compression decreased file by 1,077,915 bytes.
However, the result is the same: a Foo.chm file that is missing content.
I subsequently found that I had another installation of the HTML Help Workshop on my computer. But, the hhc.exe was the exact same version. So, that is not likely the problem.
Can you suggest what else I can try to get all the documentation content to display in the CHM file?

When I have seen this problem (the html exists and the chm has content but that content is not visible), it has been because windows security has "blocked" the chm file. To see if this is what you are encountering try the following:
From windows explorer, Right click the generated .chm file and select properties.
On the General tab, if you see an Unblock button, click it.
Close the dialog and open the .chm file.
(I have not encountered this problem with locally generated doxygen .chm files, but I am hopeful from your description that this may fix your problem.)

The essential problem was that the CHM file was on a mapped network drive.
When I copied the CHM file to a physical drive on my computer, all the content displays.

In your doxyfile, put the path to hhc.exe in double quotes, since it contains spaces.
Or even better, do not use paths with spaces.

Related

Info.plist added but Xcode still crashing

I'm setting up a project utilizing OpenCV and Xcode and I want to open up the webcam using VideoCapture. I have added my own Info.plist file (as a command-line project in C++ doesn't have an Info.plist) and I have added it to the project under targets/general/identity. My info.plist is verified as OK from the command "plutil Info.plist".
I also have the "Pre-Process Info.plist" tag under "Packaging" changed to "yes". However, I still get this error:
"This app has crashed because it attempted to access privacy-sensitive
data without a usage description. The app's Info.plist must contain
an NSCameraUsageDescription key with a string value explaining to the
user how the app uses this data."
I have tried many StackOverFlow links and they have all failed, including this one: Accessing webcam in Xcode with OpenCV (C++)
If I don't add the Info.plist file to finder (the link at the bottom of the link), I get the same error.
When I add it to finder along with the executable, I get this error along with the previous error:
"There was an error parsing the Info.plist for the bundle at URL"
Please let me know how I can fix this. Thank you so much for your time.
You need to have some text (Usage Description) in Info.plist for key "NSCameraUsageDescription". Otherwise, the app will crash when app access Camera. Please see the snapshot below.
Hope it helps. Otherwise, please let us know.

Generating working CHM files using Doxygen and GraphViz (Invalid .hhc file?)

I'm in the middle of documenting my C++ GUI library and I just started using Doxygen. I've got two test files that are documented now, but I have problems when trying to generate the CHM help files. Doxygen runs without error, and dot appears to be functioning correctly to generate images.
However, it appears the resulting .hhc, .hhk, and .hhp files are broken in some way. index.hhc and index.hhk are exactly the same and running 'hhc index.hhp' does not work. It returns an error :
HHC6000: Error: An internal file could not be created. Make certain there is enough disk space on the drive where you are compiling your file.
HHC5007: Error: Fatal navigational compilation error. This is likely the result of an invalid contents (.hhc) file.
I have uploaded a zip file of my two test sources, the Doxyfile generated by the Doxy Wizard, and the .hh* files created by doxygen.
http://members.allegro.cc/EdgarReynaldo/temp/test1.zip
Both HTML Help Workshop and GraphViz are on my path.
Do I need to change a setting in the doxyfile? How do I fix this?
Regards, bugsquasher
EDIT
After taking albert 's advice, everything seemed to magically work. Nothing was really different though.

Creation of the virtual directory failed with error: cannot write configuration file applicationhost.config

I'm just simply trying to open up a VS 2017 project. When I open the solution, I get the following error message:
Creation of the virtual directory http://localhost:58051/failed with the error: Filename: \?\C:\Users\Visual Studio 2017\Projects\Testing\Version 2.0.vs\config\applicationhost.config Error: Cannot write configuration file
I've checked the folders along the file path and they are not encrypted. All the folders along the file path have a black box for the Read Only attribute. When I go to the config folder and clear out the black box for the Read Only attribute and Apply the setting, I find if I exit and go back to the same folder, the black box reappears for the Read Only attribute. I've read that the black box doesn't really mean the Read Only attribute has been turned on. If the Read Only attribute was actually turned on, I should expect to see a check mark instead. However, this doesn't explain why I can't open the solution.
After I click the OK Button to the VS Error message, VS just says the solution is "(unavailable)" in the Solution Explorer.
Any help would be greatly appreciated.
I too had this problem with my project files located on OneDrive. The way I resolved it was I renamed the applicationhost.config file located in the ".vs\config" directory of your root project directory then reloaded the web project. This will create a new applicationhost.config file.
I had the same error message sharing a project between 2 machines via OneDrive and fixed it as follows:
1 - Closed VS.Net
2 - Opened [myappnamefolder].vs\config\applicationhost.config in Notepad
3 - Searched the open file for the filename in my error message (In your case C:\Users\Visual Studio 2017\Projects\Testing\Version 2.0.vs\config\applicationhost.config ).
It was found under system.applicationHost, sites, site name, application path, virtualDirectory - physicalPath
4 - Amended the physicalPath value to point to the valid path of the project's config file as above.
5 - Saved the applicationhost.config file
My paths were different because I had different home user directories on each machine. (User A & User B)
I have resolved this error with this way mention as below:
STEP 1:
Go to on that path
C:\Users\navz\OneDrive\Documents\IISExpress\config
STEP2:
When you reach on this folder "config"
in this folder we can see "applicationhost" file
STEP3:
Close the Visual studio existing project and delete the applicationhost file(see on Step 2 path)
Then open the existing project again, it will be reloaded automatically and work properly.
Had same problem then looked into vs\config\applicationhost.config and it was encrypted. I unencrypted file and solution loaded with no problems.
I've had this problem several times using VS 2017 with Onedrive. Resolved it by renaming the application.config and having VS recreate it. Just as well could have edited line in the file. See the Diff below as an example.
The config file is located in something like C:\Code\MyProject\.vs\config\.
I just encountered this error. I followed the steps in this answer: https://stackoverflow.com/a/50508207/1166163
When I tried to save my changes I realised TFS had marked the file as read-only, preventing VS from updating the value. Removing the read-only attribute fixed the problem.
None of the above worked for me. I ended up deleting and recloning the repo that was giving me problems. It then opened up just fine.
Windows 10 Defender was causing this for me. When I disabled control folder access it worked again. Odd, because it had been working with that setting on for a while.
my drives were different - but the main codebase was shared between the two machines - so on one it was in the d drive - so i mapped the parent subdirectory on the second machine to be the d drive ... which resulted in the same paths then on both ... i just had to open the solution from the d drive on the second machine

"Samples Environments for Microsoft Chart Controls" failing to compile

I wish to view the samples in the "Samples Environments for Microsoft Chart Controls" code available on the Microsoft website. However when I try to build the project in order to create an exe that I can open, I get the following error:
Cannot write to the output file "obj\Release\System.Windows.Forms.DataVisualization.Charting.Utilities.SampleMain.VerticalTabPageButton.resources". The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
Am I missing something here? How am I supposed to navigate this set of samples?
Oh, and I manually edited the .sln file so it opens in VS2008. But I don't think that has anything to do with my problem.
I encountered the same problem when trying to unzip the "Samples Environments for Microsoft Chart Controls.zip" file.
I was attempting to unzip to my "Documents\Visual Studio 2010\Project" folder. Obviously this folder is quite far down a directory structure on the PC, so I received the same error.
So here's the solution: unzip the file to somewhere quite high up your PC's directory structure - for example, the root of your c drive, i.e. "c:\".
You'll then find you don't receive the "Path Too Long" error message.
Best wishes,
Mike.

How do I get Dreamweaver to open the CakePHP view .ctp template files?

How do I open up the template files in Dreamweaver, without having to go through all the "open with" process? I've had problems getting this to work properly in Vista 64-bit, but have had this working in prior versions of Windows, so I know it's possible.
I'm working with CakePHP, so it uses the "ctp" extension, but I'm sure other frameworks have different extensions, so I decided to leave this as generic as possible.
I found an excellent guide to this question that I've copied and pasted from the following link:
Configure CakePHP CTP Files in Dreamweaver
For Windows Vista (64-bit) instructions I just want to preface it with the following useful information and tips:
Instead of "Program Files" use "Program Files (x86)".
The location of AppData is quickly accessible by holding the [Windows key] (between CTRL and ALT) and pressing "R" for Run. This will give you a Run prompt, within which you should type "shell:appdata". This will give you a Windows Explorer window in your AppData folder. My Dreamweaver configuration file was found here: "C:\Users\Jed Hunsaker\AppData\Roaming\Adobe\Dreamweaver CS4\en_US\Configuration".
Now is a good time to open another Run prompt and type "shell:sendto". Add shortcuts here to Notepad, Dreamweaver and why not Google Chrome and/or Firefox? Whatever you like.
Now for the pasted instructions in case that link above is broken when you read this:
For Configure/Opening CakePHP CTP Files in Dreamweaver 3 files that you need to edit:-
C:\Program Files\(Adobe or Macromedia)\(Adobe )Dreamweaver(version like 8 or cs3)\configuration
Open up “Extensions.txt” and on the first line at the very end add THTML and CTP separated by commas, so the line should read:
,MASTER,THTML,CTP:All Documents
Similarly add these two extensions to the “:PHP Files” line.
PHP,PHP3,PHP4,PHP5,TPL,THTML,CTP:PHP Files
Next open the “DocumentTypes” folder and edit the “MMDocumentTypes.xml” file, just open it up using notepad or wordpad. Search for the line which has an id “PHP_MySQL” and add the THTML/CTP file extensions to both the “winfileextension” and “macfileextension” so the line should read:
winfileextension=“php,php3,php4,php5,thtml,ctp”
macfileextension=“php,php3,php4,php5,thtml,ctp”
The final file is another version of the “Extensions.txt” which is located in your “Documents and Settings” Folder in my case this is “C:\Documents and Settings(User_Name)\Application Data(Adobe or Macromedia)(Adobe )Dreamweaver(version like 8 or cs3)\configuration” just add the very same things you inserted earlier in “Extensions.txt” .
Modifying the Necessary Dreamweaver files
There are 3 files that you need to edit. The first two are located in the folder that you have installed Dreamweaver, in my case It is in ‘C:\Program Files\Adobe\Adobe Dreamweaver CS3\configuration’.
C:\Program Files\Macromedia\Dreamweaver 8\Configuration in case,if you are using Macromedia Dreamweaver 8
Open up ‘Extensions.txt’ and on the first line at the very end add THTML and CTP separated by commas,
so the line should read
,MASTER,THTML,CTP:All Documents
Similarly add these two extensions to the ‘:PHP Files’ line.
PHP,PHP3,PHP4,PHP5,TPL,THTML,CTP:PHP Files
Next open the ‘DocumentTypes’ folder and edit the ‘MMDocumentTypes.xml’ file, just open it up using notepad/wordpad. Search for the line which has an id ‘PHP_MySQL’ and add the THTML/CTP file extensions to both the ‘winfileextension’ and ‘macfileextension’ so the line should read.
winfileextension=”php,php3,php4,php5,thtml,ctp”
macfileextension=”php,php3,php4,php5,thtml,ctp”
The final file is another version of the ‘Extensions.txt’ which is located in your ‘Documents and Settings’ Folder in my case this is ‘C:\Documents and Settings\Farid\Application Data\Adobe\Adobe Dreamweaver CS3\Configuration’ just add the very same things you inserted earlier.
If you are using Macromedia Dreamweaver 8, you need not to do this edit.
for windows 7 you need to edit one more configuration file:
C:\Users\AppData\Roaming\Adobe\Dreamweaver CS3\en_US\Configuration\extensions.txt
edit just like the other extension files.