This commit is contained in:
halx99 2021-10-27 10:27:46 +08:00
parent b84f83fc76
commit a52dbe0d0b
6 changed files with 7 additions and 7 deletions

View File

@ -1085,7 +1085,7 @@ if __name__ == "__main__":
engine_path = os.path.normpath(os.path.join(cur_path, '../../../'))
COCOS_ENGINE_VERSION = utils.get_engine_version(engine_path)
STAT_VERSION = COCOS_ENGINE_VERSION
ver_pattern = r"cocos2d-x-(.*)"
ver_pattern = r"adxe-(.*)"
match = re.match(ver_pattern, COCOS_ENGINE_VERSION)
if match:
STAT_VERSION = match.group(1)

View File

@ -241,7 +241,7 @@ def rmdir(folder):
else:
shutil.rmtree(folder)
VERSION_FILE_PATH = 'cocos/cocos2d.cpp'
VERSION_FILE_PATH = 'cocos/adxe.cpp'
VERSION_PATTERN = r".*return[ \t]+\"(.*)\";"
def get_engine_version(engine_path):
ret = None

View File

@ -209,7 +209,7 @@ class TemplateGenerator(adxe.CCPlugin):
def get_version_from_source(self):
src_engine_path = self.engine_path
version_file_path = os.path.join(src_engine_path, "cocos/cocos2d.cpp")
version_file_path = os.path.join(src_engine_path, "cocos/adxe.cpp")
pattern = r".*return[ \t]+\"(.*)\";"
# restore the version of engine

View File

@ -173,7 +173,7 @@ class CCPluginNew(adxe.CCPlugin):
engine_type = None
framework_ver_file = os.path.join(self._cocosroot, 'version')
x_ver_file = os.path.join(self._cocosroot, 'cocos/cocos2d.cpp')
x_ver_file = os.path.join(self._cocosroot, 'cocos/adxe.cpp')
js_ver_file = os.path.join(self._cocosroot, 'frameworks/js-bindings/bindings/manual/ScriptingCore.h')
if os.path.isfile(framework_ver_file):
# the engine is Cocos Framework

View File

@ -15,7 +15,7 @@ from set_framework_helper import SetFrameworkHelper
def get_engine_of_project(project):
ver_str = None
x_ver_file = os.path.join(project["path"], 'frameworks/cocos2d-x/cocos/cocos2d.cpp')
x_ver_file = os.path.join(project["path"], 'frameworks/cocos2d-x/cocos/adxe.cpp')
pattern = r".*return[ \t]+\"cocos2d-x (.*)\";"
f = open(x_ver_file)

View File

@ -8,11 +8,11 @@ fi
sed -i .bak '/CC_DEPRECATED_ATTRIBUTE CC_DLL/,/NS_CC_END/d' ../../cocos/base/ccUTF8.h
version=`grep -e 'return' ../../cocos/cocos2d.cpp | awk '{print substr($3,0,length($3)-2)}'`
version=`grep -e 'return' ../../cocos/adxe.cpp | awk '{print substr($3,0,length($3)-2)}'`
echo $version
cd ../../docs
#we should read cocos2d.cpp and retrieve the version number
#we should read adxe.cpp and retrieve the version number
sed -i .bak "s/3\.0/${version}/g" doxygen.config
doxygen ${CONFIG_NAME}.config