提交 0633e985 编写于 作者: wuyangyong's avatar wuyangyong

update iar.py: fixed bug when path is absolute.

上级 bde2e918
......@@ -37,7 +37,10 @@ def IARAddGroup(parent, name, files, project_path):
file = SubElement(group, 'file')
file_name = SubElement(file, 'name')
file_name.text = ('$PROJ_DIR$\\' + path).decode(fs_encoding)
if os.path.isabs(path):
file_name.text = path.decode(fs_encoding)
else:
file_name.text = ('$PROJ_DIR$\\' + path).decode(fs_encoding)
def IARWorkspace(target):
# make an workspace
......@@ -91,7 +94,11 @@ def IARProject(target, script):
if name.text == 'CCIncludePath2' or name.text == 'newCCIncludePaths':
for path in paths:
state = SubElement(option, 'state')
state.text = '$PROJ_DIR$\\' + path
if os.path.isabs(path):
state.text = path
else:
state.text = '$PROJ_DIR$\\' + path
if name.text == 'CCDefines':
for define in CPPDEFINES:
state = SubElement(option, 'state')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册