Esempio n. 1
0
File: msvc.py Progetto: BillTian/waf
def gather_msvc_versions(conf, versions):
	vc_paths = []
	for (v,version,reg) in gather_msvc_detected_versions():
		try:
			try:
				msvc_version = Utils.winreg.OpenKey(Utils.winreg.HKEY_LOCAL_MACHINE, reg + "\\Setup\\VC")
			except WindowsError:
				msvc_version = Utils.winreg.OpenKey(Utils.winreg.HKEY_LOCAL_MACHINE, reg + "\\Setup\\Microsoft Visual C++")
			path,type = Utils.winreg.QueryValueEx(msvc_version, 'ProductDir')
		except WindowsError:
			continue
		else:
			vc_paths.append((version, os.path.abspath(str(path))))

	wince_supported_platforms = gather_wince_supported_platforms()

	for version,vc_path in vc_paths:
		vs_path = os.path.dirname(vc_path)
		vsvars = os.path.join(vs_path, 'Common7', 'Tools', 'vsvars32.bat')
		if wince_supported_platforms and os.path.isfile(vsvars):
			conf.gather_wince_targets(versions, version, vc_path, vsvars, wince_supported_platforms)

	# WP80 works with 11.0Exp and 11.0, both of which resolve to the same vc_path.
	# Stop after one is found.
	for version,vc_path in vc_paths:
		vs_path = os.path.dirname(vc_path)
		vsvars = os.path.join(vs_path, 'VC', 'WPSDK', 'WP80', 'vcvarsphoneall.bat')
		if os.path.isfile(vsvars):
			conf.gather_winphone_targets(versions, '8.0', vc_path, vsvars)
			break

	for version,vc_path in vc_paths:
		vs_path = os.path.dirname(vc_path)
		conf.gather_msvc_targets(versions, version, vc_path)
Esempio n. 2
0
def gather_msvc_versions(conf, versions):
    vc_paths = []
    for (v, version, reg) in gather_msvc_detected_versions():
        try:
            try:
                msvc_version = Utils.winreg.OpenKey(
                    Utils.winreg.HKEY_LOCAL_MACHINE, reg + "\\Setup\\VC")
            except WindowsError:
                msvc_version = Utils.winreg.OpenKey(
                    Utils.winreg.HKEY_LOCAL_MACHINE,
                    reg + "\\Setup\\Microsoft Visual C++")
            path, type = Utils.winreg.QueryValueEx(msvc_version, 'ProductDir')
            vc_paths.append((version, os.path.abspath(str(path))))
        except WindowsError:
            continue

    wince_supported_platforms = gather_wince_supported_platforms()

    for version, vc_path in vc_paths:
        vs_path = os.path.dirname(vc_path)
        vsvars = os.path.join(vs_path, 'Common7', 'Tools', 'vsvars32.bat')
        if wince_supported_platforms and os.path.isfile(vsvars):
            conf.gather_wince_targets(versions, version, vc_path, vsvars,
                                      wince_supported_platforms)

        vsvars = os.path.join(vs_path, 'VC', 'WPSDK', 'WP80',
                              'vcvarsphoneall.bat')
        if os.path.isfile(vsvars):
            conf.gather_winphone_targets(versions, '8.0', vc_path, vsvars)

    for version, vc_path in vc_paths:
        vs_path = os.path.dirname(vc_path)
        conf.gather_msvc_targets(versions, version, vc_path)
