Esempio n. 1
0
def VS_add_HeadFiles(program, elem, project_path):
    utils.source_ext = []
    utils.source_ext = ["h"]
    for item in program:
        utils.walk_children(item)
    utils.source_list.sort()
    # print utils.source_list
    ItemGroup = SubElement(elem, 'ItemGroup')

    filter_h_ItemGroup = SubElement(filter_project, 'ItemGroup')
    for f in utils.source_list:
        path = _make_path_relative(project_path, f)
        File = SubElement(ItemGroup, 'ClInclude')

        if sys.version > '3':
            File.set('Include', path)
        else:
            # python3 is no decode function
            File.set('Include', path.decode(fs_encoding))

        # add project.vcxproj.filter
        ClInclude = SubElement(filter_h_ItemGroup, 'ClInclude')

        if sys.version > '3':
            ClInclude.set('Include', path)
        else:
            # python3 is no decode function
            ClInclude.set('Include', path.decode(fs_encoding))

        Filter = SubElement(ClInclude, 'Filter')
        Filter.text = 'Header Files'
Esempio n. 2
0
def CLAddHeaderFiles(parent, program, project_path):
    utils.source_ext = []
    utils.source_ext = ["h"]
    for item in program:
        utils.walk_children(item)
    utils.source_list.sort()

    for f in utils.source_list:
        path = _make_path_relative(project_path, f)
        CLAddFile(parent, path)
Esempio n. 3
0
def CB_AddHeadFiles(program, elem, project_path):
    utils.source_ext = []
    utils.source_ext = ["h"]
    for item in program:
        utils.walk_children(item)
    utils.source_list.sort()
    # print utils.source_list

    for f in utils.source_list:
        path = _make_path_relative(project_path, f)
        Unit = SubElement(elem, 'Unit')
        Unit.set('filename', path.decode(fs_encoding))
Esempio n. 4
0
def VS_AddHeadFilesGroup(program, elem, project_path):
    utils.source_ext = []
    utils.source_ext = ["h"]
    for item in program:
        utils.walk_children(item)    
    utils.source_list.sort()
    # print utils.source_list
    
    for f in utils.source_list:
        path = _make_path_relative(project_path, f)
        File = SubElement(elem, 'File')
        File.set('RelativePath', path.decode(fs_encoding))
Esempio n. 5
0
def CB_AddHeadFiles(program, elem, project_path):
    utils.source_ext = []
    utils.source_ext = ["h"]
    for item in program:
        utils.walk_children(item)    
    utils.source_list.sort()
    # print utils.source_list
    
    for f in utils.source_list:
        path = _make_path_relative(project_path, f)
        Unit = SubElement(elem, 'Unit')
        Unit.set('filename', path.decode(fs_encoding))
Esempio n. 6
0
def VS_add_HeadFiles(program, elem, project_path):
    utils.source_ext = []
    utils.source_ext = ["h"]
    for item in program:
        utils.walk_children(item)    
    utils.source_list.sort()
    # print utils.source_list
    ItemGroup = SubElement(elem, 'ItemGroup')

    filter_h_ItemGroup = SubElement(filter_project, 'ItemGroup')
    for f in building.source_list:
        path = _make_path_relative(project_path, f)
        File = SubElement(ItemGroup, 'ClInclude')
        File.set('Include', path.decode(fs_encoding))

        # add project.vcxproj.filter
        ClInclude = SubElement(filter_h_ItemGroup, 'ClInclude')
        ClInclude.set('Include', path.decode(fs_encoding))
        Filter = SubElement(ClInclude, 'Filter')
        Filter.text='Header Files'