重新编译CHM文件 [英] Recompile CHM file

查看:385
本文介绍了重新编译CHM文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个脚本,该脚本应该能够将其他信息添加到 .chm 文件中.

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

hh.exe -decompile outputFolder fileName.chm命令反编译后,我得到了html文件以及其他两个扩展名为 .hhc .hhk 的文件.

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.

编辑html文件后,我想将文件重新编译为一个 .chm 文件.我读到我还需要一个 .hhp 文件来执行此操作,但这不是在反编译过程中生成的.

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.

我该如何解决?

推荐答案

这是编译帮助模块(CHM)的问题.是的-您需要* .hhp才能通过HTMLHelp Workshop或其他方式再次编译FAR HTML.

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.

您知道,您可以使用7Zip或仅在Windows PC上打开命令提示符窗口并键入以下内容:

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

具有任何其他功能的唯一反编译器是 KeyTools ,因为这可以尝试重建项目(.hhp)文件.如果要重新编译帮助项目,则需要此文件.

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.

将.hhp文件本身(在重新生成后)包含在项目文件(.HHP)的[FILES]部分中可能很有用.因此,在编译时,它包含在编译帮助模块(CHM)中.然后,除其他文件外,还将反编译相应的* .HHP文件以供将来使用.

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.

这篇关于重新编译CHM文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