提交 65238275 编写于 作者: mysterywolf's avatar mysterywolf

[tools] --project-name= can use name with space

上级 86f12731
......@@ -959,7 +959,7 @@ def EndBuilding(target, program = None):
if not isinstance(project_path, str) or len(project_path) == 0 :
project_path = os.path.join(BSP_ROOT, 'rt-studio-project')
MkDist(program, BSP_ROOT, Rtt_Root, Env, project_name, project_path)
child = subprocess.Popen('scons --target=eclipse --project-name=' + project_name, cwd=project_path, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
child = subprocess.Popen('scons --target=eclipse --project-name="{}"'.format(project_name), cwd=project_path, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
stdout, stderr = child.communicate()
need_exit = True
if GetOption('cscope'):
......
......@@ -376,13 +376,13 @@ def MkDist(program, BSP_ROOT, RTT_ROOT, Env, project_name, project_path):
target_project_type = GetOption('target')
if target_project_type:
child = subprocess.Popen('scons --target={} --project-name={}'.format(target_project_type, project_name), cwd=dist_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
child = subprocess.Popen('scons --target={} --project-name="{}"'.format(target_project_type, project_name), cwd=dist_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
stdout, stderr = child.communicate()
if child.returncode == 0:
print(stdout)
else:
print(stderr)
else:
print('suggest to use command scons --dist [--target=xxx] [--project-name=xxx] [--project-path=xxx]')
print('suggest to use command scons --dist [--target=xxx] [--project-name="xxx"] [--project-path="xxx"]')
print('dist project successfully!')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册