Exemplo n.º 1
0
    def available_versions(cls, env):
        if not hasattr(cls, '_available_versions'):
            cls._available_versions = collections.OrderedDict()
            installed_versions = cached_get_installed_vcs()
            if installed_versions:
                default = cls.default_version(env)
                cls._available_versions['vc'] = {
                    'vc_version': cls.vc_version(default),
                    'version': default,
                }

            for version in installed_versions:
                vc_version = cls.vc_version(version)
                cls._available_versions[vc_version] = {
                    'vc_version': vc_version,
                    'version': version,
                }

        return cls._available_versions
Exemplo n.º 2
0
    def available_versions( cls, env ):
        if not hasattr( cls, '_available_versions' ):
            cls._available_versions = collections.OrderedDict()
            installed_versions = cached_get_installed_vcs()
            if installed_versions:
                default = cls.default_version( env )
                cls._available_versions['vc'] = {
                        'vc_version': cls.vc_version( default ),
                        'version': default,
                }

            for version in installed_versions:
                vc_version = cls.vc_version( version )
                cls._available_versions[vc_version] = {
                        'vc_version': vc_version,
                        'version': version,
                }

        return cls._available_versions
        elif msvc_num > 14:
            if UWP_APP == "UWP":
                if(r'\lib\x86\store\references' in path
                or r'\lib\x64\store' in path):
                    vclibstorerefs_path_present = True
                    vclibstore_path_present = True

    return (vclibstore_path_present, vclibstorerefs_path_present, msvc_version)

_python_ = TestSCons._python_

test = TestSCons.TestSCons()

test.skip_if_not_msvc()

installed_msvc_versions = msvc.cached_get_installed_vcs()
# MSVC guaranteed to be at least one version on the system or else skip_if_not_msvc() function
# would have skipped the test

msvc_140 = '14.0' in installed_msvc_versions
msvc_141 = '14.1' in installed_msvc_versions

if not (msvc_140 or msvc_141):
    test.skip_test("Available MSVC doesn't support App store")

if msvc_140:

    test.write('SConstruct', """
if ARGUMENTS.get('MSVC_UWP_APP'):
    help_vars = Variables()
    help_vars.Add(EnumVariable(
Exemplo n.º 4
0
if ARGUMENTS.get('MSVC_UWP_APP'):
    help_vars = Variables()
    help_vars.Add(EnumVariable(
                  'MSVC_UWP_APP',
                  'Build for a Universal Windows Platform (UWP) Application',
                  '0',
                  allowed_values=('0', '1')))
else:
    help_vars = None
env = Environment(tools=['default', 'msvc'], variables=help_vars)
# Print the ENV LIBPATH to stdout
print('env[ENV][LIBPATH]=%s' % env.get('ENV').get('LIBPATH'))
print('env[MSVC_VERSION]=%s' % env.get('MSVC_VERSION'))
""")

installed_msvc_versions = msvc.cached_get_installed_vcs()
# MSVC guaranteed to be at least one version on the system or else skip_if_not_msvc() function
# would have skipped the test
greatest_msvc_version_on_system = installed_msvc_versions[0]
maj, min = msvc.msvc_version_to_maj_min(greatest_msvc_version_on_system)

# We always use the greatest MSVC version installed on the system

if maj < 14:
    # Skip the test if MSVC version is less than VS2015
    test.skip_test("Available MSVC doesn't support App store ")

# Test setting MSVC_UWP_APP is '1' (True)
test.run(arguments = "MSVC_UWP_APP=1")
(vclibstore_path_present, vclibstorerefs_path_present, msvc_version) = AreVCStoreLibPathsInLIBPATH(test.stdout())
test.fail_test(msvc_version != greatest_msvc_version_on_system,