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

Side by Side Diff: chrome/tools/build/win/create_installer_archive.py

Issue 12222002: MSVC manifests should use processorArchitecture="*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 10 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/app/chrome.exe.manifest ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Script to create Chrome Installer archive. 6 """Script to create Chrome Installer archive.
7 7
8 This script is used to create an archive of all the files required for a 8 This script is used to create an archive of all the files required for a
9 Chrome install in appropriate directory structure. It reads chrome.release 9 Chrome install in appropriate directory structure. It reads chrome.release
10 file as input, creates chrome.7z archive, compresses setup.exe and 10 file as input, creates chrome.7z archive, compresses setup.exe and
(...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after
445 # chrome.exe and setup.exe. Some of these DLLs are not actually used by 445 # chrome.exe and setup.exe. Some of these DLLs are not actually used by
446 # either process, but listing them all as dependencies doesn't hurt as it 446 # either process, but listing them all as dependencies doesn't hurt as it
447 # only makes them visible to the exes, just like they already are in the 447 # only makes them visible to the exes, just like they already are in the
448 # build output directory. 448 # build output directory.
449 exe_manifest_dependencies_list = [] 449 exe_manifest_dependencies_list = []
450 for name in dll_names: 450 for name in dll_names:
451 exe_manifest_dependencies_list.append( 451 exe_manifest_dependencies_list.append(
452 "<dependency>" 452 "<dependency>"
453 "<dependentAssembly>" 453 "<dependentAssembly>"
454 "<assemblyIdentity type='win32' name='chrome.{dll_name}' " 454 "<assemblyIdentity type='win32' name='chrome.{dll_name}' "
455 "version='0.0.0.0' processorArchitecture='x86' language='*'/>" 455 "version='0.0.0.0' processorArchitecture='*' language='*'/>"
456 "</dependentAssembly>" 456 "</dependentAssembly>"
457 "</dependency>".format(dll_name=name)) 457 "</dependency>".format(dll_name=name))
458 458
459 exe_manifest_dependencies = ''.join(exe_manifest_dependencies_list) 459 exe_manifest_dependencies = ''.join(exe_manifest_dependencies_list)
460 460
461 # Write a modified chrome.exe.manifest beside chrome.exe. 461 # Write a modified chrome.exe.manifest beside chrome.exe.
462 CopyAndAugmentManifest(build_dir, chrome_dir, 'chrome.exe.manifest', 462 CopyAndAugmentManifest(build_dir, chrome_dir, 'chrome.exe.manifest',
463 exe_manifest_dependencies, '</assembly>') 463 exe_manifest_dependencies, '</assembly>')
464 464
465 # Write a modified setup.exe.manifest beside setup.exe in 465 # Write a modified setup.exe.manifest beside setup.exe in
466 # |version_dir|/Installer. 466 # |version_dir|/Installer.
467 CopyAndAugmentManifest(build_dir, installer_dir, 'setup.exe.manifest', 467 CopyAndAugmentManifest(build_dir, installer_dir, 'setup.exe.manifest',
468 exe_manifest_dependencies, '</assembly>') 468 exe_manifest_dependencies, '</assembly>')
469 469
470 # Generate assembly manifests for each DLL in |dlls|. These do not interfere 470 # Generate assembly manifests for each DLL in |dlls|. These do not interfere
471 # with the private manifests potentially embedded in each DLL. They simply 471 # with the private manifests potentially embedded in each DLL. They simply
472 # allow chrome.exe and setup.exe to see those DLLs although they are in a 472 # allow chrome.exe and setup.exe to see those DLLs although they are in a
473 # separate directory post-install. 473 # separate directory post-install.
474 for name in dll_names: 474 for name in dll_names:
475 dll_manifest = ( 475 dll_manifest = (
476 "<assembly\n" 476 "<assembly\n"
477 " xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>\n" 477 " xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>\n"
478 " <assemblyIdentity name='chrome.{dll_name}' version='0.0.0.0'\n" 478 " <assemblyIdentity name='chrome.{dll_name}' version='0.0.0.0'\n"
479 " type='win32' processorArchitecture='x86'/>\n" 479 " type='win32' processorArchitecture='*'/>\n"
480 " <file name='{dll_name}.dll'/>\n" 480 " <file name='{dll_name}.dll'/>\n"
481 "</assembly>".format(dll_name=name)) 481 "</assembly>".format(dll_name=name))
482 482
483 dll_manifest_file = open(os.path.join( 483 dll_manifest_file = open(os.path.join(
484 version_dir, "chrome.{dll_name}.manifest".format(dll_name=name)), 'w') 484 version_dir, "chrome.{dll_name}.manifest".format(dll_name=name)), 'w')
485 dll_manifest_file.write(dll_manifest) 485 dll_manifest_file.write(dll_manifest)
486 dll_manifest_file.close() 486 dll_manifest_file.close()
487 487
488 488
489 def main(options): 489 def main(options):
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 if not options.resource_file_path: 594 if not options.resource_file_path:
595 options.resource_file_path = os.path.join(options.build_dir, 595 options.resource_file_path = os.path.join(options.build_dir,
596 MINI_INSTALLER_INPUT_FILE) 596 MINI_INSTALLER_INPUT_FILE)
597 597
598 return options 598 return options
599 599
600 600
601 if '__main__' == __name__: 601 if '__main__' == __name__:
602 print sys.argv 602 print sys.argv
603 sys.exit(main(_ParseOptions())) 603 sys.exit(main(_ParseOptions()))
OLDNEW
« no previous file with comments | « chrome/app/chrome.exe.manifest ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698