[tools] Replace the old pyconfig to guiconfig.

This commit is contained in:
armink 2019-07-24 18:30:44 +08:00
parent 82662d2524
commit 1b3358a966
3 changed files with 3 additions and 1264 deletions

View File

@ -377,29 +377,19 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
dest = 'pyconfig', dest = 'pyconfig',
action = 'store_true', action = 'store_true',
default = False, default = False,
help = 'Python ASCII menuconfig for RT-Thread BSP') help = 'Python GUI menuconfig for RT-Thread BSP')
AddOption('--pyconfig-silent', AddOption('--pyconfig-silent',
dest = 'pyconfig_silent', dest = 'pyconfig_silent',
action = 'store_true', action = 'store_true',
default = False, default = False,
help = 'Don`t show pyconfig window') 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'): if GetOption('pyconfig_silent'):
from menuconfig import pyconfig_silent from menuconfig import guiconfig_silent
pyconfig_silent(Rtt_Root) guiconfig_silent(Rtt_Root)
exit(0) exit(0)
elif GetOption('pyconfig'): elif GetOption('pyconfig'):
from menuconfig import pyconfig
pyconfig(Rtt_Root)
exit(0)
elif GetOption('guiconfig'):
from menuconfig import guiconfig from menuconfig import guiconfig
guiconfig(Rtt_Root) guiconfig(Rtt_Root)

View File

@ -226,51 +226,6 @@ def menuconfig(RTT_ROOT):
if mtime != mtime2: if mtime != mtime2:
mk_rtconfig(fn) 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 # guiconfig for windows and linux
def guiconfig(RTT_ROOT): def guiconfig(RTT_ROOT):
import pyguiconfig import pyguiconfig

File diff suppressed because it is too large Load Diff