summaryrefslogtreecommitdiff
path: root/tools/building.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/building.py')
-rw-r--r--tools/building.py33
1 files changed, 33 insertions, 0 deletions
diff --git a/tools/building.py b/tools/building.py
index c037c2d068..edb95fdda5 100644
--- a/tools/building.py
+++ b/tools/building.py
@@ -161,6 +161,21 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
action = 'store_true',
default = False,
help = 'make distribution and strip useless files')
+ AddOption('--dist-ide',
+ dest = 'make-dist-ide',
+ action = 'store_true',
+ default = False,
+ help = 'make distribution for RT-Thread Studio IDE')
+ AddOption('--project-path',
+ dest = 'make-project-path',
+ type = 'string',
+ default = False,
+ help = 'set dist-ide project output path')
+ AddOption('--project-name',
+ dest = 'make-project-name',
+ type = 'string',
+ default = False,
+ help = 'set project name')
AddOption('--cscope',
dest = 'cscope',
action = 'store_true',
@@ -865,6 +880,24 @@ def EndBuilding(target, program = None):
from mkdist import MkDist_Strip
MkDist_Strip(program, BSP_ROOT, Rtt_Root, Env)
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')
+
+ 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
if GetOption('cscope'):
from cscope import CscopeDatabase
CscopeDatabase(Projects)