(vs_version)
return env
Get a dict of variables mapping internal VS macro names to their gyp
    equivalents. Returns all variables that are independent of the target.
Get a dict of variables mapping internal VS macro names to their gyp
    equivalents. Returns all variables that are independent of the target.
Get a dict of variables mapping internal VS macro names to their gyp equivalents . Returns all variables that are independent of the target .
def GetGlobalVSMacroEnv(vs_version):
    """Get a dict of variables mapping internal VS macro names to their gyp
    equivalents. Returns all variables that are independent of the target."""
    env = {}
    # '$(VSInstallDir)' and '$(VCInstallDir)' are available when and only when
    # Visual Studio is actually installed.
    if vs_version.Path():
        env["$(VSInstallDir)"] = vs_version.Path()
        env["$(VCInstallDir)"] = os.path.join(vs_version.Path(), "VC") + "\\"
    # Chromium uses DXSDK_DIR in include/lib paths, but it may or may not be
    # set. This happens when the SDK is sync'd via src-internal, rather than
    # by typical end-user installation of the SDK. If it's not set, we don't
    # want to leave the unexpanded variable in the path, so simply strip it.
    dxsdk_dir = _FindDirectXInstallation()
    env["$(DXSDK_DIR)"] = dxsdk_dir if dxsdk_dir else ""
    # Try to find an installation location for the Windows DDK by checking
    # the WDK_DIR environment variable, may be None.
    env["$(WDK_DIR)"] = os.environ.get("WDK_DIR", "")
    return env
def GetGlobalVSMacroEnv ( vs_version ) : env = { } # '$(VSInstallDir)' and '$(VCInstallDir)' are available when and only when # Visual Studio is actually installed. if vs_version . Path ( ) : env [ "$(VSInstallDir)" ] = vs_version . Path ( ) env [ "$(VCInstallDir)" ] = os . path . join ( vs_version . Path ( ) , "VC" ) + "\\" # Chromium uses DXSDK_DIR in include/lib paths, but it may or may not be # set. This happens when the SDK is sync'd via src-internal, rather than # by typical end-user installation of the SDK. If it's not set, we don't # want to leave the unexpanded variable in the path, so simply strip it. dxsdk_dir = _FindDirectXInstallation ( ) env [ "$(DXSDK_DIR)" ] = dxsdk_dir if dxsdk_dir else "" # Try to find an installation location for the Windows DDK by checking # the WDK_DIR environment variable, may be None. env [ "$(WDK_DIR)" ] = os . environ . get ( "WDK_DIR" , "" ) return env