Esempio n. 3
0
def gather_msvc_versions(conf, versions):
    vc_paths = []
    for (v, version, reg) in gather_msvc_detected_versions():
        try:
            try:
                msvc_version = Utils.winreg.OpenKey(Utils.winreg.HKEY_LOCAL_MACHINE, reg + "\\Setup\\VC")
            except WindowsError:
                msvc_version = Utils.winreg.OpenKey(
                    Utils.winreg.HKEY_LOCAL_MACHINE, reg + "\\Setup\\Microsoft Visual C++"
                )
            path, type = Utils.winreg.QueryValueEx(msvc_version, "ProductDir")
            vc_paths.append((version, os.path.abspath(str(path))))
        except WindowsError:
            continue

    wince_supported_platforms = gather_wince_supported_platforms()

    for version, vc_path in vc_paths:
        vs_path = os.path.dirname(vc_path)
        vsvars = os.path.join(vs_path, "Common7", "Tools", "vsvars32.bat")
        if wince_supported_platforms and os.path.isfile(vsvars):
            conf.gather_wince_targets(versions, version, vc_path, vsvars, wince_supported_platforms)

        vsvars = os.path.join(vs_path, "VC", "WPSDK", "WP80", "vcvarsphoneall.bat")
        if os.path.isfile(vsvars):
            conf.gather_winphone_targets(versions, "8.0", vc_path, vsvars)

    for version, vc_path in vc_paths:
        vs_path = os.path.dirname(vc_path)
        conf.gather_msvc_targets(versions, version, vc_path)
Esempio n. 4
0
def gather_msvc_versions(conf, versions):
    vc_paths = []
    for (v, version, reg) in gather_msvc_detected_versions():
        try:
            try:
                msvc_version = Utils.winreg.OpenKey(
                    Utils.winreg.HKEY_LOCAL_MACHINE, reg + "\\Setup\\VC"
                )
            except OSError:
                msvc_version = Utils.winreg.OpenKey(
                    Utils.winreg.HKEY_LOCAL_MACHINE,
                    reg + "\\Setup\\Microsoft Visual C++",
                )
            path, type = Utils.winreg.QueryValueEx(msvc_version, "ProductDir")
        except OSError:
            try:
                msvc_version = Utils.winreg.OpenKey(
                    Utils.winreg.HKEY_LOCAL_MACHINE,
                    "SOFTWARE\\Wow6432node\\Microsoft\\VisualStudio\\SxS\\VS7",
                )
                path, type = Utils.winreg.QueryValueEx(msvc_version, version)
            except OSError:
                continue
            else:
                vc_paths.append((version, os.path.abspath(str(path))))
            continue
        else:
            vc_paths.append((version, os.path.abspath(str(path))))

    wince_supported_platforms = gather_wince_supported_platforms()

    for version, vc_path in vc_paths:
        vs_path = os.path.dirname(vc_path)
        vsvars = os.path.join(vs_path, "Common7", "Tools", "vsvars32.bat")
        if wince_supported_platforms and os.path.isfile(vsvars):
            conf.gather_wince_targets(
                versions, version, vc_path, vsvars, wince_supported_platforms
            )

    # WP80 works with 11.0Exp and 11.0, both of which resolve to the same vc_path.
    # Stop after one is found.
    for version, vc_path in vc_paths:
        vs_path = os.path.dirname(vc_path)
        vsvars = os.path.join(vs_path, "VC", "WPSDK", "WP80", "vcvarsphoneall.bat")
        if os.path.isfile(vsvars):
            conf.gather_winphone_targets(versions, "8.0", vc_path, vsvars)
            break

    for version, vc_path in vc_paths:
        vs_path = os.path.dirname(vc_path)
        conf.gather_msvc_targets(versions, version, vc_path)
Esempio n. 5
0
def gather_msvc_versions(conf,versions):
	vc_paths=[]
	for(v,version,reg)in gather_msvc_detected_versions():
		try:
			try:
				msvc_version=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,reg+"\\Setup\\VC")
			except WindowsError:
				msvc_version=_winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE,reg+"\\Setup\\Microsoft Visual C++")
			path,type=_winreg.QueryValueEx(msvc_version,'ProductDir')
			vc_paths.append((version,os.path.abspath(str(path))))
		except WindowsError:
			continue
	wince_supported_platforms=gather_wince_supported_platforms()
	for version,vc_path in vc_paths:
		vs_path=os.path.dirname(vc_path)
		conf.gather_msvc_targets(versions,version,vc_path)
		vsvars=os.path.join(vs_path,'Common7','Tools','vsvars32.bat')
		if wince_supported_platforms and os.path.isfile(vsvars):
			conf.gather_wince_targets(versions,version,vc_path,vsvars,wince_supported_platforms)