def get_env(self):
if self.visual_studio_versions:
vs_versions = self.visual_studio_versions
else:
vs_versions = [15, 14.1, 14, 13, 12, 11, 10, 9, 8]
if self.target_architecture:
arch = self.target_architecture
else:
arch = 'x86'
if sublime.arch() == 'x32':
host = 'x86'
elif sublime.arch() == 'x64':
host = 'amd64'
else:
sublime.error_message(
'Unknown Sublime architecture: %s' % sublime.arch())
return
if arch != host:
arch = host + '_' + arch
for version in vs_versions:
try:
vcvars = query_vcvarsall(version, arch)
if vcvars:
print('found vcvarsall for version', version)
return vcvars
except Exception:
print('could not find vsvcarsall for version', version)
continue
print('warning: did not find vcvarsall.bat')
return {}
评论列表
文章目录