original_docstring: Creates a new installer archive file after deleting any existing old file.
    
docstring: Creates a new installer archive file after deleting any existing old file.
docstring_tokens: Creates a new installer archive file after deleting any existing old file .
code: def CreateArchiveFile(options, staging_dir, current_version, prev_version):
    """Creates a new installer archive file after deleting any existing old file.
    """
    # First create an uncompressed archive file for the current build (chrome.7z)
    lzma_exec = GetLZMAExec(options.output_dir)
    archive_file = os.path.join(options.output_dir,
                                options.output_name + ARCHIVE_SUFFIX)
    cmd = '%s a -t7z "%s" "%s" -mx0' % (lzma_exec, archive_file,
                                        os.path.join(staging_dir, CHROME_DIR))
    # There doesnt seem to be any way in 7za.exe to override existing file so
    # we always delete before creating a new one.
    if not os.path.exists(archive_file):
      RunSystemCommand(cmd)
    elif options.skip_rebuild_archive != "true":
      os.remove(archive_file)
      RunSystemCommand(cmd)
  
    # If we are generating a patch, run bsdiff against previous build and
    # compress the resulting patch file. If this is not a patch just compress the
    # uncompressed archive file.
    patch_name_prefix = options.output_name + CHROME_PATCH_FILE_SUFFIX
    if options.last_chrome_installer:
      prev_archive_file = os.path.join(options.last_chrome_installer,
                                       options.output_name + ARCHIVE_SUFFIX)
      patch_file = os.path.join(options.output_dir, patch_name_prefix +
                                                    PATCH_FILE_EXT)
      GenerateDiffPatch(options, prev_archive_file, archive_file, patch_file)
      compressed_archive_file = patch_name_prefix + '_' + \
                                current_version + '_from_' + prev_version + \
                                COMPRESSED_FILE_EXT
      orig_file = patch_file
    else:
      compressed_archive_file = options.output_name + COMPRESSED_ARCHIVE_SUFFIX
      orig_file = archive_file
  
    compressed_archive_file_path = os.path.join(options.output_dir,
                                                compressed_archive_file)
    CompressUsingLZMA(options.output_dir, compressed_archive_file_path, orig_file)
  
    return compressed_archive_file
code_tokens: def CreateArchiveFile ( options , staging_dir , current_version , prev_version ) : lzma_exec = GetLZMAExec ( options . output_dir ) archive_file = os . path . join ( options . output_dir , options . output_name + ARCHIVE_SUFFIX ) cmd = '%s a -t7z "%s" "%s" -mx0' % ( lzma_exec , archive_file , os . path . join ( staging_dir , CHROME_DIR ) ) if not os . path . exists ( archive_file ) : RunSystemCommand ( cmd ) elif options . skip_rebuild_archive != "true" : os . remove ( archive_file ) RunSystemCommand ( cmd ) patch_name_prefix = options . output_name + CHROME_PATCH_FILE_SUFFIX if options . last_chrome_installer : prev_archive_file = os . path . join ( options . last_chrome_installer , options . output_name + ARCHIVE_SUFFIX ) patch_file = os . path . join ( options . output_dir , patch_name_prefix + PATCH_FILE_EXT ) GenerateDiffPatch ( options , prev_archive_file , archive_file , patch_file ) compressed_archive_file = patch_name_prefix + '_' + current_version + '_from_' + prev_version + COMPRESSED_FILE_EXT orig_file = patch_file else : compressed_archive_file = options . output_name + COMPRESSED_ARCHIVE_SUFFIX orig_file = archive_file compressed_archive_file_path = os . path . join ( options . output_dir , compressed_archive_file ) CompressUsingLZMA ( options . output_dir , compressed_archive_file_path , orig_file ) return compressed_archive_file
short_docstring: Creates a new installer archive file after deleting any existing old file.
short_docstring_tokens: Creates a new installer archive file after deleting any existing old file .
comment: """Creates a new installer archive file after deleting any existing old file.
    """$SEP$# First create an uncompressed archive file for the current build (chrome.7z)$SEP$# There doesnt seem to be any way in 7za.exe to override existing file so$SEP$# we always delete before creating a new one.$SEP$# If we are generating a patch, run bsdiff against previous build and$SEP$# compress the resulting patch file. If this is not a patch just compress the$SEP$# uncompressed archive file.