From bdc4e7215aa6d69917b76876d1de14d6a19cb9ca Mon Sep 17 00:00:00 2001 From: r6915ee Date: Thu, 6 Nov 2025 17:40:52 -0800 Subject: [PATCH 1/3] Improve documentation generation scripts There is now a UNIX documentation generation script in the form of a shell script. The Windows shell script has also been improved, and some of the output of that script has been improved to match the UNIX one. Because the scripts still use Lime to generate the documentation, the shell script checks the kernel name using uname, and change the documentation generation command ever so slightly. The reason for this is that Lime only supports building to one platform at a time. This makes manual intervention necessary, so the UNIX script checks for the kernel ahead of time. --- art/generate-docs-unix.sh | 16 ++++++++++++++++ art/generate-docs-windows.bat | 8 ++++++++ art/generateDoc.bat | 8 -------- 3 files changed, 24 insertions(+), 8 deletions(-) create mode 100755 art/generate-docs-unix.sh create mode 100644 art/generate-docs-windows.bat delete mode 100644 art/generateDoc.bat diff --git a/art/generate-docs-unix.sh b/art/generate-docs-unix.sh new file mode 100755 index 000000000..45d553193 --- /dev/null +++ b/art/generate-docs-unix.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env sh +cd "$(dirname "$0")/.." +echo Generating documentation... +if [ $(uname) == "Linux" ]; then + echo "Platform is based on Linux" + haxelib run lime build linux --haxeflag="-xml docs/doc.xml" -D doc-gen -D DOCUMENTATION --no-output +elif [ $(uname) == "Darwin" ]; then + echo "Platform is macOS" + haxelib run lime build mac --haxeflag="-xml docs/doc.xml" -D doc-gen -D DOCUMENTATION --no-output +else + echo "Platform $(uname) is incompatible with documentation generation, exiting..." + exit 126 +fi + +echo "The XML file for the API documentation has been generated at docs/doc.xml." +echo "For updating the API documentation hosted at the website, please replace codename-website/api-generator/api/doc.xml with the file listed above." diff --git a/art/generate-docs-windows.bat b/art/generate-docs-windows.bat new file mode 100644 index 000000000..79f1189bb --- /dev/null +++ b/art/generate-docs-windows.bat @@ -0,0 +1,8 @@ +@ECHO OFF +cd .. +echo Generating documentation... +echo Platform is based on Windows +haxelib run lime build windows --haxeflag="-xml docs/doc.xml" -D doc-gen -D DOCUMENTATION --no-output + +echo The XML file for the API documentation has been generated at docs/doc.xml. +echo For updating the API documentation hosted at the website, please replace codename-website/api-generator/api/doc.xml with the file listed above. diff --git a/art/generateDoc.bat b/art/generateDoc.bat deleted file mode 100644 index 595314b19..000000000 --- a/art/generateDoc.bat +++ /dev/null @@ -1,8 +0,0 @@ -@ECHO OFF -cd .. -echo Building Game... -lime build windows --haxeflag="-xml docs/doc.xml" -D doc-gen -D DOCUMENTATION --no-output -echo art - -echo Generated the api xml file at docs/doc.xml -echo Please put this in codename-website/api-generator/api/doc.xml \ No newline at end of file From 69ea22edfe7b701a88707e0884df83ca479b360d Mon Sep 17 00:00:00 2001 From: r6915ee Date: Sat, 8 Nov 2025 18:10:57 -0800 Subject: [PATCH 2/3] Allow Linux-compatible kernels to work with UNIX doc generation script Considering the variety of kernels available alongside ELF compatibility, the UNIX documentation generation script has been modified to only check for the Darwin kernel and assume every other kernel as Linux-compatible. --- art/generate-docs-unix.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/art/generate-docs-unix.sh b/art/generate-docs-unix.sh index 45d553193..d12f18e03 100755 --- a/art/generate-docs-unix.sh +++ b/art/generate-docs-unix.sh @@ -1,15 +1,12 @@ #!/usr/bin/env sh cd "$(dirname "$0")/.." echo Generating documentation... -if [ $(uname) == "Linux" ]; then - echo "Platform is based on Linux" - haxelib run lime build linux --haxeflag="-xml docs/doc.xml" -D doc-gen -D DOCUMENTATION --no-output -elif [ $(uname) == "Darwin" ]; then +if [ $(uname) == "Darwin" ]; then echo "Platform is macOS" haxelib run lime build mac --haxeflag="-xml docs/doc.xml" -D doc-gen -D DOCUMENTATION --no-output else - echo "Platform $(uname) is incompatible with documentation generation, exiting..." - exit 126 + echo "Platform is not macOS; assuming platform to be Linux compatible" + haxelib run lime build linux --haxeflag="-xml docs/doc.xml" -D doc-gen -D DOCUMENTATION --no-output fi echo "The XML file for the API documentation has been generated at docs/doc.xml." From 3c0f1b24c5b2e4944f6cf83536e7487a55fabd99 Mon Sep 17 00:00:00 2001 From: r6915ee Date: Mon, 15 Dec 2025 22:07:41 -0800 Subject: [PATCH 3/3] Small consistency change in UNIX doc script when echoing pre-check message --- art/generate-docs-unix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/art/generate-docs-unix.sh b/art/generate-docs-unix.sh index d12f18e03..f8933b07a 100755 --- a/art/generate-docs-unix.sh +++ b/art/generate-docs-unix.sh @@ -1,6 +1,6 @@ #!/usr/bin/env sh cd "$(dirname "$0")/.." -echo Generating documentation... +echo "Generating documentation..." if [ $(uname) == "Darwin" ]; then echo "Platform is macOS" haxelib run lime build mac --haxeflag="-xml docs/doc.xml" -D doc-gen -D DOCUMENTATION --no-output