rem version 1.4
@echo off
if not exist output mkdir output
if not exist .\output\images mkdir .\output\images
echo _
echo ===========
echo The output will be placed in folder "output".
echo ===========
echo _
pause
@echo on
copy .\images\*.* .\output\images\.
copy .\*.gif .\output\.
start /WAIT tex2rtf.exe ags.tex .\output\ags.html -html -sync
move *.con .\output\.
striphdr htmlfiles\actutor.htm .\output\ags29.htm
striphdr htmlfiles\actutor2.htm .\output\ags30.htm
copy procdocs.exe .\output\procdocs.exe
cd output
procdocs.exe
del procdocs.exe
cd ..
cd htmlfiles
for %%i in (acintro*.htm) do ..\striphdr %%i ..\output\%%i
cd ..\output
for %%i in (acintro*.htm) do echo %%i >>ags.hhp
echo ..\images\*.jpg >>ags.hhp
echo ..\images\*.gif >>ags.hhp
@echo off
echo _
echo ===========
echo You must now choose if you want to compile the project into a .CHM file.
echo It will use the old "hhc.exe" utility.
echo (it might not always work if HTML Help workshop 4.74.8702.0
echo is not installed on this machine and/or if you use windows 7).
echo ===========
echo _
:decide
set /p choice=Do you want to compile? (Y/N)
if "%choice%"=="Y" goto compile
if "%choice%"=="y" goto compile
if "%choice%"=="N" goto nocompile
if "%choice%"=="n" goto nocompile
goto decide
:nocompile
@echo off
echo _
echo You skipped compiling.
echo _
goto askclean
:compile
rem current folder = ./output
@echo on
copy ..\hhc.exe .
copy ..\hha.dll .
hhc ags.hhp
del hhc.exe
del hha.dll
goto askclean
:askclean
@echo off
echo _
echo ===========
echo Do you want to clean the temporary files?
echo - Choose No if you plan on compiling the .hhp file with
echo an alternative tool such as Precision Helper.
echo - Choosing Yes will leave only the .CHM help file (if it
echo has been compiled) in the "output" folder.
echo ===========
echo _
:decide2
set /p choice=Do you want to clean temporary files? (Y/N)
if "%choice%"=="Y" goto clean
if "%choice%"=="y" goto clean
if "%choice%"=="N" goto noclean
if "%choice%"=="n" goto noclean
goto decide2
:clean
echo You decided to clean.
@echo on
rem current folder = ./output
del *.htm
del *.con
del ags.hh*
del ags.htx
del ags.ref
del *.gif
rmdir /s /q images
goto end
:noclean
@echo off
echo _
echo You skipped cleaning.
echo _
goto end
:end
@echo off
echo _
echo Finished.
echo _
echo ===========
echo IMPORTANT NOTES:
echo If you compile the .hhp file with Precision Helper,
echo 1) Don't forget to sort the Index alphabetically
echo using the GUI.
echo 2) If you build a HTML help, don't forget to copy
echo the "images" folder into the folder where 'index.htm'
echo is located.
echo ===========
echo _
pause