def find_vs_dir_by_vc(self):
SCons.Tool.MSCommon.vc.get_installed_vcs()
- ivc = SCons.Tool.MSCommon.vc.InstalledVCMap.get(self.vc_version)
- if not ivc:
+ dir = SCons.Tool.MSCommon.vc.find_vc_pdir(self.vc_version)
+ if not dir:
debug('find_vs_dir(): no installed VC %s' % self.vc_version)
return None
- return ivc.get_vc_dir()[:-len(ivc.vc_subdir)]
+ return dir
def find_vs_dir_by_reg(self):
root = 'Software\\'
# Set-up ms tools paths for default version
msvc_setup_env_once(env)
- version_num, suite = msvs_parse_version(env['MSVS_VERSION'])
+ if env.has_key('MSVS_VERSION'):
+ version_num, suite = msvs_parse_version(env['MSVS_VERSION'])
+ else:
+ (version_num, suite) = (7.0, None) # guess at a default
+ if not env.has_key('MSVS'):
+ env['MSVS'] = {}
if (version_num < 7.0):
env['MSVS']['PROJECTSUFFIX'] = '.dsp'
env['MSVS']['SOLUTIONSUFFIX'] = '.dsw'