chrome/tools/build/win/create_installer_archive.py
def CopySectionFilesToStagingDir(config, section, staging_dir, src_dir,
                                 verbose):
  """Copies installer archive files specified in section from src_dir to
  staging_dir. This method reads section from config and copies all the
  files specified from src_dir to staging dir.
  """
  for option in config.options(section):
    if option.endswith('dir'):
      continue

    src_subdir = option.replace('\\', os.sep)
    dst_dir = os.path.join(staging_dir, config.get(section, option))
    dst_dir = dst_dir.replace('\\', os.sep)
    # There are specific issues with libEGL.dll and libGLESv2.dll which require
    # insensitive globbing on linux machines.
    src_paths = insensiglob(os.path.join(src_dir, src_subdir))
    if verbose and not src_paths:
      print('No matches found for {} in {}'.format(
        option, os.path.join(os.getcwd(), src_dir)))
    if src_paths and not os.path.exists(dst_dir):
      os.makedirs(dst_dir)
    for src_path in src_paths:
      dst_path = os.path.join(dst_dir, os.path.basename(src_path))
      if not os.path.exists(dst_path):
        g_archive_inputs.append(src_path)
        shutil.copy(src_path, dst_dir)
Copies installer archive files specified in section from src_dir to
  staging_dir. This method reads section from config and copies all the
  files specified from src_dir to staging dir.
  
Copies installer archive files specified in section from src_dir to
staging_dir. This method reads section from config and copies all the
files specified from src_dir to staging dir.
Copies installer archive files specified in section from src_dir to staging_dir . This method reads section from config and copies all the files specified from src_dir to staging dir .
def CopySectionFilesToStagingDir(config, section, staging_dir, src_dir,
                                 verbose):
  for option in config.options(section):
    if option.endswith('dir'):
      continue
    src_subdir = option.replace('\\', os.sep)
    dst_dir = os.path.join(staging_dir, config.get(section, option))
    dst_dir = dst_dir.replace('\\', os.sep)
    src_paths = insensiglob(os.path.join(src_dir, src_subdir))
    if verbose and not src_paths:
      print('No matches found for {} in {}'.format(
        option, os.path.join(os.getcwd(), src_dir)))
    if src_paths and not os.path.exists(dst_dir):
      os.makedirs(dst_dir)
    for src_path in src_paths:
      dst_path = os.path.join(dst_dir, os.path.basename(src_path))
      if not os.path.exists(dst_path):
        g_archive_inputs.append(src_path)
        shutil.copy(src_path, dst_dir)
def CopySectionFilesToStagingDir ( config , section , staging_dir , src_dir , verbose ) : for option in config . options ( section ) : if option . endswith ( 'dir' ) : continue src_subdir = option . replace ( '\\' , os . sep ) dst_dir = os . path . join ( staging_dir , config . get ( section , option ) ) dst_dir = dst_dir . replace ( '\\' , os . sep ) src_paths = insensiglob ( os . path . join ( src_dir , src_subdir ) ) if verbose and not src_paths : print ( 'No matches found for {} in {}' . format ( option , os . path . join ( os . getcwd ( ) , src_dir ) ) ) if src_paths and not os . path . exists ( dst_dir ) : os . makedirs ( dst_dir ) for src_path in src_paths : dst_path = os . path . join ( dst_dir , os . path . basename ( src_path ) ) if not os . path . exists ( dst_path ) : g_archive_inputs . append ( src_path ) shutil . copy ( src_path , dst_dir )
Copies installer archive files specified in section from src_dir to
staging_dir.
Copies installer archive files specified in section from src_dir to staging_dir .
"""Copies installer archive files specified in section from src_dir to
  staging_dir. This method reads section from config and copies all the
  files specified from src_dir to staging dir.
  """ # There are specific issues with libEGL.dll and libGLESv2.dll which require # insensitive globbing on linux machines.
config
section
staging_dir
src_dir
verbose