Recompile CHM file

自作多情 提交于 2020-01-24 16:15:47

问题


I'm working on a script that should be able to add additional information to a .chm file.

After decompiling it with hh.exe -decompile outputFolder fileName.chm command, I get the html files, and other 2 files with .hhc and .hhk extension.

After editing the html files, I'd like to recompile the files into a single .chm file. I read that that I also need a .hhp file in order to do that, but that's not generated in the decompilation process.

How can I solve this?


回答1:


This is a problem of Compiled Help Modules (CHM). And yes - you need a *.hhp for compiling again by HTMLHelp Workshop or e.g. FAR HTML.

You know, you can use 7Zip or just open a command prompt window on a Windows PC and type the following:

hh.exe -decompile <target_directory> <path>\<filename>.chm

The only decompiler with any additional features is KeyTools as this can try to rebuild the project (.hhp) file. You'll need this file if you want to recompile the help project.

One thing to note is that the decompile/recompile process isn't a "round-trip" process. Certain features that the help author added to the original help file can't be recovered when you decompile it, so these may no longer work properly after you've recompiled. This is especially true in the area of context-sensitive help, which may be broken in the new version of the file.

It can be useful, to include the .hhp file itself - after regenerating is done - into the section [FILES] of the project file (.HHP). Thus, this is included in the Compiled Help Module (CHM) when compiling. The appropriate *.HHP file then is decompiled in addition to the other files for future use.



来源:https://stackoverflow.com/questions/49320804/recompile-chm-file

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!