diff --git a/art/generate-docs-unix.sh b/art/generate-docs-unix.sh new file mode 100755 index 000000000..f8933b07a --- /dev/null +++ b/art/generate-docs-unix.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env sh +cd "$(dirname "$0")/.." +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 +else + 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." +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