Skip to content

Commit f290ff8

Browse files
committed
[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.
1 parent 0ac8f72 commit f290ff8

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

bsp/simulator/rtconfig.py

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,22 @@
2727
CPU = 'win32'
2828
PLATFORM = 'cl'
2929
EXEC_PATH = ''
30-
vc_version = ''
31-
vc_versions = SCons.Tool.MSCommon.vc.get_installed_vcs()
32-
if not vc_versions:
33-
print("No vc version!")
34-
exit(1)
35-
else:
36-
vc_version = vc_versions[0]
37-
EXEC_PATH = SCons.Tool.MSCommon.vc.find_vc_pdir(vc_version)
38-
if not EXEC_PATH:
39-
print('Installed VC %s failure!' % vc_version)
40-
exit(1)
41-
else:
42-
print('Successfully installed VC %s, path:%s' % (vc_version, EXEC_PATH))
30+
try:
31+
vc_version = ''
32+
vc_versions = SCons.Tool.MSCommon.vc.get_installed_vcs()
33+
if not vc_versions:
34+
print("No vc version!")
35+
exit()
36+
else:
37+
vc_version = vc_versions[0]
38+
EXEC_PATH = SCons.Tool.MSCommon.vc.find_vc_pdir(vc_version)
39+
if not EXEC_PATH:
40+
print('Installed VC %s failure!' % vc_version)
41+
exit()
42+
else:
43+
print('Successfully installed VC %s, path:%s' % (vc_version, EXEC_PATH))
44+
except:
45+
pass
4346

4447
else:
4548
print("Simulator does not support this CROSS TOOL!")

0 commit comments

Comments
 (0)