From 428b26b59f11b9e6e6fee992152cfb69802730e3 Mon Sep 17 00:00:00 2001 From: eastWillow Date: Mon, 13 Oct 2025 23:19:21 +0800 Subject: [PATCH] fix windows menuconfig style support 1. back is not the color name in _NAMED_COLORS 2. windows terminal python enviroment not support the -1 as the color --- Makefile | 9 +++++++++ tools/kconfig/menuconfig.py | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 8c59ca3d..954a3c8f 100644 --- a/Makefile +++ b/Makefile @@ -179,6 +179,15 @@ endif # Menuconfig .PHONY: config +KCONFIGLIB_AVAILABLE := $(shell python3 -c "import kconfiglib" >/dev/null 2>&1 && echo 1 || echo 0) + config: configs/Kconfig +ifeq ($(KCONFIGLIB_AVAILABLE),1) + @echo ">>> Using Kconfiglib" + @python3 -m menuconfig $< + @python3 -m genconfig $< +else + @echo ">>> Falling back to local tools" @tools/kconfig/menuconfig.py $< @tools/kconfig/genconfig.py $< +endif \ No newline at end of file diff --git a/tools/kconfig/menuconfig.py b/tools/kconfig/menuconfig.py index 0c71c419..b1e2d158 100755 --- a/tools/kconfig/menuconfig.py +++ b/tools/kconfig/menuconfig.py @@ -285,7 +285,7 @@ _STYLES = { "default": """ - path=fg:white,bg:back,bold + path=fg:white,bg:black,bold separator=fg:white,bg:blue,bold list=fg:white,bg:black selection=fg:black,bg:white,bold