MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / VS_AddGroup

Function VS_AddGroup

tools/targets/vs.py:41–71  ·  view source on GitHub ↗
(ProjectFiles, parent, name, files, libs, project_path)

Source from the content-addressed store, hash-verified

39fs_encoding = sys.getfilesystemencoding()
40
41def VS_AddGroup(ProjectFiles, parent, name, files, libs, project_path):
42 Filter = SubElement(parent, 'Filter')
43 Filter.set('Name', name) #set group name to group
44
45 for f in files:
46 fn = f.rfile()
47 name = fn.name
48 path = os.path.dirname(fn.abspath)
49
50 path = _make_path_relative(project_path, path)
51 path = os.path.join(path, name)
52 try:
53 path = path.decode(fs_encoding)
54 except:
55 path = path
56 File = SubElement(Filter, 'File')
57 File.set('RelativePath', path)
58
59 for lib in libs:
60 name = os.path.basename(lib)
61 path = os.path.dirname(lib)
62
63 path = _make_path_relative(project_path, path)
64 path = os.path.join(path, name)
65
66 File = SubElement(Filter, 'File')
67 try:
68 path = path.decode(fs_encoding)
69 except:
70 path = path
71 File.set('RelativePath', path)
72
73def VS_AddHeadFilesGroup(program, elem, project_path):
74 utils.source_ext = []

Callers 1

VSProjectFunction · 0.85

Calls 2

_make_path_relativeFunction · 0.90
joinMethod · 0.45

Tested by

no test coverage detected