3REM Windows Command Line Script (Batch) to build the documentation.
9REM © 2025 Michael Paul Korthals. All rights reserved.
10REM For legal details see documentation.
14REM This script is located in the subfolder "docs"
15REM in the project main directory.
17REM Simply open it in Windows Explorer or call it by path
18REM in the Windows CMD terminal.
20REM The HTML documentation will appear as subfolder ".\html".
22REM The script returns RC = 0 or another value in case of
23REM compilation errors.
25REM Show what is going on here
26echo Updating documentation ...
27REM Remember the original directory
29set /p ORI_DIR=<".cwd.~"
31REM Change to the drive and directory of this script
33REM Change to the project root directory
34REM in which the "docs" folder is located.
36REM Determine the Doxygen configuration file path
40set "CONFIG_PATH=%CWD%\docs.doxyfile"
41echo Configuring Doxygen by file:
43REM Compile the documentation
44echo Compiling. This could take a while ...
48if %RC% neq 0 goto finish
49REM Pack the Doxygen HTML documentation into '%~dp0\doxygen.zip'.
50for %%I in (.) do set "BASENAME=%%~nxI"
52echo Archiving into 'doxygen_%BASENAME%.zip'. This could take a while ...
54if exist doxygen_%BASENAME%.zip del doxygen_%BASENAME%.zip
557z a -r doxygen_%BASENAME%.zip .\html\*.*
58REM Check an output return code
60if %RC% neq 0 goto else1
62 echo ␛[92mSUCCESS (RC = %RC%).␛[0m
63 echo ␛[37mINFO But, be aware of ␛[93mwarnings␛[0m in the console log.␛[0m
67 echo ␛[91mERROR (RC = %RC%).␛[0m
68 echo ␛[95mNOTICE Check Doxygen console logging and repair.␛[0m
74REM Change to the original drive and directory
75if defined ORI_DIR cd /d %ORI_DIR%