#NEWLINE# def generate_pbx_group( self ) : #NEWLINE# #INDENT# groupmap = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# target_src_map = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for t in self . build . targets : #NEWLINE# #INDENT# groupmap [ t ] = self . gen_id ( ) #NEWLINE# target_src_map [ t ] = self . gen_id ( ) #NEWLINE# #UNINDENT# self . ofile . write ( '\n/* Begin PBXGroup section */\n' ) #NEWLINE# sources_id = self . gen_id ( ) #NEWLINE# resources_id = self . gen_id ( ) #NEWLINE# products_id = self . gen_id ( ) #NEWLINE# self . write_line ( ( '%s = {' % self . maingroup_id ) ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( 'isa = PBXGroup;' ) #NEWLINE# self . write_line ( 'children = (' ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( ( '%s /* Sources */,' % sources_id ) ) #NEWLINE# self . write_line ( ( '%s /* Resources */,' % resources_id ) ) #NEWLINE# self . write_line ( ( '%s /* Products */,' % products_id ) ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( ');' ) #NEWLINE# self . write_line ( 'sourceTree = "<group>";' ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( '};' ) #NEWLINE# self . write_line ( ( '%s /* Sources */ = {' % sources_id ) ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( 'isa = PBXGroup;' ) #NEWLINE# self . write_line ( 'children = (' ) #NEWLINE# self . indent_level += 1 #NEWLINE# for t in self . build . targets : #NEWLINE# #INDENT# self . write_line ( ( '%s /* %s */,' % ( groupmap [ t ] , t ) ) ) #NEWLINE# #UNINDENT# self . indent_level -= 1 #NEWLINE# self . write_line ( ');' ) #NEWLINE# self . write_line ( 'name = Sources;' ) #NEWLINE# self . write_line ( 'sourcetree = "<group>";' ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( '};' ) #NEWLINE# self . write_line ( ( '%s /* Resources */ = {' % resources_id ) ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( 'isa = PBXGroup;' ) #NEWLINE# self . write_line ( 'children = (' ) #NEWLINE# self . write_line ( ');' ) #NEWLINE# self . write_line ( 'name = Resources;' ) #NEWLINE# self . write_line ( 'sourceTree = "<group>";' ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( '};' ) #NEWLINE# for t in self . build . targets : #NEWLINE# #INDENT# self . write_line ( ( '%s /* %s */ = {' % ( groupmap [ t ] , t ) ) ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( 'isa = PBXGroup;' ) #NEWLINE# self . write_line ( 'children = (' ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( ( '%s /* Source files */,' % target_src_map [ t ] ) ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( ');' ) #NEWLINE# self . write_line ( ( 'name = "%s";' % t ) ) #NEWLINE# self . write_line ( 'sourceTree = "<group>";' ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( '};' ) #NEWLINE# self . write_line ( ( '%s /* Source files */ = {' % target_src_map [ t ] ) ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( 'isa = PBXGroup;' ) #NEWLINE# self . write_line ( 'children = (' ) #NEWLINE# self . indent_level += 1 #NEWLINE# for s in self . build . targets [ t ] . sources : #NEWLINE# #INDENT# s = os . path . join ( s . subdir , s . fname ) #NEWLINE# if isinstance ( s , str ) : #NEWLINE# #INDENT# self . write_line ( ( '%s /* %s */,' % ( self . filemap [ s ] , s ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# for o in self . build . targets [ t ] . objects : #NEWLINE# #INDENT# o = os . path . join ( self . build . targets [ t ] . subdir , o ) #NEWLINE# self . write_line ( ( '%s /* %s */,' % ( self . filemap [ o ] , resources_id ) ) ) #NEWLINE# #UNINDENT# self . indent_level -= 1 #NEWLINE# self . write_line ( ');' ) #NEWLINE# self . write_line ( 'name = "Source files";' ) #NEWLINE# self . write_line ( 'sourceTree = "<group>";' ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( '};' ) #NEWLINE# #UNINDENT# self . write_line ( ( '%s /* Products */ = {' % products_id ) ) #NEWLINE# self . indent_level += 1 #NEWLINE# self . write_line ( 'isa = PBXGroup;' ) #NEWLINE# self . write_line ( 'children = (' ) #NEWLINE# self . indent_level += 1 #NEWLINE# for t in self . build . targets : #NEWLINE# #INDENT# self . write_line ( ( '%s /* %s */,' % ( self . target_filemap [ t ] , t ) ) ) #NEWLINE# #UNINDENT# self . indent_level -= 1 #NEWLINE# self . write_line ( ');' ) #NEWLINE# self . write_line ( 'name = Products;' ) #NEWLINE# self . write_line ( 'sourceTree = "<group>";' ) #NEWLINE# self . indent_level -= 1 #NEWLINE# self . write_line ( '};' ) #NEWLINE# self . ofile . write ( '/* End PBXGroup section */\n' )