Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(552)

Unified Diff: chrome/tools/build/win/create_installer_archive.py

Issue 53793002: Initial implementation of Chrome Early Loading Framework (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..6d0a2d434602622fdda9193de05dfe3f51dcde3e 100755
--- a/chrome/tools/build/win/create_installer_archive.py
+++ b/chrome/tools/build/win/create_installer_archive.py
@@ -348,6 +348,27 @@ 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):
+ """Creates a manifest file, {current_version}.manifest, and places it in the
+ VersionDir, so that chrome.exe can find the chrome_elf dll.
+ """
+ # 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 = "%s.manifest" % current_version
+
+ with open(os.path.join(version_dir, manifest_name), 'w') as f:
gab 2013/11/05 16:43:20 I'm guessing this automatically closes |f| when it
grt (UTC plus 2) 2013/11/05 20:56:06 at the end of the scope opened by the "with", yes.
+ f.write(version_manifest)
+
def CopyIfChanged(src, target_dir):
"""Copy specified |src| file to |target_dir|, but only write to target if
@@ -557,6 +578,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 = ''

Powered by Google App Engine
This is Rietveld 408576698