【完善】添加 eclipse 生成工程相关处理,并完善参数检查

This commit is contained in:
SummerGift 2019-06-18 14:27:23 +08:00
parent bd220bcda6
commit 4ca30835c1
2 changed files with 13 additions and 5 deletions

View File

@ -884,6 +884,17 @@ def EndBuilding(target, program = None):
from mkdist import MkDist
project_path = GetOption('make-project-path')
project_name = GetOption('make-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)
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)
rtt_ide = {'project_path' : project_path, 'project_name' : project_name}
MkDist(program, BSP_ROOT, Rtt_Root, Env, rtt_ide)
need_exit = True

View File

@ -153,7 +153,8 @@ def bs_update_ide_project(bsp_root, rtt_root, rttide = None):
'vs2012':('msvc', 'cl'),
'cdk':('gcc', 'gcc')}
else:
tgt_dict = {'eclipse':('gcc', 'gcc')}
item = 'eclipse --project-name=' + rttide['project_name']
tgt_dict = {item:('gcc', 'gcc')}
scons_env = os.environ.copy()
scons_env['RTT_ROOT'] = rtt_root
@ -315,10 +316,6 @@ def MkDist(program, BSP_ROOT, RTT_ROOT, Env, rttide = None):
dist_dir = os.path.join(BSP_ROOT, 'dist', dist_name)
else:
dist_dir = rttide['project_path']
if not isinstance(dist_dir, str):
print("\n--project-path=your_project_path parameter is required.")
print("\nstop!")
return
target_path = os.path.join(dist_dir, 'rt-thread')