rem
stringlengths
0
322k
add
stringlengths
0
2.05M
context
stringlengths
8
228k
decl : namespace_anonymous skiplist namespace_end
decl : namespace_anonymous skiplist_all namespace_end
def p_namespace(t): """ decl : namespace_begin decls namespace_end decl : namespace_anonymous skiplist namespace_end decl : NAMESPACE ID EQUALS ID SEMI """ pass
yacc.namespace.append(t[2])
implementation.write('namespace %s {\n' % t[2])
def p_namespace_begin(t): """ namespace_begin : NAMESPACE ID LBRACE """ yacc.namespace.append(t[2])
yacc.namespace.append('')
implementation.write('namespace {\n')
def p_namespace_anonymous(t): """ namespace_anonymous : NAMESPACE LBRACE """ yacc.namespace.append('')
""" pass
type : type_modifier name type : type type_modifier """ pass
def p_type(t): """ type : name """ pass
decl : TYPEDEF type ID SEMI """ pass
decl : TYPEDEF type ID """ pass def p_modifier_left(t): """ modifier_left : modifier_left : modifier_left STATIC modifier_left : modifier_left INLINE modifier_left : modifier_left VIRTUAL modifier_left : modifier_left OVERRIDE """ pass def p_decl(t): """ decl : SEMI decl : type array_opt SEMI decl : type name array_o...
def p_typedef(t): """ decl : TYPEDEF type ID SEMI """ pass
constant : TRUE constant : FALSE constant : NULL constant : NULLPTR """ pass def p_value(t): """ value : constant """ precedence = ( )
operator : PLUS operator : MINUS operator : TIMES operator : DIVIDE operator : MOD operator : OR operator : AND operator : NOT operator : XOR operator : LSHIFT operator : RSHIFT operator : LOR operator : LAND operator : LNOT operator : LE operator : GE operator : EQ operator : NE operator : EQUALS operator : TIMESEQUAL...
def p_constant(t): """ constant : STRING constant : WSTRING constant : CHAR constant : WCHAR constant : DECIMAL constant : OCTAL constant : HEX constant : FLOAT constant : TRUE constant : FALSE constant : NULL constant : NULLPTR """ pass
namelist : ID namelist : ID SCOPE namelist """ pass
namelist : typename_opt template_opt ID template_params_opt namelist : namelist SCOPE typename_opt template_opt ID template_params_opt """ pass
def p_namelist(t): """ namelist : ID namelist : ID SCOPE namelist """ pass
visibility_opt : PUBLIC visibility_opt : PROTECTED visibility_opt : PRIVATE
visibility_opt : visibility """ pass def p_declare_visibility(t): """ decl : visibility COLON
def p_visibility_opt(t): """ visibility_opt : visibility_opt : PUBLIC visibility_opt : PROTECTED visibility_opt : PRIVATE """ pass
elif 'cshlib' in y.features or 'cprogram' in y.features:
elif 'cshlib' in y.features:
def apply_lib_vars(self): """after apply_link because of 'link_task' after default_cc because of the attribute 'uselib'""" # after 'apply_core' in case if 'cc' if there is no link env = self.env # 1. the case of the libs defined in the project (visit ancestors first) # the ancestors external libraries (uselib) will ...
remove_paren = lexer.macro_map[t.value]
remove_paren = t.lexer.macro_map[t.value]
def t_ID(t): r'~?[a-zA-Z_\$][a-zA-Z_0-9\$]*[ \t]*' t.value = t.value.strip() try: remove_paren = lexer.macro_map[t.value] if remove_paren and t.lexer.lexdata[t.lexer.lexpos] == '(': t.lexer.begin('MACRO') except KeyError: t.type = reserved_map.get(t.value, "ID") return t
global error error += 1 print("%s(%d): Illegal character %s" % (sourcename, t.lexer.lineno, repr(t.value[0])))
t.lexer.error += 1 print("%s(%d): Illegal character %s" % (t.lexer.sourcename, t.lexer.lineno, repr(t.value[0])))
def t_error(t): global error error += 1 print("%s(%d): Illegal character %s" % (sourcename, t.lexer.lineno, repr(t.value[0]))) t.lexer.skip(1)
global error error += 1 print("%s(%d): Illegal character %s" % (sourcename, t.lexer.lineno, repr(t.value[0])))
t.lexer.error += 1 print("%s(%d): Illegal character %s" % (t.lexer.sourcename, t.lexer.lineno, repr(t.value[0])))
def t_MACRO_error(t): global error error += 1 print("%s(%d): Illegal character %s" % (sourcename, t.lexer.lineno, repr(t.value[0]))) t.lexer.skip(1)
lexer = lex.lex() lexer.inside = 0
def t_MACRO_error(t): global error error += 1 print("%s(%d): Illegal character %s" % (sourcename, t.lexer.lineno, repr(t.value[0]))) t.lexer.skip(1)
implementation.write('namespace %s {\n' % t[2])
t.parser.implementation.write('namespace %s {\n' % t[2])
def p_namespace_begin(t): """ namespace_begin : NAMESPACE ID LBRACE """ implementation.write('namespace %s {\n' % t[2])
implementation.write('namespace {\n')
t.parser.implementation.write('namespace {\n')
def p_namespace_anonymous(t): """ namespace_anonymous : NAMESPACE LBRACE """ implementation.write('namespace {\n')
implementation.write('}\n')
t.parser.implementation.write('}\n')
def p_namespace_end(t): """ namespace_end : RBRACE """ implementation.write('}\n')
params_list :
def p_params_list(t): """ params_list : params_list : cs_params_list """ pass
pass
t[0] = t[1]
def p_params_list(t): """ params_list : params_list : cs_params_list """ pass
pass
t[0] = t[1] t[0].append(t[3])
def p_cs_params_list(t): """ cs_params_list : param cs_params_list : cs_params_list COMMA param """ pass
pass
t[0] = ''
def p_array_opt(t): """ array_opt : array_opt : array_opt LBRACKET RBRACKET array_opt : array_opt LBRACKET skiplist_all RBRACKET """ pass
pass
t[0] = t[1]
def p_method_modifier_right(t): """ method_modifier_right : method_modifier_right : method_modifier_right CONST method_modifier_right : method_modifier_right VOLATILE method_modifier_right : method_modifier_right VIRTUAL method_modifier_right : method_modifier_right OVERRIDE method_modifier_right : method_modifier_righ...
global error error += 1
errtoken.lexer.error += 1
def p_error(errtoken): global error error += 1 if errtoken: if hasattr(errtoken,"lineno"): lineno = errtoken.lineno else: lineno = 0 if lineno: sys.stderr.write("%s(%d): Syntax error: unexpected token %s\n" % (sourcename, lineno, errtoken.type)) else: sys.stderr.write("%s: Syntax error, token=%s" % (sourcename, errtoke...
sys.stderr.write("%s(%d): Syntax error: unexpected token %s\n" % (sourcename, lineno, errtoken.type))
sys.stderr.write("%s(%d): Syntax error: unexpected token %s\n" % (errtoken.lexer.sourcename, lineno, errtoken.type))
def p_error(errtoken): global error error += 1 if errtoken: if hasattr(errtoken,"lineno"): lineno = errtoken.lineno else: lineno = 0 if lineno: sys.stderr.write("%s(%d): Syntax error: unexpected token %s\n" % (sourcename, lineno, errtoken.type)) else: sys.stderr.write("%s: Syntax error, token=%s" % (sourcename, errtoke...
sys.stderr.write("%s: Syntax error, token=%s" % (sourcename, errtoken.type))
sys.stderr.write("%s: Syntax error, token=%s" % (errortoken.lexer.sourcename, errtoken.type))
def p_error(errtoken): global error error += 1 if errtoken: if hasattr(errtoken,"lineno"): lineno = errtoken.lineno else: lineno = 0 if lineno: sys.stderr.write("%s(%d): Syntax error: unexpected token %s\n" % (sourcename, lineno, errtoken.type)) else: sys.stderr.write("%s: Syntax error, token=%s" % (sourcename, errtoke...
sys.stderr.write("%s: Parse error in input. EOF\n" % (sourcename))
sys.stderr.write("%s: Parse error in input. EOF\n" % (errortoken.lexer.sourcename))
def p_error(errtoken): global error error += 1 if errtoken: if hasattr(errtoken,"lineno"): lineno = errtoken.lineno else: lineno = 0 if lineno: sys.stderr.write("%s(%d): Syntax error: unexpected token %s\n" % (sourcename, lineno, errtoken.type)) else: sys.stderr.write("%s: Syntax error, token=%s" % (sourcename, errtoke...
yacc = yacc.yacc(method='LALR', debugfile=os.path.join(path, 'parser.out'), tabmodule=os.path.join(path, 'parsetab'), picklefile=sys.argv[0]+'c') yacc.namespace = []
def p_error(errtoken): global error error += 1 if errtoken: if hasattr(errtoken,"lineno"): lineno = errtoken.lineno else: lineno = 0 if lineno: sys.stderr.write("%s(%d): Syntax error: unexpected token %s\n" % (sourcename, lineno, errtoken.type)) else: sys.stderr.write("%s: Syntax error, token=%s" % (sourcename, errtoke...
global input global implementation
def doParse(source, output, macro = [], macrofile = []): lexer.macro_map = dict(global_macro_map) if macro: for m in macro: if m.endswith('()'): lexer.macro_map[m[:-2].strip()] = True else: lexer.macro_map[m.strip()] = False if macrofile: for f in macrofile: try: macros = open(f, 'r') except IOError,e: raise Exception(...
implementation = open(output, 'w')
yacc.implementation = open(output, 'w')
def doParse(source, output, macro = [], macrofile = []): lexer.macro_map = dict(global_macro_map) if macro: for m in macro: if m.endswith('()'): lexer.macro_map[m[:-2].strip()] = True else: lexer.macro_map[m.strip()] = False if macrofile: for f in macrofile: try: macros = open(f, 'r') except IOError,e: raise Exception(...
implementation.write(" global error error = 0
yacc.implementation.write("
def doParse(source, output, macro = [], macrofile = []): lexer.macro_map = dict(global_macro_map) if macro: for m in macro: if m.endswith('()'): lexer.macro_map[m[:-2].strip()] = True else: lexer.macro_map[m.strip()] = False if macrofile: for f in macrofile: try: macros = open(f, 'r') except IOError,e: raise Exception(...
implementation.close() if error != 0: os.remove(sourcefile) return error
yacc.implementation.close() input.close() if lexer.error != 0: os.remove(source) return lexer.error
def doParse(source, output, macro = [], macrofile = []): lexer.macro_map = dict(global_macro_map) if macro: for m in macro: if m.endswith('()'): lexer.macro_map[m[:-2].strip()] = True else: lexer.macro_map[m.strip()] = False if macrofile: for f in macrofile: try: macros = open(f, 'r') except IOError,e: raise Exception(...
if process and not isinstance(file, mak.sources.hsource):
if process and file.process and not isinstance(file, mak.sources.hsource):
def pbxBuildTree(self, tree, process): w = self.file.write tree.id = newid() for name,dir in tree.directories.iteritems(): self.pbxBuildTree(dir, process) for file in tree.files: file.id = newid() file.buildid = newid() if process and not isinstance(file, mak.sources.hsource): w("\t%s = { isa = PBXBuildFile; fileRef = ...
w("\t\tname = \"%s\";\n" % name) w("\t\tsourceTree = \"<group>\";\n")
def pbxDirTree(self, tree, name, children = []): w = self.file.write w("\t%s = {\n" % tree.id) w("\t\tisa = PBXGroup;\n") w("\t\tname = \"%s\";\n" % name) w("\t\tsourceTree = \"<group>\";\n") w("\t\tchildren = (\n") subdirs = [] for n,d in tree.directories.iteritems(): subdirs.append((n, d)) subdirs.sort(key = lambda i...
w("\t\tname = config;\n") w("\t\tsourceTree = \"<group>\";\n")
def writePBXGroup(self): w = self.file.write w("/* Begin PBXGroup section */\n") makid = newid() w("\t%s = {\n" % makid) w("\t\tisa = PBXGroup;\n") w("\t\tname = config;\n") w("\t\tsourceTree = \"<group>\";\n") w("\t\tchildren = (\n") for name, setting, buildfile, fileref in self.buildSettingsId[1]: w("\t\t\t%s,\n" % f...
w("\t\tname = BugEngine;\n") w("\t\tsourceTree = \"<group>\";\n")
def writePBXGroup(self): w = self.file.write w("/* Begin PBXGroup section */\n") makid = newid() w("\t%s = {\n" % makid) w("\t\tisa = PBXGroup;\n") w("\t\tname = config;\n") w("\t\tsourceTree = \"<group>\";\n") w("\t\tchildren = (\n") for name, setting, buildfile, fileref in self.buildSettingsId[1]: w("\t\t\t%s,\n" % f...
w("\t\tbuildConfigurationList = %s;\n" % self.buildSettingsId[0])
def writePBXProject(self): w = self.file.write w("/* Begin PBXProject section */\n") w("\t%s /* Project object */ = {\n" % self.projectID) w("\t\tisa = PBXProject;\n") w("\t\tcompatibilityVersion = \"%s\";\n" % self.version[0]) w("\t\tbuildConfigurationList = %s;\n" % self.buildSettingsId[0]) w("\t\thasScannedForEncodi...
w("\t\tmainGroup = %s;\n" % self.mainGroup)
w("\t\tprojectRoot=\"\";\n")
def writePBXProject(self): w = self.file.write w("/* Begin PBXProject section */\n") w("\t%s /* Project object */ = {\n" % self.projectID) w("\t\tisa = PBXProject;\n") w("\t\tcompatibilityVersion = \"%s\";\n" % self.version[0]) w("\t\tbuildConfigurationList = %s;\n" % self.buildSettingsId[0]) w("\t\thasScannedForEncodi...
if not isinstance(file, mak.sources.hsource):
if file.process and not isinstance(file, mak.sources.hsource):
def writeSources(self, sources): w = self.file.write for name,d in sources.directories.iteritems(): self.writeSources(d) for file in sources.files: if not isinstance(file, mak.sources.hsource): w("\t\t\t%s,\n" % file.buildid)
for name, setting in d.buildSettingsId[1]: w("\t%s = {\n" % setting) w("\t\tisa = XCBuildConfiguration;\n") w("\t\tbuildSettings = {\n") w("\t\t\tPRODUCT_NAME = %s;\n" % d.projectName) for platform, options in d.platforms.iteritems(): p, arch = platform.split('-') p, sdk = toSDK(p) arch = toXCodeArch(arch) if p and arc...
if d.type in ['game', 'tool', 'library', 'static_library', 'plugin']: for name, setting in d.buildSettingsId[1]: w("\t%s = {\n" % setting) w("\t\tisa = XCBuildConfiguration;\n") w("\t\tbuildSettings = {\n") for platform, options in d.platforms.iteritems(): p, arch = platform.split('-') p, sdk = toSDK(p) arch = toXCodeA...
def toSDK(platform): if platform == 'darwin': return 'osx', 'macosx*' elif platform == 'iphone': return 'iphone', 'iphoneos*' else: return '', ''
w("\t\tdefaultConfigurationName = %s;\n" % self.buildSettingsId[1][0][0]) w("\t};\n") for d in self.projects: w("\t%s = {\n" % d.buildSettingsId[0]) w("\t\tisa = XCConfigurationList;\n") w("\t\tbuildConfigurations = (\n") for name, setting in d.buildSettingsId[1]: w("\t\t\t%s,\n" % setting) w("\t\t);\n") w("\t\tdefault...
w("\t\tdefaultConfigurationName = \"%s\";\n" % self.buildSettingsId[1][0][0]) w("\t};\n") for d in self.projects: if d.type in ['game', 'tool', 'library', 'static_library', 'plugin']: w("\t%s = {\n" % d.buildSettingsId[0]) w("\t\tisa = XCConfigurationList;\n") w("\t\tbuildConfigurations = (\n") for name, setting in d.b...
def writeXCConfigurationList(self): self.writeXCBuildConfiguration() w = self.file.write w("/* Begin XCConfigurationList section */\n") w("\t%s = {\n" % self.buildSettingsId[0]) w("\t\tisa = XCConfigurationList;\n") w("\t\tbuildConfigurations = (\n") for name, setting, buildfile, fileref in self.buildSettingsId[1]: w("...
solution.chmod = 0444
def create_xcode_project(t): toolName = t.features[0] appname = getattr(Utils.g_module, 'APPNAME', 'noname') if not solutions.has_key(toolName): outname = 'project.pbxproj' solution = GenerateProject(env=t.env) solution.set_outputs(t.path.find_or_declare(outname)) solution.name = appname solution.version = xcodeproject...
result.addDirectory( self.scandir(os.path.join(path,file), os.path.join(local,file), process, file[9:].split(','), archs, sourcelist), file )
newplatforms = [] for p in file[9:].split(','): for pname, pgroup in mak.allplatforms.iteritems(): if p in pgroup: newplatforms.append(pname) result.addDirectory( self.scandir(os.path.join(path,file), os.path.join(local,file), process, newplatforms, archs, sourcelist), file )
def scandir(self, path, local, process, platforms, archs, sourcelist = []): result = sources.directory()
result.addDirectory( self.scandir(os.path.join(path,file), os.path.join(local,file),process, platforms, file[5:].split(','), sourcelist), file )
newarchs = [a for a in file[5:].split(',') if a in archs] result.addDirectory( self.scandir(os.path.join(path,file), os.path.join(local,file),process, platforms, newarchs, sourcelist), file )
def scandir(self, path, local, process, platforms, archs, sourcelist = []): result = sources.directory()
if ext in set(['.cc', '.cpp', '.cxx', '.c', '.C', '.s', '.S', '.bin', '.grit']): result.addFile(sources.cppsource(file, platforms, archs, doprocess, self.usepch))
if ext in set(['.cc', '.cpp', '.cxx', '.c', '.C', '.s', '.S', '.bin', '.grit', '.m', '.mm']): result.addFile(sources.cppsource(file, fileplatforms, filearchs, doprocess, self.usepch))
def scandir(self, path, local, process, platforms, archs, sourcelist = []): result = sources.directory()
result.addFile(sources.rcsource(file, platforms, archs, doprocess))
result.addFile(sources.rcsource(file, fileplatforms, filearchs, doprocess))
def scandir(self, path, local, process, platforms, archs, sourcelist = []): result = sources.directory()
result.addFile(sources.yaccsource(file, generatedcfile, generatedhfile, platforms, archs, doprocess)) result.addFile(sources.generatedcppsource(filename+cext, platforms, archs, doprocess)) result.addFile(sources.generatedhsource(filename+hext, platforms, archs, doprocess))
result.addFile(sources.yaccsource(file, generatedcfile, generatedhfile, fileplatforms, filearchs, doprocess)) result.addFile(sources.generatedcppsource(filename+cext, fileplatforms, filearchs, doprocess)) result.addFile(sources.generatedhsource(filename+hext, fileplatforms, filearchs, doprocess))
def scandir(self, path, local, process, platforms, archs, sourcelist = []): result = sources.directory()
result.addFile(sources.lexsource(file, generatedcfile, platforms, archs, doprocess)) result.addFile(sources.generatedcppsource(filename+cext, platforms, archs, doprocess))
result.addFile(sources.lexsource(file, generatedcfile, fileplatforms, filearchs, doprocess)) result.addFile(sources.generatedcppsource(filename+cext, fileplatforms, filearchs, doprocess))
def scandir(self, path, local, process, platforms, archs, sourcelist = []): result = sources.directory()
result.addFile(sources.source(file,platforms,archs, doprocess)) result.addFile(sources.hsource(file,platforms,archs, doprocess))
result.addFile(sources.source(file, fileplatforms, filearchs, doprocess)) result.addFile(sources.hsource(file, fileplatforms, filearchs, doprocess))
def scandir(self, path, local, process, platforms, archs, sourcelist = []): result = sources.directory()
result.addFile(sources.datasource(file, generatedcfile, platforms, archs, True)) result.addFile(sources.generatedcppsource(filename+'.cc', platforms, archs, True, self.usepch))
result.addFile(sources.datasource(file, generatedcfile, fileplatforms, filearchs, True)) result.addFile(sources.generatedcppsource(filename+'.cc', fileplatforms, filearchs, True, self.usepch))
def scandir(self, path, local, process, platforms, archs, sourcelist = []): result = sources.directory()
result.addFile(sources.hsource(file, platforms, archs, doprocess))
result.addFile(sources.hsource(file, fileplatforms, filearchs, doprocess))
def scandir(self, path, local, process, platforms, archs, sourcelist = []): result = sources.directory()
('x86', 'x86'),
def parse_gcc_target(target): archs = [ ('i686-w64', 'amd64'), ('i386', 'x86'), ('i486', 'x86'), ('i586', 'x86'), ('i686', 'x86'), ('x86', 'x86'), ('arm-eabi', 'arm7'), ('mipsel', 'mips'), ('mips', 'mips'), ('Gekko', 'mips'), ('x86_64', 'amd64'), ('amd64', 'amd64'), ('powerpc', 'powerpc'), ('psp', 'mips'), ('mingw32', ...
conf.env['CXXFLAGS_warnall'] = ['-Wall', '-Wextra', '-Wno-unknown-pragmas', '-Wno-unused-parameter', '-Werror']
conf.env['CXXFLAGS_warnall'] = ['-Wall', '-Wextra', '-Wno-unknown-pragmas', '-Wno-unused-parameter', '-Werror', '-Wno-sign-compare']
def find_cross_gcc(conf): target = conf.env['GCC_TARGET'] version = conf.env['GCC_VERSION'] versionsmall = '.'.join(version.split('.')[0:2]) if target: v = conf.env v['GCC_CONFIGURED_ARCH'] = parse_gcc_target(target) or 'unknown' if not v['CC']: v['CC'] = conf.find_program(target+'-gcc-'+version, var='CC', path_list=v[...
projects = {
xcodeprojects = {
def __init__(self): pass
def create_project(t):
def create_xcode_project(t):
def create_project(t): toolName = t.features[0] if not solutions.has_key(toolName): appname = getattr(Utils.g_module, 'APPNAME', 'noname') outname = 'project.pbxproj' solution = GenerateProject(env=t.env) solution.set_outputs(t.path.find_or_declare(outname)) solution.name = appname solution.version = projects[toolName]...
solution.version = projects[toolName][1]
solution.version = xcodeprojects[toolName][1]
def create_project(t): toolName = t.features[0] if not solutions.has_key(toolName): appname = getattr(Utils.g_module, 'APPNAME', 'noname') outname = 'project.pbxproj' solution = GenerateProject(env=t.env) solution.set_outputs(t.path.find_or_declare(outname)) solution.name = appname solution.version = projects[toolName]...
for pname in projects.keys(): feature(pname)(create_project)
for pname in xcodeprojects.keys(): feature(pname)(create_xcode_project)
def create_project(t): toolName = t.features[0] if not solutions.has_key(toolName): appname = getattr(Utils.g_module, 'APPNAME', 'noname') outname = 'project.pbxproj' solution = GenerateProject(env=t.env) solution.set_outputs(t.path.find_or_declare(outname)) solution.name = appname solution.version = projects[toolName]...
pass
if d.type in ['game', 'tool']: w("\t%s = {\n" % d.phaseId[0]) w("\t\tisa = PBXSourcesBuildPhase;\n") w("\t\tbuildActiobMask = 2147483647;\n") w("\t\tfiles = (\n") w("\t\t);\n") w("\t\trunOnlyForDeploymentPostprocessing = 0;\n") w("\t};\n")
def writePBXSourcesBuildPhase(self): w = self.file.write w("/* Begin PBXSourcesBuildPhase section */\n") for d in self.projects: pass w("/* End PBXSourcesBuildPhase section */\n\n")
for d in self.projects: pass
w("\t%s = {\n" % self.buildSettingsId[1][0]) w("\t\tisa = XCBuildConfiguration;\n") w("\t\tbuildSettings = {\n") w("\t\t};\n") w("\t\tname = Default;\n") w("\t};\n")
def writeXCBuildConfiguration(self): w = self.file.write w("/* Begin XCBuildConfiguration section */\n") for d in self.projects: pass w("/* End XCBuildConfiguration section */\n\n")
for d in self.projects: pass
w("\t%s = {\n" % self.buildSettingsId[0]) w("\t\tisa = XCConfigurationList;\n") w("\t\tbuildConfigurations = (\n") w("\t\t\t%s,\n" % self.buildSettingsId[1][0]) w("\t\t);\n") w("\t\tdefaultConfigurationIsVisible = 0;\n") w("\t\tdefaultConfigurationName = Default;\n") w("\t};\n")
def writeXCConfigurationList(self): w = self.file.write w("/* Begin XCConfigurationList section */\n") for d in self.projects: pass w("/* End XCConfigurationList section */\n\n") self.writeXCBuildConfiguration()
w("\t\t\tPRODUCT_NAME = %s;\n" % d.projectName)
if d.type not in ['game', 'tool']: w("\t\t\tPRODUCT_NAME = \"%s\";\n" % ("bugengine_"+d.projectName)) else: w("\t\t\tPRODUCT_NAME = \"%s\";\n" % d.projectName)
def toSDK(platform): if platform == 'darwin': return 'osx', 'macosx*' elif platform == 'iphone': return 'iphone', 'iphoneos*' else: return '', ''
w("\t\tbuildActiobMask = 2147483647;\n")
w("\t\tbuildActionMask = 2147483647;\n")
def writePBXSourcesBuildPhase(self): w = self.file.write w("/* Begin PBXSourcesBuildPhase section */\n") for d in self.projects: if d.type in ['game', 'tool']: w("\t%s = {\n" % d.phaseId[0]) w("\t\tisa = PBXSourcesBuildPhase;\n") w("\t\tbuildActiobMask = 2147483647;\n") w("\t\tfiles = (\n") w("\t\t);\n") w("\t\trunOnly...
def writeXCBuildConfiguration(self):
def writeXCBuildConfiguration(self, project):
def writeXCBuildConfiguration(self): w = self.file.write w("/* Begin XCBuildConfiguration section */\n") w("\t%s = {\n" % self.buildSettingsId[1][0]) w("\t\tisa = XCBuildConfiguration;\n") w("\t\tbuildSettings = {\n") w("\t\t};\n") w("\t\tname = Default;\n") w("\t};\n") w("/* End XCBuildConfiguration section */\n\n")
os.remove(source)
os.remove(output)
def doParse(source, output, macro = [], macrofile = []): lexer = ply.lex.lex() lexer.inside = 0 lexer.sourcename = source lexer.error = 0 yacc = ply.yacc.yacc(method='LALR', debugfile=os.path.join(path, 'parser.out'), tabmodule=os.path.join(path, 'parsetab'), picklefile=sys.argv[0]+'c') yacc.namespace = [] lexer.macro...
implementation.close() if error != olderror: os.remove(sourcefile) exit(error)
def p_skiplist(t): """ skiplist : """ pass
('arm-eabi', 'arm7'),
('arm-eabi', 'arm'),
def parse_gcc_target(target): archs = [ ('i686-w64', 'amd64'), ('i386', 'x86'), ('i486', 'x86'), ('i586', 'x86'), ('i686', 'x86'), ('arm-eabi', 'arm7'), ('arm', 'arm'), ('mipsel', 'mips'), ('mips', 'mips'), ('Gekko', 'mips'), ('x86_64', 'amd64'), ('x86', 'x86'), ('amd64', 'amd64'), ('powerpc', 'powerpc'), ('psp', 'mips...
if v['GCC_CONFIGURED_PLATFORM'] != 'win32': conf.env.append_unique('CCFLAGS', ['-fvisibility=hidden']) conf.env.append_unique('CXXFLAGS', ['-fvisibility=hidden'])
def find_cross_gcc(conf): try: target = Options.options.target except: target = None if not target: target = conf.env['GCC_TARGET'] version = conf.env['GCC_VERSION'] versionsmall = '.'.join(version.split('.')[0:2]) if target: v = conf.env v['GCC_CONFIGURED_ARCH'] = parse_gcc_target(target) if not v['CC']: v['CC'] = con...
decl = "enum%s" % name.replace(':', '_')
decl = "enum%s" % self.fullname.replace(':', '_')
def dump(self, file, namespace, index): file.write("") decl = "enum%s" % name.replace(':', '_') self.classes.append((self.fullname, namespace + '::s_' + decl + "Class")) file.write("#line %d\n" % (self.line)) file.write(" static const char * const s_%sName = \"%s\";\n" % (decl, self.fullname)) file.write("#line %d\n...
return "{0:04X}{1:04X}{2:04X}{3:012d}".format(random.randint(0, 32767), random.randint(0, 32767), random.randint(0, 32767), int(time.time()))
return "%04X%04X%04X%012d" % (random.randint(0, 32767), random.randint(0, 32767), random.randint(0, 32767), int(time.time()))
def newid(): return "{0:04X}{1:04X}{2:04X}{3:012d}".format(random.randint(0, 32767), random.randint(0, 32767), random.randint(0, 32767), int(time.time()))
w("\t%s = { isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = %s; name = \"%s\"; path = \"%s\" ; sourceTree = \"<group>\"; };\n" % (file.id, filetype, os.path.split(filename)[1], filename))
w("\t%s = {\n\t\tisa = PBXFileReference;\n\t\tfileEncoding = 4;\n\t\tlastKnownFileType = %s;\n\t\tname = \"%s\";\n\t\tpath = \"%s\";\n\t\tsourceTree = \"<group>\";\n\t};\n" % (file.id, filetype, os.path.split(filename)[1], filename))
def pbxFileRefTree(self, tree, path=''): w = self.file.write for name,dir in tree.directories.iteritems(): self.pbxFileRefTree(dir, os.path.join(path, tree.prefix)) for file in tree.files: filename = os.path.join(path, tree.prefix, file.filename) if isinstance(file, mak.sources.hsource): filetype = "sourcecode.c.h" eli...
w("\t%s = { isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = \"%s\"; path = \"%s\" ; sourceTree = \"SOURCE_ROOT\"; };\n" % (fileref, name+'.xcconfig', os.path.join('mak', 'xcode', name+'.xcconfig')))
w("\t%s = {\n\t\tisa = PBXFileReference;\n\t\tfileEncoding = 4;\n\t\tlastKnownFileType = text.xcconfig;\n\t\tname = \"%s\";\n\t\tpath = \"%s\";\n\t\tsourceTree = \"SOURCE_ROOT\";\n\t};\n" % (fileref, name+'.xcconfig', os.path.join('mak', 'xcode', name+'.xcconfig')))
def writePBXFileReference(self): w = self.file.write w("/* Begin PBXFileReference section */\n") for name, setting, buildfile, fileref in self.buildSettingsId[1]: w("\t%s = { isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = \"%s\"; path = \"%s\" ; sourceTree = \"SOURCE_ROOT\"; };\n" %...
w("\t%s = { isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.cpp; name = \"%s\"; path = \"%s\" ; sourceTree = \"SOURCE_ROOT\"; };\n" % (d.masterid, os.path.split(d.masterfilename)[1], d.masterfilename))
w("\t%s = {\n\t\tisa = PBXFileReference;\n\t\tfileEncoding = 4;\n\t\tlastKnownFileType = sourcecode.c.cpp;\n\t\tname = \"%s\";\n\t\tpath = \"%s\";\n\t\tsourceTree = \"SOURCE_ROOT\";\n\t};\n" % (d.masterid, os.path.split(d.masterfilename)[1], d.masterfilename))
def writePBXFileReference(self): w = self.file.write w("/* Begin PBXFileReference section */\n") for name, setting, buildfile, fileref in self.buildSettingsId[1]: w("\t%s = { isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = \"%s\"; path = \"%s\" ; sourceTree = \"SOURCE_ROOT\"; };\n" %...
w("\t%s = { isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = \"%s.app\" ; sourceTree = BUILT_PRODUCTS_DIR; };\n" % (d.applicationId, d.projectName))
w("\t%s = {\n\t\tisa = PBXFileReference;\n\t\texplicitFileType = wrapper.application;\n\t\tincludeInIndex = 0;\n\t\tpath = \"%s.app\";\n\t\tsourceTree = BUILT_PRODUCTS_DIR;\n\t};\n" % (d.applicationId, d.projectName))
def writePBXFileReference(self): w = self.file.write w("/* Begin PBXFileReference section */\n") for name, setting, buildfile, fileref in self.buildSettingsId[1]: w("\t%s = { isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = \"%s\"; path = \"%s\" ; sourceTree = \"SOURCE_ROOT\"; };\n" %...
w("\t%s = { isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = \"lib%s.a\" ; sourceTree = BUILT_PRODUCTS_DIR; };\n" % (d.applicationId, d.projectName))
w("\t%s = {\n\t\tisa = PBXFileReference;\n\t\texplicitFileType = archive.ar;\n\t\tincludeInIndex = 0;\n\t\tpath = \"lib%s.a\";\n\t\tsourceTree = BUILT_PRODUCTS_DIR;\n\t};\n" % (d.applicationId, d.projectName))
def writePBXFileReference(self): w = self.file.write w("/* Begin PBXFileReference section */\n") for name, setting, buildfile, fileref in self.buildSettingsId[1]: w("\t%s = { isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = \"%s\"; path = \"%s\" ; sourceTree = \"SOURCE_ROOT\"; };\n" %...
return 'ppc*'
return 'ppc' elif arch == 'ppc64': return 'ppc64'
def toXCodeArch(arch): if arch == 'x86': return 'i386' elif arch == 'amd64': return 'x86_64' elif arch == 'arm': return 'arm*' elif arch == 'ppc': return 'ppc*' else: return arch
return arch
return ''
def toXCodeArch(arch): if arch == 'x86': return 'i386' elif arch == 'amd64': return 'x86_64' elif arch == 'arm': return 'arm*' elif arch == 'ppc': return 'ppc*' else: return arch
platform,arch = platform.split('-') platform, sdk = toSDK(platform) if platform and name.startswith(platform): arch = toXCodeArch(arch) w("\t\t\t\"GCC_PREPROCESSOR_DEFINITIONS[sdk=%s][arch=%s]\" = %s;\n" % (sdk, arch, " ".join(options.defines)))
p, arch = platform.split('-') p, sdk = toSDK(p) arch = toXCodeArch(arch) if p and arch and name.startswith(p): w("\t\t\t\"GCC_PREPROCESSOR_DEFINITIONS[arch=%s]\" = \"$(GCC_PREPROCESSOR_DEFINITIONS_PLATFORM) %s\";\n" % (arch, " ".join(options.defines).replace('"', '\\"'))) w("\t\t\t\"HEADER_SEARCH_PATHS[arch=%s]\" = \"%...
def toSDK(platform): if platform == 'darwin': return 'osx', 'macosx*' elif platform == 'iphone': return 'iphone', 'iphoneos*' else: return '', ''
for d in self.projects:
print self.projects for d in self.projects: self.pbxBuildTree(d.sourceTree)
def writePBXBuildFile(self): w = self.file.write w("/* Begin PBXBuildFile section */\n") for d in self.projects:
pass
self.pbxFileRefTree(d.sourceTree)
def writePBXFileReference(self): w = self.file.write w("/* Begin PBXFileReference section */\n") for d in self.projects: pass w("/* End PBXFileReference section */\n\n")
def writePBXFrameworksBuildPhase(self): w = self.file.write w("/* Begin PBXFrameworksBuildPhase section */\n") for d in self.projects: pass w("/* End PBXFrameworksBuildPhase section */\n\n") def writePBXBuildGroup(self): w = self.file.write w("/* Begin PBXBuildGroup section */\n") for d in self.projects: pass w("/* En...
def writePBXGroup(self): w = self.file.write w("/* Begin PBXGroup section */\n") w("\t%s = {\n" % self.mainGroup) w("\t\tisa = PBXGroup;\n") w("\t\tname = BugEngine;\n") w("\t\tsourceTree = \"<group>\";\n") w("\t\tchildren = (\n") for d in self.projects: w("\t\t\t%s,\n"%d.sourceTree.id) w("\t\t);\n") w("\t};\n") for d ...
def writePBXFrameworksBuildPhase(self): w = self.file.write w("/* Begin PBXFrameworksBuildPhase section */\n") for d in self.projects: pass w("/* End PBXFrameworksBuildPhase section */\n\n")
w("\t\thasScannedForEncodings = 0;\n")
w("\t\thasScannedForEncodings = 1;\n")
def writePBXProject(self): w = self.file.write w("/* Begin PBXProject section */\n") w("\t%s /* Project object */ = {\n" % self.projectID) w("\t\tisa = PBXProject;\n") w("\t\tcompatibilityVersion = \"%s\";\n" % self.version[0]) w("\t\tbuildConfigurationList = %s;\n" % self.configurationsID) w("\t\thasScannedForEncoding...
solution.writePBXFrameworksBuildPhase() solution.writePBXBuildGroup() solution.writePBXHeadersBuildPhase()
solution.writePBXGroup()
def generateProject(task): solution = XCodeProject( task.name, task.outputs[0].bldpath(task.env), task.version, task.projects) solution.writeHeader() solution.writePBXBuildFile() solution.writePBXFileReference() solution.writePBXFrameworksBuildPhase() solution.writePBXBuildGroup() solution.writePBXHeadersBuildPhase() s...
solution.projects.append(project)
def create_xcode_project(t): toolName = t.features[0] if not solutions.has_key(toolName): appname = getattr(Utils.g_module, 'APPNAME', 'noname') outname = 'project.pbxproj' solution = GenerateProject(env=t.env) solution.set_outputs(t.path.find_or_declare(outname)) solution.name = appname solution.version = xcodeproject...
for target,arch in all_msvc_platforms:
for target,arch in all_msvc_platforms[::-1]:
def gather_wsdk_versions(conf, versions): version_pattern = re.compile('^v..?.?\...?.?') try: all_versions = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Microsoft\\Microsoft SDKs\\Windows') except WindowsError: try: all_versions = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\...
for arch,compiler in all_wince_platforms:
for arch,compiler in all_wince_platforms[::-1]:
def gather_msvc_versions(conf, versions): # checks SmartPhones SDKs try: ce_sdk = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Microsoft\\Windows CE Tools\\SDKs') except WindowsError: try: ce_sdk = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\Windows CE Tools\\SDKs') except W...
for target,arch in all_icl_platforms:
for target,arch in all_icl_platforms[::-1]:
def gather_icl_versions(conf, versions): version_pattern = re.compile('^...?.?\....?.?') try: all_versions = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Intel\\Compilers\\C++') except WindowsError: try: all_versions = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Intel\\Compilers\\C++')...
f.write('template< int ARENA, %s > static inline be_pointer_<T> create(%s)\n' % (types, params))
f.write('template< %s > static inline be_pointer_<T> create(::BugEngine::Allocator& allocator, %s)\n' % (types, params))
def template(f, n, const, types = '', params = '', args = ''): if n > 0: if types: template(f, n-1, True, ('class A%d, ' % n)+types, ('const A%d& a%d, ' %(n,n)) + params, ('a%d, '%n) + args) else: template(f, n-1, True, ('class A%d ' % n), ('const A%d& a%d' %(n,n)), ('a%d'%n)) else: if types : f.write('template< int AR...
f.write(' void* mem = BugEngine::Memory<ARENA>::alloc(sizeof(T), be_alignof(T));\n') f.write(' return be_pointer_<T>(new(mem) T(%s), &BugEngine::Memory<ARENA>::free);\n' % args)
f.write(' void* mem = allocator.alloc(sizeof(T), be_alignof(T));\n') f.write(' return be_pointer_<T>(new(mem) T(%s), allocator);\n' % args)
def template(f, n, const, types = '', params = '', args = ''): if n > 0: if types: template(f, n-1, True, ('class A%d, ' % n)+types, ('const A%d& a%d, ' %(n,n)) + params, ('a%d, '%n) + args) else: template(f, n-1, True, ('class A%d ' % n), ('const A%d& a%d' %(n,n)), ('a%d'%n)) else: if types : f.write('template< int AR...
f.write('template< int ARENA > static inline be_pointer_<T> create()\n')
f.write('static inline be_pointer_<T> create(::BugEngine::Allocator& allocator)\n')
def template(f, n, const, types = '', params = '', args = ''): if n > 0: if types: template(f, n-1, True, ('class A%d, ' % n)+types, ('const A%d& a%d, ' %(n,n)) + params, ('a%d, '%n) + args) else: template(f, n-1, True, ('class A%d ' % n), ('const A%d& a%d' %(n,n)), ('a%d'%n)) else: if types : f.write('template< int AR...
f.write(' void* mem = BugEngine::Memory<ARENA>::alloc(sizeof(T), be_alignof(T));\n') f.write(' return be_pointer_<T>(new(mem) T, &BugEngine::Memory<ARENA>::free);\n')
f.write(' void* mem = allocator.alloc(sizeof(T), be_alignof(T));\n') f.write(' return be_pointer_<T>(new(mem) T, allocator);\n')
def template(f, n, const, types = '', params = '', args = ''): if n > 0: if types: template(f, n-1, True, ('class A%d, ' % n)+types, ('const A%d& a%d, ' %(n,n)) + params, ('a%d, '%n) + args) else: template(f, n-1, True, ('class A%d ' % n), ('const A%d& a%d' %(n,n)), ('a%d'%n)) else: if types : f.write('template< int AR...
if lines[0].find(x) != -1:
if (lines[0].find(x) != -1) or (lines[1].find(x) != -1):
def get_msvc_version(conf, compiler, version, target, vcvars): debug('msvc: get_msvc_version: %r %r %r', compiler, version, target) batfile = os.path.join(conf.blddir, 'waf-print-msvc.bat') f = open(batfile, 'w') f.write("""@echo off
versions.append(('msvc '+version, targets))
versions.append(('msvc '+version+vcvar, targets))
def gather_msvc_versions(conf, versions): # checks SmartPhones SDKs try: ce_sdk = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Microsoft\\Windows CE Tools\\SDKs') except WindowsError: try: ce_sdk = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\Windows CE Tools\\SDKs') except W...
except Configure.ConfigurationError:
except Configure.ConfigurationError, e: print e
def gather_xenon_versions(conf, versions): try: xversion = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Wow6432node\\Microsoft\\XBox\\2.0\\SDK') except WindowsError: try: xversion = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, 'SOFTWARE\\Microsoft\\XBox\\2.0\\SDK') except WindowsError: return version,type = _w...
conf.gather_xenon_versions(conf.env['MSVC_INSTALLED_VERSIONS'])
conf.gather_xenon_versions(lst)
def get_msvc_versions(conf): if not conf.env.MSVC_INSTALLED_VERSIONS: lst = [] conf.gather_msvc_versions(lst) conf.gather_xenon_versions(conf.env['MSVC_INSTALLED_VERSIONS']) conf.gather_wsdk_versions(lst) conf.gather_icl_versions(lst) conf.env.MSVC_INSTALLED_VERSIONS = lst return conf.env.MSVC_INSTALLED_VERSIONS
conf.check_tool('winres') if not conf.env.WINRC:
try: conf.check_tool('winres') except:
def find_msvc(conf): # due to path format limitations, limit operation only to native Win32. Yeah it sucks. if sys.platform != 'win32': conf.fatal('MSVC module only works under native Win32 Python! cygwin is not supported yet') v = conf.env compiler, target,version, path, includes, libdirs = detect_msvc(conf) compil...
if const: if types: template(f, n-1, False, ('class A%d, ' % n)+types, ('const A%d& a%d, ' %(n,n)) + params, ('a%d, '%n) + args) template(f, n-1, True, ('class A%d, ' % n)+types, ('const A%d& a%d, ' %(n,n)) + params, ('a%d, '%n) + args) else: template(f, n-1, False, ('class A%d ' % n), ('const A%d& a%d' %(n,n)), ('a%d'...
if types: template(f, n-1, True, ('class A%d, ' % n)+types, ('const A%d& a%d, ' %(n,n)) + params, ('a%d, '%n) + args)
def template(f, n, const, types = '', params = '', args = ''): if n > 0: if const: if types: template(f, n-1, False, ('class A%d, ' % n)+types, ('const A%d& a%d, ' %(n,n)) + params, ('a%d, '%n) + args) template(f, n-1, True, ('class A%d, ' % n)+types, ('const A%d& a%d, ' %(n,n)) + params, ('a%d, '%n) + args) else: temp...
if types: template(f, n-1, False, ('class A%d, ' % n)+types, ('A%d& a%d, ' %(n,n)) + params, ('a%d, '%n) + args) template(f, n-1, True, ('class A%d, ' % n)+types, ('A%d& a%d, ' %(n,n)) + params, ('a%d, '%n) + args) else: template(f, n-1, False, ('class A%d ' % n), ('A%d& a%d' %(n,n)), ('a%d'%n)) template(f, n-1, True, ...
template(f, n-1, True, ('class A%d ' % n), ('const A%d& a%d' %(n,n)), ('a%d'%n)) else:
def template(f, n, const, types = '', params = '', args = ''): if n > 0: if const: if types: template(f, n-1, False, ('class A%d, ' % n)+types, ('const A%d& a%d, ' %(n,n)) + params, ('a%d, '%n) + args) template(f, n-1, True, ('class A%d, ' % n)+types, ('const A%d& a%d, ' %(n,n)) + params, ('a%d, '%n) + args) else: temp...
template(f, i, False);
def template(f, n, const, types = '', params = '', args = ''): if n > 0: if const: if types: template(f, n-1, False, ('class A%d, ' % n)+types, ('const A%d& a%d, ' %(n,n)) + params, ('a%d, '%n) + args) template(f, n-1, True, ('class A%d, ' % n)+types, ('const A%d& a%d, ' %(n,n)) + params, ('a%d, '%n) + args) else: temp...
for platform in os.listdir(os.path.join('extra')): pdir = sources.directory() if os.path.isdir(os.path.join('extra', platform, category, name, 'api')): pdir.addDirectory(self.scandir(os.path.join('extra', platform, category, name, 'api'), '', 0, [platform], self.archs), 'api') try: self.globalarchoptions[platform].incl...
if os.path.isdir('extra'): for platform in os.listdir(os.path.join('extra')): pdir = sources.directory() if os.path.isdir(os.path.join('extra', platform, category, name, 'api')): pdir.addDirectory(self.scandir(os.path.join('extra', platform, category, name, 'api'), '', 0, [platform], self.archs), 'api') try: self.globa...
def __init__( self, name, depends, category, localoptions, globaloptions, localarchoptions, globalarchoptions, platforms, archs, sourcelist, ): while None in depends: depends.remove(None) self.name = name self.category = category self.depends = depends self.tasks = {} self.root = os.path.join('src', category, name) ...
[('iphone-debug', newid(), newid(), newid()),
[('osx-debug', newid(), newid(), newid()), ('osx-final', newid(), newid(), newid()), ('osx-profile', newid(), newid(), newid()), ('iphone-debug', newid(), newid(), newid()),
def __init__(self, name, path, version, projects): self.file = open(path, 'w') self.version = version self.projects = projects self.projectID = newid() self.buildSettingsId = (newid(), [('iphone-debug', newid(), newid(), newid()), ('iphone-profile', newid(), newid(), newid()), ('iphone-final', newid(), newid(), newid()...
('iphone-final', newid(), newid(), newid()), ('osx-debug', newid(), newid(), newid()), ('osx-profile', newid(), newid(), newid()), ('osx-final', newid(), newid(), newid())])
('iphone-final', newid(), newid(), newid())])
def __init__(self, name, path, version, projects): self.file = open(path, 'w') self.version = version self.projects = projects self.projectID = newid() self.buildSettingsId = (newid(), [('iphone-debug', newid(), newid(), newid()), ('iphone-profile', newid(), newid(), newid()), ('iphone-final', newid(), newid(), newid()...
def pbxBuildTree(self, tree, process):
def pbxBuildTree(self, tree, processcpp):
def pbxBuildTree(self, tree, process): w = self.file.write tree.id = newid() for name,dir in tree.directories.iteritems(): self.pbxBuildTree(dir, process) for file in tree.files: file.id = newid() file.buildid = newid() if process and file.process and not isinstance(file, mak.sources.hsource): w("\t%s = { isa = PBXBuil...