Skip to content

Commit 5ad4ec2

Browse files
committed
【完善】:错误提示信息
1 parent 85dee52 commit 5ad4ec2

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

cmds/cmd_menuconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,8 +162,8 @@ def cmd(args):
162162
if platform.system() == "Windows":
163163
os.system('chcp 65001 > nul')
164164

165-
print("\n<menuconfig> 命令应当在某一特定 BSP 目录下执行,例如:\"rt-thread/bsp/stm32/stm32f091-st-nucleo\"")
166-
print("请确保当前目录为 BSP 根目录,并且该目录中有 Kconfig 文件。\n")
165+
print("\n\033[1;31;40m<menuconfig> 命令应当在某一特定 BSP 目录下执行,例如:\"rt-thread/bsp/stm32/stm32f091-st-nucleo\"\033[0m")
166+
print("\033[1;31;40m请确保当前目录为 BSP 根目录,并且该目录中有 Kconfig 文件。\033[0m\n")
167167

168168
print ("<menuconfig> command should be used in a bsp root path with a Kconfig file.")
169169
print ("Example: \"rt-thread/bsp/stm32/stm32f091-st-nucleo\"")

cmds/cmd_package.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -359,11 +359,11 @@ def package_list():
359359
if platform.system() == "Windows":
360360
os.system('chcp 65001 > nul')
361361

362-
print ("\n当前路径下没有发现 .config 文件,请确保当前目录为 BSP 根目录。")
363-
print ("如果确定当前目录为 BSP 根目录,请先使用 <menuconfig> 命令来生成 .config 文件。\n")
362+
print ("\n\033[1;31;40m当前路径下没有发现 .config 文件,请确保当前目录为 BSP 根目录。\033[0m")
363+
print ("\033[1;31;40m如果确定当前目录为 BSP 根目录,请先使用 <menuconfig> 命令来生成 .config 文件。\033[0m\n")
364364

365-
print ('\nNo system configuration file : .config.')
366-
print ('You should use < menuconfig > command to config bsp first.')
365+
print ('\033[1;31;40mNo system configuration file : .config.\033[0m')
366+
print ('\033[1;31;40mYou should use < menuconfig > command to config bsp first.\033[0m')
367367

368368
if platform.system() == "Windows":
369369
os.system('chcp 437 > nul')
@@ -520,8 +520,8 @@ def pre_package_update():
520520
if platform.system() == "Windows":
521521
os.system('chcp 65001 > nul')
522522

523-
print ("\n当前路径下没有发现 .config 文件,请确保当前目录为 BSP 根目录。")
524-
print ("如果确定当前目录为 BSP 根目录,请先使用 <menuconfig> 命令来生成 .config 文件。\n")
523+
print ("\n\033[1;31;40m当前路径下没有发现 .config 文件,请确保当前目录为 BSP 根目录。\033[0m")
524+
print ("\033[1;31;40m如果确定当前目录为 BSP 根目录,请先使用 <menuconfig> 命令来生成 .config 文件。\033[0m\n")
525525

526526
print ('No system configuration file : .config.')
527527
print ('You should use < menuconfig > command to config bsp first.')

env.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,10 @@ def main():
6969
except Exception, e:
7070
if platform.system() == "Windows":
7171
os.system('chcp 65001 > nul')
72-
73-
print ("rt-thread 必须被放置在纯英文目录下,请移动 rt-thread 到纯英文目录中。")
74-
print ("rt-thread must be placed in a pure English directory, please move rt-thread to a pure English directory.")
72+
73+
print ("\n\033[1;31;40m警告:\033[0m")
74+
print ("\033[1;31;40m当前目录不支持非英文字符,请修改当前路径为纯英文路径。\033[0m")
75+
print ("\033[1;31;40mrt-thread must be placed in a pure English directory, please move rt-thread to a pure English directory.\033[0m")
7576

7677
if platform.system() == "Windows":
7778
os.system('chcp 437 > nul')

0 commit comments

Comments
 (0)