tolua mutli search paths support

This commit is contained in:
halx99 2020-11-02 16:37:18 +08:00
parent a7e03fa49f
commit 858d600a16
2 changed files with 5 additions and 4 deletions

View File

@ -1268,7 +1268,8 @@ class Generator(object):
def __init__(self, opts):
self.index = cindex.Index.create()
self.outdir = opts['outdir']
self.search_path = opts['search_path']
print('search_paths=' + opts['search_paths'])
self.search_paths = opts['search_paths'].split(';')
self.prefix = opts['prefix']
self.headers = opts['headers'].split(' ')
self.classes = opts['classes']
@ -1855,7 +1856,7 @@ def main():
'clang_args': (config.get(s, 'extra_arguments', 0, dict(userconfig.items('DEFAULT'))) or "").split(" "),
'target': os.path.join(workingdir, "targets", t),
'outdir': outdir,
'search_path': os.path.abspath(os.path.join(userconfig.get('DEFAULT', 'cocosdir'), 'cocos')),
'search_paths': os.path.abspath(os.path.join(userconfig.get('DEFAULT', 'cocosdir'), 'cocos')) + ";" + os.path.abspath(os.path.join(userconfig.get('DEFAULT', 'cocosdir'), 'extensions')),
'remove_prefix': config.get(s, 'remove_prefix'),
'target_ns': config.get(s, 'target_namespace'),
'cpp_ns': config.get(s, 'cpp_namespace').split(' ') if config.has_option(s, 'cpp_namespace') else None,

View File

@ -23,7 +23,7 @@ cxxgenerator_headers =
extra_arguments = %(android_headers)s %(clang_headers)s %(cxxgenerator_headers)s %(cocos_headers)s %(android_flags)s %(clang_flags)s %(cocos_flags)s %(extra_flags)s
# what headers to parse
headers = %(cocosdir)s/cocos/cocos2d.h %(cocosdir)s/cocos/2d/CCProtectedNode.h %(cocosdir)s/cocos/base/CCAsyncTaskPool.h %(cocosdir)s/extensions/scripting/lua-bindings/manual/CCComponentLua.h %(cocosdir)s/cocos/renderer/CCRenderer.h %(cocosdir)s/cocos/renderer/CCPipelineDescriptor.h
headers = %(cocosdir)s/cocos/cocos2d.h %(cocosdir)s/cocos/2d/CCProtectedNode.h %(cocosdir)s/cocos/base/CCAsyncTaskPool.h %(cocosdir)s/extensions/scripting/lua-bindings/manual/CCComponentLua.h %(cocosdir)s/cocos/renderer/CCRenderer.h %(cocosdir)s/cocos/renderer/CCPipelineDescriptor.h %(cocosdir)s/cocos/renderer/backend/RenderTarget.h
# what classes to produce code for. You can use regular expressions here. When testing the regular
# expression, it will be enclosed in "^$", like this: "^Menu*$".
@ -107,7 +107,7 @@ skip = Node::[setGLServerState description getUserObject .*UserData getGLServerS
Camera::[getEyeXYZ getCenterXYZ getUpXYZ],
ccFontDefinition::[*],
Ref::[autorelease isEqual acceptVisitor update],
UserDefault::[getInstance (s|g)etDataForKey],
UserDefault::[getInstance (s|g)etDataForKey encrypt],
GLView::[setTouchDelegate getAllTouches],
GLViewImpl::[end swapBuffers],
NewTextureAtlas::[*],