From 07fa4481175c793a7fda75b79b5d92951539f731 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 21 Dec 2023 07:09:40 +0000 Subject: [PATCH] improve the make_docs.sh script --- make_docs.sh | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/make_docs.sh b/make_docs.sh index 9709d99..dfc5106 100755 --- a/make_docs.sh +++ b/make_docs.sh @@ -1,22 +1,59 @@ #!/usr/bin/env bash +echo "building and installing raylib" +cd raylib-c +mkdir build +cd build +cmake -DBUILD_EXAMPLES=off -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release .. +make -j2 +sudo make install +cd ../.. + +echo "installing raylib headers to /usr/local/include" + +sudo cp ./raylib-c/src/raylib.h /usr/local/include/ +sudo cp ./raylib-c/src/rlgl.h /usr/local/include/ +sudo cp ./raylib-c/src/raymath.h /usr/local/include/ +sudo cp ./raygui/src/raygui.h /usr/local/include/ +sudo cp ./physac/src/physac.h /usr/local/include/ + +echo "building raylib_parser" + gcc raylib-c/parser/raylib_parser.c + +echo "running parser" + ./a.out -i raygui/src/raygui.h -o raygui.json -f JSON ./a.out -i physac/src/physac.h -o physac.json -f JSON ./a.out -i raylib-c/src/raylib.h -o raylib.json -f JSON +echo "building raylib_python_cffi" + python3 raylib/build.py +echo "creating enums.py" + python3 create_enums.py > raylib/enums.py python3 create_enums.py > dynamic/raylib/enums.py -pip3 install sphinx-autoapi myst_parser sphinx_rtd_theme + +echo "creating pyi files" + python3 create_stub_pyray.py > pyray/__init__.pyi python3 create_enums.py >> pyray/__init__.pyi cat raylib/colors.py >> pyray/__init__.pyi python3 create_stub_static.py >raylib/__init__.pyi cat raylib/colors.py >> raylib/__init__.pyi + + +echo "installing sphinx modules" + +python -m venv venv +source venv/bin/activate +pip3 install sphinx-autoapi myst_parser sphinx_rtd_theme + +echo "building docs" rm -r docs cd docs-src make clean ; make html ; mv _build/html/ ../docs/ -touch ../docs/.nojekyll \ No newline at end of file +touch ../docs/.nojekyll