parameters: (target_list, target_dicts, data, params)
docstring: Generate .sln and .vcproj files.
  
    This is the entry point for this generator.
    Arguments:
      target_list: List of target pairs: 'base/base.gyp:base'.
      target_dicts: Dict of target properties keyed on target pair.
      data: Dictionary containing per .gyp data.
docstring_summary: Generate .sln and .vcproj files.
docstring_tokens: Generate . sln and . vcproj files .
function: def GenerateOutput(target_list, target_dicts, data, params):
    """Generate .sln and .vcproj files.
  
    This is the entry point for this generator.
    Arguments:
      target_list: List of target pairs: 'base/base.gyp:base'.
      target_dicts: Dict of target properties keyed on target pair.
      data: Dictionary containing per .gyp data.
    """
    global fixpath_prefix
  
    options = params['options']
  
    # Get the project file format version back out of where we stashed it in
    # GeneratorCalculatedVariables.
    msvs_version = params['msvs_version']
  
    generator_flags = params.get('generator_flags', {})
  
    # Optionally shard targets marked with 'msvs_shard': SHARD_COUNT.
    (target_list, target_dicts) = MSVSUtil.ShardTargets(target_list, target_dicts)
  
    # Optionally use the large PDB workaround for targets marked with
    # 'msvs_large_pdb': 1.
    (target_list, target_dicts) = MSVSUtil.InsertLargePdbShims(
          target_list, target_dicts, generator_default_variables)
  
    # Optionally configure each spec to use ninja as the external builder.
    if params.get('flavor') == 'ninja':
      _InitNinjaFlavor(options, target_list, target_dicts)
  
    # Prepare the set of configurations.
    configs = set()
    for qualified_target in target_list:
      spec = target_dicts[qualified_target]
      for config_name, config in spec['configurations'].iteritems():
        configs.add(_ConfigFullName(config_name, config))
    configs = list(configs)
  
    # Figure out all the projects that will be generated and their guids
    project_objects = _CreateProjectObjects(target_list, target_dicts, options,
                                            msvs_version)
  
    # Generate each project.
    missing_sources = []
    for project in project_objects.values():
      fixpath_prefix = project.fixpath_prefix
      missing_sources.extend(_GenerateProject(project, options, msvs_version,
                                              generator_flags))
    fixpath_prefix = None
  
    for build_file in data:
      # Validate build_file extension
      if not build_file.endswith('.gyp'):
        continue
      sln_path = os.path.splitext(build_file)[0] + options.suffix + '.sln'
      if options.generator_output:
        sln_path = os.path.join(options.generator_output, sln_path)
      # Get projects in the solution, and their dependents.
      sln_projects = gyp.common.BuildFileTargets(target_list, build_file)
      sln_projects += gyp.common.DeepDependencyTargets(target_dicts, sln_projects)
      # Create folder hierarchy.
      root_entries = _GatherSolutionFolders(
          sln_projects, project_objects, flat=msvs_version.FlatSolution())
      # Create solution.
      sln = MSVSNew.MSVSSolution(sln_path,
                                 entries=root_entries,
                                 variants=configs,
                                 websiteProperties=False,
                                 version=msvs_version)
      sln.Write()
  
    if missing_sources:
      error_message = "Missing input files:\n" + \
                      '\n'.join(set(missing_sources))
      if generator_flags.get('msvs_error_on_missing_sources', False):
        raise GypError(error_message)
      else:
        print >> sys.stdout, "Warning: " + error_message
function_tokens: def GenerateOutput ( target_list , target_dicts , data , params ) : global fixpath_prefix options = params [ 'options' ] # Get the project file format version back out of where we stashed it in # GeneratorCalculatedVariables. msvs_version = params [ 'msvs_version' ] generator_flags = params . get ( 'generator_flags' , { } ) # Optionally shard targets marked with 'msvs_shard': SHARD_COUNT. ( target_list , target_dicts ) = MSVSUtil . ShardTargets ( target_list , target_dicts ) # Optionally use the large PDB workaround for targets marked with # 'msvs_large_pdb': 1. ( target_list , target_dicts ) = MSVSUtil . InsertLargePdbShims ( target_list , target_dicts , generator_default_variables ) # Optionally configure each spec to use ninja as the external builder. if params . get ( 'flavor' ) == 'ninja' : _InitNinjaFlavor ( options , target_list , target_dicts ) # Prepare the set of configurations. configs = set ( ) for qualified_target in target_list : spec = target_dicts [ qualified_target ] for config_name , config in spec [ 'configurations' ] . iteritems ( ) : configs . add ( _ConfigFullName ( config_name , config ) ) configs = list ( configs ) # Figure out all the projects that will be generated and their guids project_objects = _CreateProjectObjects ( target_list , target_dicts , options , msvs_version ) # Generate each project. missing_sources = [ ] for project in project_objects . values ( ) : fixpath_prefix = project . fixpath_prefix missing_sources . extend ( _GenerateProject ( project , options , msvs_version , generator_flags ) ) fixpath_prefix = None for build_file in data : # Validate build_file extension if not build_file . endswith ( '.gyp' ) : continue sln_path = os . path . splitext ( build_file ) [ 0 ] + options . suffix + '.sln' if options . generator_output : sln_path = os . path . join ( options . generator_output , sln_path ) # Get projects in the solution, and their dependents. sln_projects = gyp . common . BuildFileTargets ( target_list , build_file ) sln_projects += gyp . common . DeepDependencyTargets ( target_dicts , sln_projects ) # Create folder hierarchy. root_entries = _GatherSolutionFolders ( sln_projects , project_objects , flat = msvs_version . FlatSolution ( ) ) # Create solution. sln = MSVSNew . MSVSSolution ( sln_path , entries = root_entries , variants = configs , websiteProperties = False , version = msvs_version ) sln . Write ( ) if missing_sources : error_message = "Missing input files:\n" + '\n' . join ( set ( missing_sources ) ) if generator_flags . get ( 'msvs_error_on_missing_sources' , False ) : raise GypError ( error_message ) else : print >> sys . stdout , "Warning: " + error_message