-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild_docs.bat
49 lines (41 loc) · 1.19 KB
/
build_docs.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
::
:: FILE build_docs.bat
:: AUTHOR Ilya Akkuzin <gr3yknigh1@gmail.com>
:: COPYRIGHT (c) 2024 Ilya Akkuzin
::
:: USAGE
::
:: 1. You need to install `docs.requirements.txt` with `pip` package
:: manager. Docs using python tools in order to generate html pages.
::
:: 2. Recommended usage of virtual environment. So activate it, install
:: neccesery dependencies and run this script.
::
:: 3. After successful build, you can serve http server on folder
:: `docs/sphinx/build/html`. For example:
::
:: ```cmd
:: python -m http.server --directory docs/sphinx/build/html 8080
:: ```
::
:: Reference guide: https://rgoswami.me/posts/doc-cpp-dox-sph-exhale/
@echo off
set project_path=%~dp0
set doxygen_folder=%project_path%\docs\doxygen
set sphinx_folder=%project_path%\docs\sphinx
set docs_venv_path=%project_path%\.venv-docs"
pushd %project_path%
:: if exists %docs_venv_path% (
:: call %docs_venv_path%\Scripts\activate.bat
:: ) else (
python -m venv %docs_venv_path%
call %docs_venv_path%\Scripts\activate.bat
python -m pip install -r docs-requirements.txt.lock
::)
popd
pushd %doxygen_folder%
doxygen Doxyfile
popd
pushd %sphinx_folder%
make html
popd