Index: chrome/tools/build/win/create_installer_archive.py |
diff --git a/chrome/tools/build/win/create_installer_archive.py b/chrome/tools/build/win/create_installer_archive.py |
index f5a99987adb5a204e19d12051e124a058845edf9..7cb5cc2d023609b37c3d7e2cc6fa75faa8f6af7c 100755 |
--- a/chrome/tools/build/win/create_installer_archive.py |
+++ b/chrome/tools/build/win/create_installer_archive.py |
@@ -348,6 +348,26 @@ def CopyAndAugmentManifest(build_dir, output_dir, manifest_name, |
modified_manifest_file.write(''.join(manifest_lines)) |
modified_manifest_file.close() |
+def AddVersionAssemblyManifest(staging_dir, current_version): |
grt (UTC plus 2)
2013/11/05 03:08:36
nit: add a doc string
Cait (Slow)
2013/11/05 05:39:06
Done.
|
+ # Get the required directories for the upcoming operations. |
+ chrome_dir = os.path.join(staging_dir, CHROME_DIR) |
+ version_dir = os.path.join(chrome_dir, current_version) |
+ |
+ version_manifest = ( |
+ "<assembly\n" |
+ " xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>\n" |
+ " <assemblyIdentity name='{version}' version='{version}'\n" |
+ " type='win32'/>\n" |
+ " <file name='chrome_elf.dll'/>\n" |
+ "</assembly>".format(version=current_version)) |
+ |
+ manifest_name = ("{version}.manifest".format(version=current_version)) |
robertshield
2013/11/05 02:23:55
nit: don't need the outer ()
grt (UTC plus 2)
2013/11/05 03:08:36
feel free to ignore this nit:
"%s.manifest" % cu
Cait (Slow)
2013/11/05 05:39:06
Done.
|
+ |
+ version_manifest_file = open( |
grt (UTC plus 2)
2013/11/05 03:08:36
with open(os.path.join(version_dir, manifest_name)
Cait (Slow)
2013/11/05 05:39:06
Done.
|
+ os.path.join(version_dir, manifest_name), 'w') |
+ version_manifest_file.write(version_manifest) |
+ version_manifest_file.close() |
+ |
def CopyIfChanged(src, target_dir): |
"""Copy specified |src| file to |target_dir|, but only write to target if |
@@ -557,6 +577,8 @@ def main(options): |
DoComponentBuildTasks(staging_dir, options.build_dir, |
options.target_arch, current_version) |
+ AddVersionAssemblyManifest(staging_dir, current_version) |
+ |
version_numbers = current_version.split('.') |
current_build_number = version_numbers[2] + '.' + version_numbers[3] |
prev_build_number = '' |