def GetGlobalVSMacroEnv(vs_version):
 env = {}
 if vs_version.Path():
  env['$(VSInstallDir)'] = vs_version.Path()
  env['$(VCInstallDir)'] = (os.path.join(vs_version.Path(), 'VC') + '\\')
 dxsdk_dir = _FindDirectXInstallation()
 env['$(DXSDK_DIR)'] = (dxsdk_dir if dxsdk_dir else '')
 env['$(WDK_DIR)'] = os.environ.get('WDK_DIR', '')
 return env

def GetGlobalVSMacroEnv ( vs_version ) : env = { } if vs_version . Path ( ) : env [ '$(VSInstallDir)' ] = vs_version . Path ( ) env [ '$(VCInstallDir)' ] = ( os . path . join ( vs_version . Path ( ) , 'VC' ) + '\\' ) dxsdk_dir = _FindDirectXInstallation ( ) env [ '$(DXSDK_DIR)' ] = ( dxsdk_dir if dxsdk_dir else '' ) env [ '$(WDK_DIR)' ] = os . environ . get ( 'WDK_DIR' , '' ) return env
get a dict of variables mapping internal vs macro names to their gyp equivalents .