mirror of https://github.com/axmolengine/axmol.git
Improve docs gen and fix genbindings
This commit is contained in:
parent
dfdca7c268
commit
5612482744
|
@ -19,11 +19,10 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
# Build the HTML documentation
|
# Build the HTML documentation
|
||||||
- name: Doxygen Action
|
- name: Build HTML documentation
|
||||||
uses: mattnotmitt/doxygen-action@v1.3.1
|
# Some projects don't allow in-source building, so create a separate build directory
|
||||||
with:
|
# We'll use this as our working directory for all
|
||||||
doxyfile-path: ./doxygen.config
|
run: tools/unix-ci/generate_docs.sh
|
||||||
working-directory: ./docs
|
|
||||||
|
|
||||||
# Deploy the HTML documentation to GitHub Pages
|
# Deploy the HTML documentation to GitHub Pages
|
||||||
- name: GH Pages Deployment
|
- name: GH Pages Deployment
|
||||||
|
|
|
@ -19,7 +19,7 @@ This project is based on the famous <A HREF="http://www.cocos2d-iphone.org">"coc
|
||||||
@section sec2 License
|
@section sec2 License
|
||||||
Copyright (c) 2010-2012 cocos2d-x.org \n
|
Copyright (c) 2010-2012 cocos2d-x.org \n
|
||||||
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. \n
|
Copyright (c) 2017-2018 Xiamen Yaji Software Co., Ltd. \n
|
||||||
Copyright (c) 2021-2022 Bytedance Inc. \n
|
Copyright (c) 2021-2023 Bytedance Inc. \n
|
||||||
\n
|
\n
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy \n
|
Permission is hereby granted, free of charge, to any person obtaining a copy \n
|
||||||
of this software and associated documentation files (the "Software"), to deal \n
|
of this software and associated documentation files (the "Software"), to deal \n
|
||||||
|
|
|
@ -38,7 +38,7 @@ PROJECT_NAME = axmol
|
||||||
# could be handy for archiving the generated documentation or if some version
|
# could be handy for archiving the generated documentation or if some version
|
||||||
# control system is used.
|
# control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER = v1
|
PROJECT_NUMBER = v1.0
|
||||||
|
|
||||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||||
# for a project that appears at the top of each page and should give viewer a
|
# for a project that appears at the top of each page and should give viewer a
|
||||||
|
@ -1994,15 +1994,15 @@ INCLUDE_FILE_PATTERNS =
|
||||||
# recursively expanded use the := operator instead of the = operator.
|
# recursively expanded use the := operator instead of the = operator.
|
||||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||||
|
|
||||||
PREDEFINED = "CC_PROPERTY_READONLY(varType, varName, funName)=protected: varType varName;\n /** get##funName*/\n public: virtual varType get##funName(void);" \
|
PREDEFINED = "AX_PROPERTY_READONLY(varType, varName, funName)=protected: varType varName;\n /** get##funName*/\n public: virtual varType get##funName(void);" \
|
||||||
"CC_PROPERTY_READONLY_PASS_BY_REF(varType, varName, funName)=protected: varType varName;\n /** get##funName*/\n public: virtual const varType& get##funName(void);" \
|
"AX_PROPERTY_READONLY_PASS_BY_REF(varType, varName, funName)=protected: varType varName;\n /** get##funName*/\n public: virtual const varType& get##funName(void);" \
|
||||||
"CC_PROPERTY(varType, varName, funName)=protected: varType varName;\n /** get##funName*/\n public: virtual varType get##funName(void);\n/** set##funName*/\n public: virtual void set##funName(varType var);" \
|
"AX_PROPERTY(varType, varName, funName)=protected: varType varName;\n /** get##funName*/\n public: virtual varType get##funName(void);\n/** set##funName*/\n public: virtual void set##funName(varType var);" \
|
||||||
"CC_PROPERTY_PASS_BY_REF(varType, varName, funName)=protected: varType varName;\n /** get##funName*/\n public: virtual const varType& get##funName(void);\n/** set##funName*/\n public: virtual void set##funName(const varType& var);" \
|
"AX_PROPERTY_PASS_BY_REF(varType, varName, funName)=protected: varType varName;\n /** get##funName*/\n public: virtual const varType& get##funName(void);\n/** set##funName*/\n public: virtual void set##funName(const varType& var);" \
|
||||||
"CC_SYNTHESIZE(varType, varName, funName)=protected: varType varName;\n /** get##funName */\n public: virtual varType get##funName(void)\n /** set##funName */ \n public: virtual void set##funName(varType var);" \
|
"AX_SYNTHESIZE(varType, varName, funName)=protected: varType varName;\n /** get##funName */\n public: virtual varType get##funName(void)\n /** set##funName */ \n public: virtual void set##funName(varType var);" \
|
||||||
"CC_SYNTHESIZE_PASS_BY_REF(varType, varName, funName)=protected: varType varName;\n /** get##funName */\n public: virtual const varType& get##funName(void);\n /** set#funName */\n public: virtual void set##funName(const varType& var);" \
|
"AX_SYNTHESIZE_PASS_BY_REF(varType, varName, funName)=protected: varType varName;\n /** get##funName */\n public: virtual const varType& get##funName(void);\n /** set#funName */\n public: virtual void set##funName(const varType& var);" \
|
||||||
"CC_SYNTHESIZE_RETAIN(varType, varName, funName)=protected: varType varName;\n /** get##funName */\n public: virtual varType get##funName(void);\n /** set##funName */\n public: virtual void set##funName(varType var);" \
|
"AX_SYNTHESIZE_RETAIN(varType, varName, funName)=protected: varType varName;\n /** get##funName */\n public: virtual varType get##funName(void);\n /** set##funName */\n public: virtual void set##funName(varType var);" \
|
||||||
"CC_SYNTHESIZE_READONLY(varType, varName, funName)=protected: varType varName;\n /** get##funName */\n public: virtual varType get##funName(void);" \
|
"AX_SYNTHESIZE_READONLY(varType, varName, funName)=protected: varType varName;\n /** get##funName */\n public: virtual varType get##funName(void);" \
|
||||||
"CC_SYNTHESIZE_READONLY_PASS_BY_REF(varType, varName, funName)=protected: varType varName;\n /** get##funName */ \n public: virtual const varType& get##funName(void);" \
|
"AX_SYNTHESIZE_READONLY_PASS_BY_REF(varType, varName, funName)=protected: varType varName;\n /** get##funName */ \n public: virtual const varType& get##funName(void);" \
|
||||||
"NS_AX_BEGIN=namespace axmol {" \
|
"NS_AX_BEGIN=namespace axmol {" \
|
||||||
"NS_AX_END=}" \
|
"NS_AX_END=}" \
|
||||||
"NS_AX_MATH_BEGIN=namespace axmol {" \
|
"NS_AX_MATH_BEGIN=namespace axmol {" \
|
||||||
|
@ -2012,12 +2012,12 @@ PREDEFINED = "CC_PROPERTY_READONLY(varType, varName, funName)=protec
|
||||||
"NS_AX_EXT_BEGIN=namespace axmol { namespace extension {" \
|
"NS_AX_EXT_BEGIN=namespace axmol { namespace extension {" \
|
||||||
"NS_AX_EXT_END=}}" \
|
"NS_AX_EXT_END=}}" \
|
||||||
"USING_NS_AX_EXT=using namespace axmol::extension" \
|
"USING_NS_AX_EXT=using namespace axmol::extension" \
|
||||||
"CC_USE_PHYSICS" \
|
"AX_USE_PHYSICS" \
|
||||||
"CC_DEPRECATED_ATTRIBUTE" \
|
"AX_DEPRECATED_ATTRIBUTE" \
|
||||||
"CC_CONSTRUCTOR_ACCESS=protected" \
|
"AX_CONSTRUCTOR_ACCESS=protected" \
|
||||||
"protected=private" \
|
"protected=private" \
|
||||||
"CC_DLL=" \
|
"AX_DLL=" \
|
||||||
"CC_GUI_DLL=" \
|
"AX_GUI_DLL=" \
|
||||||
"_USRDLL=" \
|
"_USRDLL=" \
|
||||||
"_EXPORT_DLL_=" \
|
"_EXPORT_DLL_=" \
|
||||||
"EXPORT_DLL_=" \
|
"EXPORT_DLL_=" \
|
||||||
|
@ -2025,8 +2025,8 @@ PREDEFINED = "CC_PROPERTY_READONLY(varType, varName, funName)=protec
|
||||||
"_USREXDLL=" \
|
"_USREXDLL=" \
|
||||||
"_USRSTUDIODLL=" \
|
"_USRSTUDIODLL=" \
|
||||||
"TOLUA_API=extern" \
|
"TOLUA_API=extern" \
|
||||||
"CC_ENABLE_SCRIPT_BINDING=1" \
|
"AX_ENABLE_SCRIPT_BINDING=1" \
|
||||||
"CC_USE_PHYSICS=1"
|
"AX_USE_PHYSICS=1"
|
||||||
|
|
||||||
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this
|
||||||
# tag can be used to specify a list of macro names that should be expanded. The
|
# tag can be used to specify a list of macro names that should be expanded. The
|
||||||
|
|
|
@ -0,0 +1,30 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
|
||||||
|
sudo apt install doxygen
|
||||||
|
|
||||||
|
CONFIG_NAME=doxygen
|
||||||
|
if [ ! -z $1 ]; then
|
||||||
|
CONFIG_NAME=$1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# sed -i .bak '/AX_DEPRECATED_ATTRIBUTE AX_DLL/,/NS_AX_END/d' ../../core/base/ccUTF8.h
|
||||||
|
|
||||||
|
version=`grep -e 'AX_VERSION_STR' $DIR/../../core/axmolver.h.in | awk '{print substr($3,0,length($3))}'`
|
||||||
|
version=`echo $version|sed "s/\"//g"` # remove quotes
|
||||||
|
echo $version
|
||||||
|
|
||||||
|
cd $DIR/../../docs
|
||||||
|
#we should read axmolver.h and retrieve the version number
|
||||||
|
sed -i .bak "s/1\.0/${version}/g" doxygen.config
|
||||||
|
|
||||||
|
doxygen ${CONFIG_NAME}.config
|
||||||
|
|
||||||
|
#restore the old doxygen.config
|
||||||
|
mv doxygen.config.bak doxygen.config
|
||||||
|
|
||||||
|
#restore the old ccUTF8.h
|
||||||
|
# mv ../core/base/ccUTF8.h.bak ../core/base/ccUTF8.h
|
||||||
|
|
||||||
|
# rm debug.txt
|
|
@ -41,6 +41,13 @@ curl -L "https://github.com/axmolengine/buildware/releases/download/llvmorg-15.0
|
||||||
Expand-Archive -Path llvmorg-15.0.7.zip -DestinationPath .\
|
Expand-Archive -Path llvmorg-15.0.7.zip -DestinationPath .\
|
||||||
Copy-Item ".\llvmorg-15.0.7\llvm\prebuilt\windows\x64\libclang.dll" -Destination "..\tools\bindings-generator\libclang"
|
Copy-Item ".\llvmorg-15.0.7\llvm\prebuilt\windows\x64\libclang.dll" -Destination "..\tools\bindings-generator\libclang"
|
||||||
|
|
||||||
|
## ensure $env:AX_ROOT/core/axmolver.h exists
|
||||||
|
$env:AX_ROOT = (Resolve-Path $PSScriptRoot\..\..).Path
|
||||||
|
echo "AX_ROOT=$env:AX_ROOT"
|
||||||
|
if (!(Test-Path "$env:AX_ROOT\core\axmolver.h" -PathType Leaf)) {
|
||||||
|
Copy-Item "$env:AX_ROOT\core\axmolver.h.in" -Destination "$env:AX_ROOT\core\axmolver.h"
|
||||||
|
}
|
||||||
|
|
||||||
## run genbindings.py
|
## run genbindings.py
|
||||||
pwd
|
pwd
|
||||||
cd ..\tools\tolua
|
cd ..\tools\tolua
|
||||||
|
|
Loading…
Reference in New Issue