Skip to content

hh_compiler: add usage and diagnostic messages#1075

Open
johnd0e wants to merge 2 commits intoFarGroup:masterfrom
johnd0e:hh_compiler
Open

hh_compiler: add usage and diagnostic messages#1075
johnd0e wants to merge 2 commits intoFarGroup:masterfrom
johnd0e:hh_compiler

Conversation

@johnd0e
Copy link
Contributor

@johnd0e johnd0e commented Feb 9, 2026

Every time (if I haven't edited the help files for a long time), I run into the issue of CHM compilation failing.
And each time, it takes some time before I figure out the cause.
The reason is trivial: the Microsoft HTML Help Workshop must be installed.
However, hh_compiler.exe simply exits silently without any error messages.
Given that it doesn't output any messages upon launch, it's initially unclear whether it's working at all.

Therefore, I've added the following messages:

Usage:

Usage: D:\xxx\FarManager\enc\tools\hh_compiler\hh_compiler.exe <CodePage> <InputHHP>
Error encountered
[*] Target CodePage: 1
[*] Loading hha.dll...
[!] LoadLibraryA("hha.dll") failed. Error: 126

--------------------------------------------------------------------------------
RECOMMENDATION:
Microsoft HTML Help Workshop should be installed.
--------------------------------------------------------------------------------

Normal flow
[*] Target CodePage: 1251
[*] Loading hha.dll...
[*] Patching function: GetACP
[*] Patching function: MultiByteToWideChar
[*] Patching function: WideCharToMultiByte
[*] Starting compilation of 'pluginsr.hhp'...
Microsoft HTML Help Compiler 4.74.8702

Compiling d:\xxx\FarManager\enc\build\chm\ru\FarEncyclopedia.ru.chm

...

[*] CompileHHP finished successfully.

Copilot AI review requested due to automatic review settings February 9, 2026 16:25
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2026

Guide user through solution of cryptic "HHC6003: Error: The file Itircl.dll has not been registered correctly."
@sonarqubecloud
Copy link

sonarqubecloud bot commented Feb 9, 2026

@johnd0e
Copy link
Contributor Author

johnd0e commented Feb 9, 2026

The next thing I usually try is, instead of installing that legacy piece of software into my system,
I just copy hha.dll into the hh_compiler\ directory.
Of course, that is not enough: "HHC6003: Error: The file Itircl.dll has not been registered correctly."
Unfortunately, this message is not helpful at all, and there is even no solution in the first Google search results.
That's why I added special handling for this case:

--------------------------------------------------------------------------------
RECOMMENDATION:
Make sure that `itcc.dll` exists and run the following command
with Administrator privileges:
rundll32 "D:\xxx\FarManager\enc\tools\hh_compiler\itcc.dll",DllRegisterServer

ERROR:
The required file was NOT found at the expected location:
D:\xxx\FarManager\enc\tools\hh_compiler\itcc.dll
--------------------------------------------------------------------------------

So yes, in general, there is no need to install the full HTML Workshop package; it's enough to have just two files of its content.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@alabuzhev
Copy link
Contributor

alabuzhev commented Feb 9, 2026

RECOMMENDATION:
Microsoft HTML Help Workshop should be installed.

RECOMMENDATION:
Make sure that itcc.dll exists and run the following command
with Administrator privileges:
rundll32 "D:\xxx\FarManager\enc\tools\hh_compiler\itcc.dll",DllRegisterServer

So what is the 'recommended' way?
Install it normally or mess with random dlls?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants