summaryrefslogtreecommitdiff
path: root/bsp/simulator/rtconfig.py
diff options
context:
space:
mode:
authorMeco Man <[email protected]>2022-08-10 14:12:02 -0400
committerMan, Jianting (Meco) <[email protected]>2022-08-13 22:04:11 -0400
commitf290ff87544b8a7f2d3088a87a76bb334546a4c5 (patch)
tree841e53a00c31133cc34be9ce9ac68afce9b20316 /bsp/simulator/rtconfig.py
parent0ac8f72037dfcbb7256e33be21f92bbc417857fd (diff)
[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.
Diffstat (limited to 'bsp/simulator/rtconfig.py')
-rwxr-xr-xbsp/simulator/rtconfig.py29
1 files changed, 16 insertions, 13 deletions
diff --git a/bsp/simulator/rtconfig.py b/bsp/simulator/rtconfig.py
index 2b18c2140a..cecca10fac 100755
--- a/bsp/simulator/rtconfig.py
+++ b/bsp/simulator/rtconfig.py
@@ -27,19 +27,22 @@ elif CROSS_TOOL == 'msvc':
CPU = 'win32'
PLATFORM = 'cl'
EXEC_PATH = ''
- vc_version = ''
- vc_versions = SCons.Tool.MSCommon.vc.get_installed_vcs()
- if not vc_versions:
- print("No vc version!")
- exit(1)
- else:
- vc_version = vc_versions[0]
- EXEC_PATH = SCons.Tool.MSCommon.vc.find_vc_pdir(vc_version)
- if not EXEC_PATH:
- print('Installed VC %s failure!' % vc_version)
- exit(1)
- else:
- print('Successfully installed VC %s, path:%s' % (vc_version, EXEC_PATH))
+ try:
+ vc_version = ''
+ vc_versions = SCons.Tool.MSCommon.vc.get_installed_vcs()
+ if not vc_versions:
+ print("No vc version!")
+ exit()
+ else:
+ vc_version = vc_versions[0]
+ EXEC_PATH = SCons.Tool.MSCommon.vc.find_vc_pdir(vc_version)
+ if not EXEC_PATH:
+ print('Installed VC %s failure!' % vc_version)
+ exit()
+ else:
+ print('Successfully installed VC %s, path:%s' % (vc_version, EXEC_PATH))
+ except:
+ pass
else:
print("Simulator does not support this CROSS TOOL!")