Make a usable CHM (Compiled HTML Help) for the OpenEuphoria docs—complete with a working Search tab and sane result titles.
This repo holds:
- a minimal
.hhpproject (manual.hhp) - the TOC (
manual.hhc) and optional Index (manual.hhk) - simple scripts/instructions to build a CHM from the OE HTML docs
- (optional) a title-fixer script so CHM search results don’t all say the same thing
Why this exists: the stock OE HTML pages often share the same
<title>, so CHM Search shows identical labels. We fix that and provide a repeatable way to build the help file locally.
- Clone this repo
git clone https://github.com/yourname/EuphoriaDocsChm.git
cd EuphoriaDocsChm- Place the OE docs HTML here
Your folder should end up like:
EuphoriaDocsChm/
manual.hhp
manual.hhc
manual.hhk
html/
index.html
...lots-of-pages.html
images/ (optional, if OE uses it)
js/ (optional, if OE uses it)
- Install the HTML Help Compiler (once)
If you don’t know what Chocolatey is: it’s a Windows package manager. We’ll use it to install Microsoft’s HTML Help Workshop (the compiler is hhc.exe).
Open PowerShell as Administrator, then run:
Set-ExecutionPolicy Bypass -Scope Process -Force
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
iwr https://community.chocolatey.org/install.ps1 -UseBasicParsing | iex
choco install html-help-workshop -yThis installs HTML Help Workshop (and the DLLs like hha.dll) so you can compile CHM files.
- (Optional but recommended) Normalize page titles
CHM shows the page <title> in Search results. If many pages share the same title, results look identical. Run the provided script to set each page’s <title> to its filename (or first <h1>—you choose).
# Optional – only if you want better search result labels
pwsh -File .\tools\update_titles.ps1- Build the CHM
# From the repo root:
& "$Env:ProgramFiles(x86)\HTML Help Workshop\hhc.exe" ".\manual.hhp"
# or if the path differs:
hhc.exe .\manual.hhpYou should see OpenEuphoria.chm created in the same folder.
- Tabs: Contents, Index (if
manual.hhkpresent), and Search - Search that’s usable: results labeled by unique page titles
- Zero content edits: we don’t rewrite docs, only the
<title>tag (optional step)
- Windows 10/11
- PowerShell (built-in)
- Admin rights (only for the package install)
- HTML Help Workshop (installed via Chocolatey as shown above)
- Project file:
manual.hhp(controls output name, default topic, window layout, search on, etc.) - Files included: all
html\*.html(andhtml\images\*.*,html\js\*.*if present) - Default topic:
html/index.html(change if needed)
If you add or remove pages, no need to edit the project as long as they’re in html\*.html.
If you use tools/update_titles.ps1:
- It makes a one-time
.origbackup next to each HTML file. - By default it sets
<title>to the filename (no extension). You can flip a flag inside the script to prefer the first<h1>instead. - Re-run anytime after you add new pages.
“MS Help opens but shows no tabs”
- Usually a malformed
[WINDOWS]line inmanual.hhp(line wraps or missing commas). Use the providedmanual.hhpas-is to start. - Ensure
Contents file=manual.hhcand (if you want Index)Index file=manual.hhkare set, andFull-text search=Yesis present.
“Search tab exists, but every result looks the same”
- Pages share the same
<title>. Run the title normalizer script, then rebuild.
“Compiler runs but the CHM won’t open / freezes”
- Try setting
Default topicto a very simple page (not a heavy JS homepage), rebuild. - Right-click the
.chm→ Properties → if there’s an Unblock checkbox, check it and apply. - If MS Help is still grumpy, try a third-party viewer (e.g., uChmViewer). The CHM should still be valid.
“hhc.exe complains about hha.dll or can’t be found”
- Re-run the Chocolatey install step (Admin PowerShell). That lays down both
hhc.exeand the required DLLs.
“Compile succeeded but search tab is missing”
- Make sure
Full-text search=Yesis in[OPTIONS]. - If you edited
[WINDOWS], keep the entire window line on one line.
- Keep PRs small (e.g., “enable search”, “title normalization”, “.hhk additions”).
- If you add index keywords, edit
manual.hhk(or add embedded sitemap<OBJECT type="text/sitemap">blocks inside pages). Normal HTML<meta>keywords/descriptions don’t affect CHM index/search. - Please don’t commit installer binaries. The Chocolatey bootstrap script keeps things reproducible and safe.
It’s old, but for offline docs with instant FTS and a compact single file, CHM is still handy—especially when we can make Search results readable with a tiny title pass. This repo gives OpenEuphoria users that “just works” experience.
The project files here are MIT (or your preferred OSS license). OpenEuphoria docs remain their respective license. Microsoft HTML Help Workshop is installed separately via Chocolatey; we do not redistribute it here.