I've written batch procedures to update the compiled
JavaHelp. For now, I'll mark this as the answer to the problem,
unless someone replies with an improvement. There are three batch
files. The main procedure is SearchRepair.bat. The two
sub-procedures are Sub_FixTheSearch.bat and Sub_UpdateTheJar.bat. I
run SearchRepair.bat after compiling the RoboHelp project with the
"Compressed JavaHelp with source files" option.
The jhindexer call in the Sub_FixTheSearch.bat file targets
only the \topics folder, omitting the \popuptopics folder that
contains all of the popup files -- including the duplicates.
Here is the batch procedure code:
REM------------------SearchRepair.bat--------------------------------------
setlocal
REM ----- Set the variables ----------
set HELP_HOME=C:\MyJavaHelpTest\OnlineHelpOutput
set JAVA_HOME=C:\j2sdk1.4.2_13\bin
set MYJAVAHELP_HOME=C:\jh2.0\javahelp\bin
set PATH=%PATH%;%JAVA_HOME%;%MYJAVAHELP_HOME%
set MY_STARTING_DIR=%CD%
REM ----- Update the Search Database ----------
call Sub_FixTheSearch
if %errorlevel% GTR 0 (
echo Problem updating the search database.
goto myfinish
)
REM ----- Update the JAR file ----------
cd %MY_STARTING_DIR%
call Sub_UpdateTheJar
if %errorlevel% EQU 0 (
echo Everything worked right.
goto myfinish
) else (
echo Problem updating the JAR file.
)
endlocal
:myfinish
pause
REM------------------Sub_FixTheSearch.bat--------------------------------------
cd %HELP_HOME%
jhindexer -verbose -db helpset_JavaHelpSearch topics
REM------------------Sub_UpdateTheJar.bat--------------------------------------
cd %HELP_HOME%
jar -uf helpset.jar .\helpset_JavaHelpSearch\*.*