| 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 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 if not os.path.exists(installer_dir): | 490 if not os.path.exists(installer_dir): |
| 491 os.mkdir(installer_dir) | 491 os.mkdir(installer_dir) |
| 492 | 492 |
| 493 # Copy the VS CRT DLLs to |build_dir|. This must be done before the general | 493 # Copy the VS CRT DLLs to |build_dir|. This must be done before the general |
| 494 # copy step below to ensure the CRT DLLs are added to the archive and marked | 494 # copy step below to ensure the CRT DLLs are added to the archive and marked |
| 495 # as a dependency in the exe manifests generated below. | 495 # as a dependency in the exe manifests generated below. |
| 496 CopyVisualStudioRuntimeDLLs(target_arch, build_dir) | 496 CopyVisualStudioRuntimeDLLs(target_arch, build_dir) |
| 497 | 497 |
| 498 # Explicitly list the component DLLs setup.exe depends on (this list may | 498 # Explicitly list the component DLLs setup.exe depends on (this list may |
| 499 # contain wildcards). These will be copied to |installer_dir| in the archive. | 499 # contain wildcards). These will be copied to |installer_dir| in the archive. |
| 500 setup_component_dll_globs = [ 'base.dll', | 500 # The use of source sets in gn builds means that references to some extra |
| 501 # DLLs get pulled in to setup.exe (base_i18n.dll, ipc.dll, etc.). Unpacking |
| 502 # these to |installer_dir| is simpler and more robust than switching setup.exe |
| 503 # to use libraries instead of source sets. |
| 504 setup_component_dll_globs = [ 'api-ms-win-*.dll', |
| 505 'base.dll', |
| 501 'boringssl.dll', | 506 'boringssl.dll', |
| 502 'crcrypto.dll', | 507 'crcrypto.dll', |
| 503 'icui18n.dll', | 508 'icui18n.dll', |
| 504 'icuuc.dll', | 509 'icuuc.dll', |
| 505 'msvc*.dll', | 510 'msvc*.dll', |
| 506 'api-ms-win-*.dll', | 511 'vcruntime*.dll', |
| 507 'vcruntime*.dll' ] | 512 # DLLs needed due to source sets. |
| 513 'base_i18n.dll', |
| 514 'ipc.dll', |
| 515 'net.dll', |
| 516 'prefs.dll', |
| 517 'protobuf_lite.dll', |
| 518 'url_lib.dll' ] |
| 508 for setup_component_dll_glob in setup_component_dll_globs: | 519 for setup_component_dll_glob in setup_component_dll_globs: |
| 509 setup_component_dlls = glob.glob(os.path.join(build_dir, | 520 setup_component_dlls = glob.glob(os.path.join(build_dir, |
| 510 setup_component_dll_glob)) | 521 setup_component_dll_glob)) |
| 511 for setup_component_dll in setup_component_dlls: | 522 for setup_component_dll in setup_component_dlls: |
| 512 g_archive_inputs.append(setup_component_dll) | 523 g_archive_inputs.append(setup_component_dll) |
| 513 shutil.copy(setup_component_dll, installer_dir) | 524 shutil.copy(setup_component_dll, installer_dir) |
| 514 | 525 |
| 515 # Stage all the component DLLs found in |build_dir| to the |version_dir| (for | 526 # Stage all the component DLLs found in |build_dir| to the |version_dir| (for |
| 516 # the version assembly to be able to refer to them below and make sure | 527 # the version assembly to be able to refer to them below and make sure |
| 517 # chrome.exe can find them at runtime). The component DLLs are considered to | 528 # chrome.exe can find them at runtime). The component DLLs are considered to |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 667 MINI_INSTALLER_INPUT_FILE) | 678 MINI_INSTALLER_INPUT_FILE) |
| 668 | 679 |
| 669 return options | 680 return options |
| 670 | 681 |
| 671 | 682 |
| 672 if '__main__' == __name__: | 683 if '__main__' == __name__: |
| 673 options = _ParseOptions() | 684 options = _ParseOptions() |
| 674 if options.verbose: | 685 if options.verbose: |
| 675 print sys.argv | 686 print sys.argv |
| 676 sys.exit(main(options)) | 687 sys.exit(main(options)) |
| OLD | NEW |