【完善】添加 eclipse 生成工程相关处理,并完善参数检查
This commit is contained in:
parent
bd220bcda6
commit
4ca30835c1
@ -884,6 +884,17 @@ def EndBuilding(target, program = None):
|
|||||||
from mkdist import MkDist
|
from mkdist import MkDist
|
||||||
project_path = GetOption('make-project-path')
|
project_path = GetOption('make-project-path')
|
||||||
project_name = GetOption('make-project-name')
|
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}
|
rtt_ide = {'project_path' : project_path, 'project_name' : project_name}
|
||||||
MkDist(program, BSP_ROOT, Rtt_Root, Env, rtt_ide)
|
MkDist(program, BSP_ROOT, Rtt_Root, Env, rtt_ide)
|
||||||
need_exit = True
|
need_exit = True
|
||||||
|
@ -153,7 +153,8 @@ def bs_update_ide_project(bsp_root, rtt_root, rttide = None):
|
|||||||
'vs2012':('msvc', 'cl'),
|
'vs2012':('msvc', 'cl'),
|
||||||
'cdk':('gcc', 'gcc')}
|
'cdk':('gcc', 'gcc')}
|
||||||
else:
|
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 = os.environ.copy()
|
||||||
scons_env['RTT_ROOT'] = rtt_root
|
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)
|
dist_dir = os.path.join(BSP_ROOT, 'dist', dist_name)
|
||||||
else:
|
else:
|
||||||
dist_dir = rttide['project_path']
|
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')
|
target_path = os.path.join(dist_dir, 'rt-thread')
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user