diff options
| author | armink <[email protected]> | 2019-06-18 20:11:12 +0800 |
|---|---|---|
| committer | armink <[email protected]> | 2019-06-18 20:11:12 +0800 |
| commit | d0d15c75a2a14bf7b21ad9859e9fa60aede98a34 (patch) | |
| tree | f4ef02d70dfde4d8da1afc82cd2cedddc3cf2ed6 /tools | |
| parent | ab81ff6815db0ee641dc11450076d733fb5d15a6 (diff) | |
[tools] Add project config reset feature to eclipse target.
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/building.py | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tools/building.py b/tools/building.py index edb95fdda5..11f356f078 100644 --- a/tools/building.py +++ b/tools/building.py @@ -167,15 +167,20 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [ default = False, help = 'make distribution for RT-Thread Studio IDE') AddOption('--project-path', - dest = 'make-project-path', + dest = 'project-path', type = 'string', default = False, help = 'set dist-ide project output path') AddOption('--project-name', - dest = 'make-project-name', + dest = 'project-name', type = 'string', default = False, help = 'set project name') + AddOption('--reset-project-config', + dest = 'reset-project-config', + action = 'store_true', + default = False, + help = 'reset the project configurations to default') AddOption('--cscope', dest = 'cscope', action = 'store_true', @@ -847,7 +852,8 @@ def GenTargetProject(program = None): if GetOption('target') == 'eclipse': from eclipse import TargetEclipse - TargetEclipse(Env) + TargetEclipse(Env, GetOption('reset-project-config'), GetOption('project-name')) + def EndBuilding(target, program = None): import rtconfig @@ -882,8 +888,8 @@ def EndBuilding(target, program = None): need_exit = True if GetOption('make-dist-ide') and program != None: from mkdist import MkDist - project_path = GetOption('make-project-path') - project_name = GetOption('make-project-name') + project_path = GetOption('project-path') + 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.") |
