Merge pull request #4734 from margguo/dist_ide_with_default_value

dev:[tools] add default project name and project path while --dist-ide
This commit is contained in:
Bernard Xiong 2021-05-27 16:53:07 +08:00 committed by GitHub
commit e3b36b2fe0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 7 deletions

View File

@ -925,14 +925,11 @@ def EndBuilding(target, program = None):
project_name = GetOption('project-name')
if not isinstance(project_path, str) or len(project_path) == 0 :
print("\nwarning : --project-path=your_project_path parameter is required.")
print("\nstop!")
exit(0)
project_path = os.path.join(BSP_ROOT, 'dist_ide_project')
print("\nwarning : --project-path not specified, use default path: {0}.".format(project_path))
if not isinstance(project_name, str) or len(project_name) == 0:
print("\nwarning : --project-name=your_project_name parameter is required.")
print("\nstop!")
exit(0)
project_name = "dist_ide_project"
print("\nwarning : --project-name not specified, use default project name: {0}.".format(project_name))
rtt_ide = {'project_path' : project_path, 'project_name' : project_name}
MkDist(program, BSP_ROOT, Rtt_Root, Env, rtt_ide)