summaryrefslogtreecommitdiffstats
path: root/chrome/tools/build/win
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/tools/build/win')
-rwxr-xr-xchrome/tools/build/win/create_installer_archive.py44
-rwxr-xr-xchrome/tools/build/win/dependencies.py6
-rwxr-xr-xchrome/tools/build/win/sln_deps.py2
3 files changed, 26 insertions, 26 deletions
diff --git a/chrome/tools/build/win/create_installer_archive.py b/chrome/tools/build/win/create_installer_archive.py
index 61579ae..cf6d846 100755
--- a/chrome/tools/build/win/create_installer_archive.py
+++ b/chrome/tools/build/win/create_installer_archive.py
@@ -5,11 +5,11 @@
"""Script to create Chrome Installer archive.
- This script is used to create an archive of all the files required for a
+ This script is used to create an archive of all the files required for a
Chrome install in appropriate directory structure. It reads chrome.release
- file as input, creates chrome.7z archive, compresses setup.exe and
- generates packed_files.txt for mini_installer project.
-
+ file as input, creates chrome.7z archive, compresses setup.exe and
+ generates packed_files.txt for mini_installer project.
+
"""
import ConfigParser
@@ -33,13 +33,13 @@ BSDIFF_EXEC = "bsdiff.exe"
VERSION_FILE = "VERSION"
PACKED_FILE_COMMENTS = """
// This file is automatically generated by create_installer_archive.py.
-// It contains the resource entries that are going to be linked inside
-// mini_installer.exe. For each file to be linked there should be two
+// It contains the resource entries that are going to be linked inside
+// mini_installer.exe. For each file to be linked there should be two
// lines:
// - The first line contains the output filename (without path) and the
-// type of the resource ('BN' means the file is not compressed and
+// type of the resource ('BN' means the file is not compressed and
// 'BL' means the file is compressed.
-// - The second line contains the path to the input file. Uses '/' to
+// - The second line contains the path to the input file. Uses '/' to
// separate path components.
"""
@@ -71,7 +71,7 @@ def Readconfig(output_dir, input_file, current_version):
"""
variables = {}
variables['ChromeDir'] = CHROME_DIR
- variables['VersionDir'] = os.path.join(variables['ChromeDir'],
+ variables['VersionDir'] = os.path.join(variables['ChromeDir'],
current_version)
config = ConfigParser.SafeConfigParser(variables)
config.read(input_file)
@@ -131,7 +131,7 @@ def CreateArchiveFile(output_dir, staging_dir, current_version,
lzma_exec = os.path.join(output_dir, "..", "..", "third_party",
"lzma_sdk", "Executable", "7za.exe")
archive_file = os.path.join(output_dir, FULL_ARCHIVE_FILE)
- cmd = '%s a -t7z "%s" "%s" -mx0' % (lzma_exec, archive_file,
+ 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.
@@ -147,7 +147,7 @@ def CreateArchiveFile(output_dir, staging_dir, current_version,
if (prev_version_dir):
prev_archive_file = os.path.join(prev_version_dir, FULL_ARCHIVE_FILE)
patch_file = os.path.join(output_dir, "patch.7z")
- cmd = '%s "%s" "%s" "%s"' % (os.path.join(output_dir, BSDIFF_EXEC),
+ cmd = '%s "%s" "%s" "%s"' % (os.path.join(output_dir, BSDIFF_EXEC),
prev_archive_file, archive_file, patch_file)
RunSystemCommand(cmd)
@@ -158,7 +158,7 @@ def CreateArchiveFile(output_dir, staging_dir, current_version,
orig_file = archive_file
compressed_archive_file_path = os.path.join(output_dir, archive_file_name)
- cmd = '%s a -t7z "%s" "%s" -mx9' % (lzma_exec, compressed_archive_file_path,
+ cmd = '%s a -t7z "%s" "%s" -mx9' % (lzma_exec, compressed_archive_file_path,
orig_file)
if os.path.exists(compressed_archive_file_path):
os.remove(compressed_archive_file_path)
@@ -169,7 +169,7 @@ def CreateArchiveFile(output_dir, staging_dir, current_version,
def CompressSetupExec(output_dir):
"""Compresses setup.exe to reduce size."""
- cmd = 'makecab.exe /V1 /L "%s" "%s"' % (output_dir,
+ cmd = 'makecab.exe /V1 /L "%s" "%s"' % (output_dir,
os.path.join(output_dir, SETUP_EXEC))
RunSystemCommand(cmd)
@@ -181,15 +181,15 @@ def GetFileMD5Hash(file):
return hash
-def CreateResourceInputFile(output_dir,
+def CreateResourceInputFile(output_dir,
prev_version_dir, archive_file_name):
"""Creates resource input file (packed_files.txt) for mini_installer project.
-
+
This method checks if we are generating a patch instead of full installer. In
case of patch it also checks if setup.exe has changed by comparing its
MD5 hash with the MD5 hash of previous setup.exe. If hash values are same
setup.exe is not included in packed_files.txt.
-
+
In case of patch we include patch.7z and in case of full
installer we include chrome.7z in packed_files.txt.
"""
@@ -199,13 +199,13 @@ def CreateResourceInputFile(output_dir,
prev_hash = GetFileMD5Hash(os.path.join(prev_version_dir, SETUP_EXEC))
if (current_hash == prev_hash):
setup_exe_needed = 0
-
+
if (setup_exe_needed):
CompressSetupExec(output_dir)
c_setup_file = SETUP_EXEC[:len(SETUP_EXEC) - 1] + "_"
- setup_file_entry = "%s\t\tBL\n\"%s\"" % (c_setup_file,
+ setup_file_entry = "%s\t\tBL\n\"%s\"" % (c_setup_file,
os.path.join(output_dir, c_setup_file).replace("\\","/"))
-
+
archive_file_entry = "\n%s\t\tB7\n\"%s\"" % (archive_file_name,
os.path.join(output_dir, archive_file_name).replace("\\","/"))
output_file = os.path.join(output_dir, MINI_INSTALLER_INPUT_FILE)
@@ -231,7 +231,7 @@ def main(options):
CopyAllFilesToStagingDir(config, options.distribution,
staging_dir, options.output_dir)
-
+
# Name of the archive file built (for example - chrome.7z or
# patch-<old_version>-<new_version>.7z or patch-<new_version>.7z
archive_file_name = CreateArchiveFile(options.output_dir, staging_dir,
@@ -250,11 +250,11 @@ if '__main__' == __name__:
help='Name of Chromium Distribution. Optional.')
option_parser.add_option('-s', '--skip_rebuild_archive',
default="False", help='Skip re-building Chrome.7z archive if it exists.')
- option_parser.add_option('-l', '--last_chrome_installer',
+ option_parser.add_option('-l', '--last_chrome_installer',
help='Generate differential installer. The value of this parameter ' +
'specifies the directory that contains base versions of ' +
'setup.exe & chrome.7z.')
- option_parser.add_option('-v', '--last_chrome_version',
+ option_parser.add_option('-v', '--last_chrome_version',
help='Version of the previous installer. ' +
'Used only for the purpose of naming archive file. Optional.')
diff --git a/chrome/tools/build/win/dependencies.py b/chrome/tools/build/win/dependencies.py
index c06f9f3..06ce64c 100755
--- a/chrome/tools/build/win/dependencies.py
+++ b/chrome/tools/build/win/dependencies.py
@@ -160,7 +160,7 @@ def VerifyDependents(pe_name, dependents, delay_loaded, list_file, verbose):
# The dependency files have dependencies in two section - dependents and delay_loaded
# Also various distributions of Chromium can have different dependencies. So first
# we read generic dependencies ("dependents" and "delay_loaded"). If distribution
- # specific dependencies exist (i.e. "dependents_google_chrome" and
+ # specific dependencies exist (i.e. "dependents_google_chrome" and
# "delay_loaded_google_chrome") we use those instead.
distribution = DIST_DEFAULT
if DIST_ENV_VAR in os.environ.keys():
@@ -170,7 +170,7 @@ def VerifyDependents(pe_name, dependents, delay_loaded, list_file, verbose):
dist_dependents = "dependents" + distribution
if dist_dependents in scope.keys():
expected_dependents = scope[dist_dependents]
-
+
expected_delay_loaded = scope["delay_loaded"]
dist_delay_loaded = "delay_loaded" + distribution
if dist_delay_loaded in scope.keys():
@@ -181,7 +181,7 @@ def VerifyDependents(pe_name, dependents, delay_loaded, list_file, verbose):
print "\n".join(expected_dependents)
print "Expected delayloaded:"
print "\n".join(expected_delay_loaded)
-
+
deps_result = Diff(pe_name,
"dll",
dependents,
diff --git a/chrome/tools/build/win/sln_deps.py b/chrome/tools/build/win/sln_deps.py
index fecb100..ef7803e 100755
--- a/chrome/tools/build/win/sln_deps.py
+++ b/chrome/tools/build/win/sln_deps.py
@@ -95,7 +95,7 @@ def main(filename, project_to_scan, reverse):
if __name__ == '__main__':
usage = "usage: %prog [options] solution [project]"
-
+
description = ("Display the dependencies of a project in human readable"
" form. [project] is optional. If omited, all projects are"
" listed.")