mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-26 06:43:58 +08:00
[tools] pyconfig 增加 silent 模式,不显示窗口但可以更新 .config 和 rtconfig.h
Signed-off-by: MurphyZhao <d2014zjt@163.com>
This commit is contained in:
+14
-2
@@ -131,7 +131,7 @@ def GenCconfigFile(env, BuildOptions):
|
||||
f = open('cconfig.h', 'r')
|
||||
if f:
|
||||
contents = f.read()
|
||||
f.close();
|
||||
f.close()
|
||||
|
||||
prep = PatchedPreProcessor()
|
||||
prep.process_contents(contents)
|
||||
@@ -349,8 +349,20 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
|
||||
action = 'store_true',
|
||||
default = False,
|
||||
help = 'make menuconfig for RT-Thread BSP')
|
||||
if GetOption('pyconfig'):
|
||||
AddOption('--pyconfig-silent',
|
||||
dest = 'pyconfig_silent',
|
||||
action = 'store_true',
|
||||
default = False,
|
||||
help = 'Don`t show pyconfig window')
|
||||
|
||||
if GetOption('pyconfig_silent'):
|
||||
from menuconfig import pyconfig_silent
|
||||
|
||||
pyconfig_silent(Rtt_Root)
|
||||
exit(0)
|
||||
elif GetOption('pyconfig'):
|
||||
from menuconfig import pyconfig
|
||||
|
||||
pyconfig(Rtt_Root)
|
||||
exit(0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user