提交 1b3358a9 编写于 作者: armink_ztl's avatar armink_ztl

[tools] Replace the old pyconfig to guiconfig.

上级 82662d25
......@@ -377,29 +377,19 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
dest = 'pyconfig',
action = 'store_true',
default = False,
help = 'Python ASCII menuconfig for RT-Thread BSP')
help = 'Python GUI menuconfig for RT-Thread BSP')
AddOption('--pyconfig-silent',
dest = 'pyconfig_silent',
action = 'store_true',
default = False,
help = 'Don`t show pyconfig window')
AddOption('--guiconfig',
dest = 'guiconfig',
action = 'store_true',
default = False,
help = 'Python GUI menuconfig for RT-Thread BSP')
if GetOption('pyconfig_silent'):
from menuconfig import pyconfig_silent
from menuconfig import guiconfig_silent
pyconfig_silent(Rtt_Root)
guiconfig_silent(Rtt_Root)
exit(0)
elif GetOption('pyconfig'):
from menuconfig import pyconfig
pyconfig(Rtt_Root)
exit(0)
elif GetOption('guiconfig'):
from menuconfig import guiconfig
guiconfig(Rtt_Root)
......
......@@ -226,51 +226,6 @@ def menuconfig(RTT_ROOT):
if mtime != mtime2:
mk_rtconfig(fn)
# pyconfig for windows and linux
def pyconfig(RTT_ROOT):
import pymenuconfig
touch_env()
env_dir = get_env_dir()
os.environ['PKGS_ROOT'] = os.path.join(env_dir, 'packages')
fn = '.config'
if os.path.isfile(fn):
mtime = os.path.getmtime(fn)
else:
mtime = -1
pymenuconfig.main(['--kconfig', 'Kconfig', '--config', '.config'])
if os.path.isfile(fn):
mtime2 = os.path.getmtime(fn)
else:
mtime2 = -1
# make rtconfig.h
if mtime != mtime2:
mk_rtconfig(fn)
# pyconfig_silent for windows and linux
def pyconfig_silent(RTT_ROOT):
import pymenuconfig
print("In pyconfig silent mode. Don`t display menuconfig window.")
touch_env()
env_dir = get_env_dir()
os.environ['PKGS_ROOT'] = os.path.join(env_dir, 'packages')
fn = '.config'
pymenuconfig.main(['--kconfig', 'Kconfig', '--config', '.config', '--silent', 'True'])
# silent mode, force to make rtconfig.h
mk_rtconfig(fn)
# guiconfig for windows and linux
def guiconfig(RTT_ROOT):
import pyguiconfig
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册