How to Build Documentation Locally
Prerequisites
Clone the Repository
git clone https://github.com/GaijinEntertainment/DagorEngine.git cd DagorEngine
Install Python
Download and install from python.org.
Install Sphinx and Dependencies
Download and install Sphinx and required packages:
pip install -r requirements.txt
Note
On Windows, Sphinx and its dependencies must be installed with administrator privileges.
Install Doxygen
Download and install from doxygen.nl.
Note
On Windows, add Doxygen to the environment PATH:
$env:PATH=$env:PATH+';<doxygen_installation_dir>\bin\', replacing<doxygen_installation_dir>with the path to your Doxygen installation directory (e.g.,c:\Program Files\doxygen).
Build HTML Documentation
Generate Intermediate Files
From
_docsrun:python3 build_all_docs.py
This script will process documentation from
DagorEngine/progand output it to_docs/source/.Build HTML
From
_docsrun:sphinx-build -c . -b html source _build/html
Sphinx will generate the documentation in HTML format by default, placing the output in
_docs/_build/html:sphinx-build: Runs the Sphinx documentation builder.-c .: Usesconf.pyfrom the current directory.-b html: Builds HTML output.source: Directory with the documentation source files._build/html: Output directory for generated HTML.
Note
Alternatively, you can run the
build_html.batscript from the_docsfolder to automate the build steps.View the Docs
Open
_docs/_build/html/index.htmlin your browser to view the generated documentation.
Optional: Speed Up Rebuilds (Skip Doxygen)
If source code hasn’t changed, you can skip Doxygen:
$env:SKIPDOXYGEN = "1"
sphinx-build -c . -b html source _build/html
SKIPDOXYGEN=1 sphinx-build -c . -b html source _build/html
This will reuse the previously generated XML from Doxygen instead of running it again.
Note
Alternatively, you can run the build_html_skipdoxygen.bat script from the
_docs folder to automate this step.
Optional: Build PDF Documentation
Build PDF for Full Dagor Documentation
Install TeXLive
Download and install TeXLive from https://www.tug.org/texlive/.
Generate LaTeX Files
From
_docsrun:sphinx-build -c . -b latex source _build/pdf
This will generate LaTeX source files in the
_build/pdfdirectory.Build PDF
From
_build/pdfrun:latexmk -xelatex dagor.tex
The final PDF will be at
_docs/_build/pdf/dagor.pdf.Note
Alternatively, you can run the
build_pdf_full.batscript from the_docsfolder to automate the build steps.
Build PDF for Dagor Maxscript Toolbox
To build a standalone PDF for a specific documentation chapter, such as Dagor
MaxScript
Toolbox,
use the PDF_SUBDOC environment variable in combination with the Sphinx build
command.
Install TeXLive
Download and install TeXLive from https://www.tug.org/texlive/.
Generate LaTeX Files
From
_docsrun:$env:PDF_SUBDOC = "maxscript_toolbox" sphinx-build -c . -b latex source/dagor-tools/addons/3ds-max/dagor-maxscript-toolbox _build/pdf_maxscript_toolbox
PDF_SUBDOC=maxscript_toolbox sphinx-build -c . -b latex source/dagor-tools/addons/3ds-max/dagor-maxscript-toolbox _build/pdf_maxscript_toolbox
This will generate LaTeX source files for the selected chapter in the
_build/pdf_maxscript_toolboxdirectory.Build PDF
From
_build/pdf_maxscript_toolboxrun:latexmk -xelatex dagor_maxscript_toolbox.tex
The final PDF will be at
_docs/_build/pdf_maxscript_toolbox/dagor_maxscript_toolbox.pdf.Note
Alternatively, you can run the
build_pdf_maxscript_toolbox.batscript from the_docsfolder to automate the build steps.