File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 2121# Change Logs:
2222# Date Author Notes
2323# 2018-5-28 SummerGift Add copyright information
24+ # 2019-1-16 SummerGift Add chinese detection
2425#
2526
2627import os
3132from cmds import *
3233from vars import Export
3334
34- __version__ = 'rt-thread packages v1.0 .0'
35+ __version__ = 'rt-thread packages v1.1 .0'
3536
3637
3738def init_argparse ():
@@ -63,6 +64,20 @@ def main():
6364 Export ('env_root' )
6465 Export ('bsp_root' )
6566
67+ try :
68+ bsp_root .decode ("ascii" )
69+ except Exception , e :
70+ if platform .system () == "Windows" :
71+ 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." )
75+
76+ if platform .system () == "Windows" :
77+ os .system ('chcp 437 > nul' )
78+
79+ return False
80+
6681 parser = init_argparse ()
6782 args = parser .parse_args ()
6883 args .func (args )
You can’t perform that action at this time.
0 commit comments