| OLD | NEW |
| 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 450 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 461 # setup.exe to be able to run (as it doesn't statically link in component | 461 # setup.exe to be able to run (as it doesn't statically link in component |
| 462 # DLLs). | 462 # DLLs). |
| 463 # This makes the archive ~1.5X bigger (Release ~185MB => ~278MB; | 463 # This makes the archive ~1.5X bigger (Release ~185MB => ~278MB; |
| 464 # Debug ~520MB => ~875MB) this is however simpler than any other installer | 464 # Debug ~520MB => ~875MB) this is however simpler than any other installer |
| 465 # change and doesn't make archive generation itself slower so it only | 465 # change and doesn't make archive generation itself slower so it only |
| 466 # matters when copying the archive to other test machines. This approach | 466 # matters when copying the archive to other test machines. This approach |
| 467 # can be revised if this is a problem. | 467 # can be revised if this is a problem. |
| 468 shutil.copy(component_dll, installer_dir) | 468 shutil.copy(component_dll, installer_dir) |
| 469 component_dll_filenames.append(os.path.basename(component_dll)) | 469 component_dll_filenames.append(os.path.basename(component_dll)) |
| 470 | 470 |
| 471 # Copy chrome.exe.manifest as-is. It is required, among other things, to | |
| 472 # declare a dependency on the version dir assembly. | |
| 473 shutil.copy(os.path.join(build_dir, 'chrome.exe.manifest'), chrome_dir) | |
| 474 | |
| 475 # Also copy setup.exe.manifest as-is. It is required, among other things, to | |
| 476 # let setup.exe UAC when it wants to, by specifying that it handles elevation | |
| 477 # "asInvoker", rather than have Windows auto-elevate it when launched. | |
| 478 shutil.copy(os.path.join(build_dir, 'setup.exe.manifest'), installer_dir) | |
| 479 | |
| 480 # Augment {version}.manifest to include all component DLLs as part of the | 471 # Augment {version}.manifest to include all component DLLs as part of the |
| 481 # assembly it constitutes, which will allow dependents of this assembly to | 472 # assembly it constitutes, which will allow dependents of this assembly to |
| 482 # find these DLLs. | 473 # find these DLLs. |
| 483 version_assembly_dll_additions = [] | 474 version_assembly_dll_additions = [] |
| 484 for dll_filename in component_dll_filenames: | 475 for dll_filename in component_dll_filenames: |
| 485 version_assembly_dll_additions.append(" <file name='%s'/>" % dll_filename) | 476 version_assembly_dll_additions.append(" <file name='%s'/>" % dll_filename) |
| 486 CopyAndAugmentManifest(build_dir, version_dir, | 477 CopyAndAugmentManifest(build_dir, version_dir, |
| 487 '%s.manifest' % current_version, | 478 '%s.manifest' % current_version, |
| 488 '\n'.join(version_assembly_dll_additions), | 479 '\n'.join(version_assembly_dll_additions), |
| 489 '</assembly>') | 480 '</assembly>') |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 if not options.resource_file_path: | 590 if not options.resource_file_path: |
| 600 options.resource_file_path = os.path.join(options.build_dir, | 591 options.resource_file_path = os.path.join(options.build_dir, |
| 601 MINI_INSTALLER_INPUT_FILE) | 592 MINI_INSTALLER_INPUT_FILE) |
| 602 | 593 |
| 603 return options | 594 return options |
| 604 | 595 |
| 605 | 596 |
| 606 if '__main__' == __name__: | 597 if '__main__' == __name__: |
| 607 print sys.argv | 598 print sys.argv |
| 608 sys.exit(main(_ParseOptions())) | 599 sys.exit(main(_ParseOptions())) |
| OLD | NEW |