remoting/host/installer/build-installer-archive.py
def buildHostArchive(temp_dir, zip_path, source_file_roots, source_files,
                     gen_files, gen_files_dst, defs):
  """Builds a zip archive with the files needed to build the installer.

  Args:
    temp_dir: Temporary dir used to build up the contents for the archive.
    zip_path: Full path to the zip file to create.
    source_file_roots: Array of path prefixes to strip off |files| when adding
                       to the archive.
    source_files: The array of files to add to archive. The path structure is
                  preserved (except for the |files_root| prefix).
    gen_files: Full path to binaries to add to archive.
    gen_files_dst: Relative path of where to add binary files in archive.
                   This array needs to parallel |binaries_src|.
    defs: Dictionary of variable definitions.
  """
  cleanDir(temp_dir)

  for f in source_files:
    dst_file = remapSrcFile(temp_dir, source_file_roots, f)
    base_file = os.path.basename(f)
    (base, ext) = os.path.splitext(f)
    if ext == '.zip':
      copyZipIntoArchive(temp_dir, source_file_roots, f)
    elif ext in ['.packproj', '.pkgproj', '.plist', '.props', '.sh', '.json']:
      copyFileWithDefs(f, dst_file, defs)
    else:
      shutil.copy2(f, dst_file)

  for bs, bd in zip(gen_files, gen_files_dst):
    dst_file = os.path.join(temp_dir, bd)
    if not os.path.exists(os.path.dirname(dst_file)):
      os.makedirs(os.path.dirname(dst_file))
    if os.path.isdir(bs):
      shutil.copytree(bs, dst_file)
    else:
      shutil.copy2(bs, dst_file)

  build_utils.ZipDir(
    zip_path, temp_dir,
    compress_fn=lambda _: zipfile.ZIP_DEFLATED,
    zip_prefix_path=os.path.splitext(os.path.basename(zip_path))[0])
Builds a zip archive with the files needed to build the installer.

  Args:
    temp_dir: Temporary dir used to build up the contents for the archive.
    zip_path: Full path to the zip file to create.
    source_file_roots: Array of path prefixes to strip off |files| when adding
                       to the archive.
    source_files: The array of files to add to archive. The path structure is
                  preserved (except for the |files_root| prefix).
    gen_files: Full path to binaries to add to archive.
    gen_files_dst: Relative path of where to add binary files in archive.
                   This array needs to parallel |binaries_src|.
    defs: Dictionary of variable definitions.
  
Builds a zip archive with the files needed to build the installer.
Builds a zip archive with the files needed to build the installer .
def buildHostArchive(temp_dir, zip_path, source_file_roots, source_files,
                     gen_files, gen_files_dst, defs):
  cleanDir(temp_dir)
  for f in source_files:
    dst_file = remapSrcFile(temp_dir, source_file_roots, f)
    base_file = os.path.basename(f)
    (base, ext) = os.path.splitext(f)
    if ext == '.zip':
      copyZipIntoArchive(temp_dir, source_file_roots, f)
    elif ext in ['.packproj', '.pkgproj', '.plist', '.props', '.sh', '.json']:
      copyFileWithDefs(f, dst_file, defs)
    else:
      shutil.copy2(f, dst_file)
  for bs, bd in zip(gen_files, gen_files_dst):
    dst_file = os.path.join(temp_dir, bd)
    if not os.path.exists(os.path.dirname(dst_file)):
      os.makedirs(os.path.dirname(dst_file))
    if os.path.isdir(bs):
      shutil.copytree(bs, dst_file)
    else:
      shutil.copy2(bs, dst_file)
  build_utils.ZipDir(
    zip_path, temp_dir,
    compress_fn=lambda _: zipfile.ZIP_DEFLATED,
    zip_prefix_path=os.path.splitext(os.path.basename(zip_path))[0])
def buildHostArchive ( temp_dir , zip_path , source_file_roots , source_files , gen_files , gen_files_dst , defs ) : cleanDir ( temp_dir ) for f in source_files : dst_file = remapSrcFile ( temp_dir , source_file_roots , f ) base_file = os . path . basename ( f ) ( base , ext ) = os . path . splitext ( f ) if ext == '.zip' : copyZipIntoArchive ( temp_dir , source_file_roots , f ) elif ext in [ '.packproj' , '.pkgproj' , '.plist' , '.props' , '.sh' , '.json' ] : copyFileWithDefs ( f , dst_file , defs ) else : shutil . copy2 ( f , dst_file ) for bs , bd in zip ( gen_files , gen_files_dst ) : dst_file = os . path . join ( temp_dir , bd ) if not os . path . exists ( os . path . dirname ( dst_file ) ) : os . makedirs ( os . path . dirname ( dst_file ) ) if os . path . isdir ( bs ) : shutil . copytree ( bs , dst_file ) else : shutil . copy2 ( bs , dst_file ) build_utils . ZipDir ( zip_path , temp_dir , compress_fn = lambda _ : zipfile . ZIP_DEFLATED , zip_prefix_path = os . path . splitext ( os . path . basename ( zip_path ) ) [ 0 ] )
Builds a zip archive with the files needed to build the installer.
Builds a zip archive with the files needed to build the installer .
"""Builds a zip archive with the files needed to build the installer.

  Args:
    temp_dir: Temporary dir used to build up the contents for the archive.
    zip_path: Full path to the zip file to create.
    source_file_roots: Array of path prefixes to strip off |files| when adding
                       to the archive.
    source_files: The array of files to add to archive. The path structure is
                  preserved (except for the |files_root| prefix).
    gen_files: Full path to binaries to add to archive.
    gen_files_dst: Relative path of where to add binary files in archive.
                   This array needs to parallel |binaries_src|.
    defs: Dictionary of variable definitions.
  """
temp_dir
Temporary dir used to build up the contents for the archive.
Temporary dir used to build up the contents for the archive .
zip_path
Full path to the zip file to create.
Full path to the zip file to create .
source_file_roots
Array of path prefixes to strip off |files| when adding
to the archive.
Array of path prefixes to strip off |files| when adding to the archive .
source_files
The array of files to add to archive. The path structure is
preserved (except for the |files_root| prefix).
The array of files to add to archive . The path structure is preserved ( except for the |files_root| prefix ) .
gen_files
None
gen_files_dst
Relative path of where to add binary files in archive.
This array needs to parallel |binaries_src|.
Relative path of where to add binary files in archive . This array needs to parallel |binaries_src| .
defs
Dictionary of variable definitions.
Dictionary of variable definitions .