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

Function SDKAddGroup

tools/targets/cdk.py:34–52  ·  view source on GitHub ↗
(ProjectFiles, parent, name, files, project_path)

Source from the content-addressed store, hash-verified

32from utils import xml_indent
33
34def SDKAddGroup(ProjectFiles, parent, name, files, project_path):
35 # don't add an empty group
36 if len(files) == 0:
37 return
38
39 group = SubElement(parent, 'VirtualDirectory', attrib={'Name': name})
40
41 for f in files:
42 fn = f.rfile()
43 name = fn.name
44 path = os.path.dirname(fn.abspath)
45
46 basename = os.path.basename(path)
47 path = _make_path_relative(project_path, path)
48 elm_attr_name = os.path.join(path, name)
49
50 file = SubElement(group, 'File', attrib={'Name': elm_attr_name})
51
52 return group
53
54def _CDKProject(tree, target, script):
55

Callers 1

_CDKProjectFunction · 0.70

Calls 2

_make_path_relativeFunction · 0.90
joinMethod · 0.45

Tested by

no test coverage detected