提交 f290ff87 编写于 作者: mysterywolf's avatar mysterywolf 提交者: mysterywolf

[simulator][rtconfig.py] fix the problem of path cannot be find and cause failure

Some users' computer cannot find the path of VS and will cause failure. Just skip this step.
上级 0ac8f720
...@@ -27,19 +27,22 @@ elif CROSS_TOOL == 'msvc': ...@@ -27,19 +27,22 @@ elif CROSS_TOOL == 'msvc':
CPU = 'win32' CPU = 'win32'
PLATFORM = 'cl' PLATFORM = 'cl'
EXEC_PATH = '' EXEC_PATH = ''
vc_version = '' try:
vc_versions = SCons.Tool.MSCommon.vc.get_installed_vcs() vc_version = ''
if not vc_versions: vc_versions = SCons.Tool.MSCommon.vc.get_installed_vcs()
print("No vc version!") if not vc_versions:
exit(1) print("No vc version!")
else: exit()
vc_version = vc_versions[0] else:
EXEC_PATH = SCons.Tool.MSCommon.vc.find_vc_pdir(vc_version) vc_version = vc_versions[0]
if not EXEC_PATH: EXEC_PATH = SCons.Tool.MSCommon.vc.find_vc_pdir(vc_version)
print('Installed VC %s failure!' % vc_version) if not EXEC_PATH:
exit(1) print('Installed VC %s failure!' % vc_version)
else: exit()
print('Successfully installed VC %s, path:%s' % (vc_version, EXEC_PATH)) else:
print('Successfully installed VC %s, path:%s' % (vc_version, EXEC_PATH))
except:
pass
else: else:
print("Simulator does not support this CROSS TOOL!") print("Simulator does not support this CROSS TOOL!")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册