parameters: (self, base_to_build=None, config=None)
return_statement: return replacements
docstring: Get a dict of variables mapping internal VS macro names to their gyp
      equivalents.
docstring_summary: Get a dict of variables mapping internal VS macro names to their gyp
      equivalents.
docstring_tokens: Get a dict of variables mapping internal VS macro names to their gyp equivalents .
function: def GetVSMacroEnv(self, base_to_build=None, config=None):
      """Get a dict of variables mapping internal VS macro names to their gyp
      equivalents."""
      target_platform = 'Win32' if self.GetArch(config) == 'x86' else 'x64'
      target_name = self.spec.get('product_prefix', '') + \
          self.spec.get('product_name', self.spec['target_name'])
      target_dir = base_to_build + '\\' if base_to_build else ''
      replacements = {
          '$(OutDir)\\': target_dir,
          '$(TargetDir)\\': target_dir,
          '$(IntDir)': '$!INTERMEDIATE_DIR',
          '$(InputPath)': '${source}',
          '$(InputName)': '${root}',
          '$(ProjectName)': self.spec['target_name'],
          '$(TargetName)': target_name,
          '$(PlatformName)': target_platform,
          '$(ProjectDir)\\': '',
      }
      # '$(VSInstallDir)' and '$(VCInstallDir)' are available when and only when
      # Visual Studio is actually installed.
      if self.vs_version.Path():
        replacements['$(VSInstallDir)'] = self.vs_version.Path()
        replacements['$(VCInstallDir)'] = os.path.join(self.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.
      replacements['$(DXSDK_DIR)'] = self.dxsdk_dir if self.dxsdk_dir else ''
      replacements['$(WDK_DIR)'] = self.wdk_dir if self.wdk_dir else ''
      return replacements
function_tokens: def GetVSMacroEnv ( self , base_to_build = None , config = None ) : target_platform = 'Win32' if self . GetArch ( config ) == 'x86' else 'x64' target_name = self . spec . get ( 'product_prefix' , '' ) + self . spec . get ( 'product_name' , self . spec [ 'target_name' ] ) target_dir = base_to_build + '\\' if base_to_build else '' replacements = { '$(OutDir)\\' : target_dir , '$(TargetDir)\\' : target_dir , '$(IntDir)' : '$!INTERMEDIATE_DIR' , '$(InputPath)' : '${source}' , '$(InputName)' : '${root}' , '$(ProjectName)' : self . spec [ 'target_name' ] , '$(TargetName)' : target_name , '$(PlatformName)' : target_platform , '$(ProjectDir)\\' : '' , } # '$(VSInstallDir)' and '$(VCInstallDir)' are available when and only when # Visual Studio is actually installed. if self . vs_version . Path ( ) : replacements [ '$(VSInstallDir)' ] = self . vs_version . Path ( ) replacements [ '$(VCInstallDir)' ] = os . path . join ( self . 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. replacements [ '$(DXSDK_DIR)' ] = self . dxsdk_dir if self . dxsdk_dir else '' replacements [ '$(WDK_DIR)' ] = self . wdk_dir if self . wdk_dir else '' return replacements