[tools] --project-name= can use name with space
This commit is contained in:
parent
86f127311d
commit
65238275ac
|
@ -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!')
|
||||
|
|
Loading…
Reference in New Issue