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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 # 26bit = 64MB. This results in an additional ~3.5MB decrease. | 79 # 26bit = 64MB. This results in an additional ~3.5MB decrease. |
80 # Older 7zip versions can support these settings, as these changes | 80 # Older 7zip versions can support these settings, as these changes |
81 # rely on existing functionality in the lzma format. | 81 # rely on existing functionality in the lzma format. |
82 '-m0=BCJ2', | 82 '-m0=BCJ2', |
83 '-m1=LZMA:d27:fb128', | 83 '-m1=LZMA:d27:fb128', |
84 '-m2=LZMA:d22:fb128:mf=bt2', | 84 '-m2=LZMA:d22:fb128:mf=bt2', |
85 '-m3=LZMA:d22:fb128:mf=bt2', | 85 '-m3=LZMA:d22:fb128:mf=bt2', |
86 '-mb0:1', | 86 '-mb0:1', |
87 '-mb0s1:2', | 87 '-mb0s1:2', |
88 '-mb0s2:3', | 88 '-mb0s2:3', |
89 compressed_file, | 89 os.path.abspath(compressed_file), |
90 input_file,] | 90 os.path.abspath(input_file),] |
91 if os.path.exists(compressed_file): | 91 if os.path.exists(compressed_file): |
92 os.remove(compressed_file) | 92 os.remove(compressed_file) |
93 RunSystemCommand(cmd, verbose) | 93 RunSystemCommand(cmd, verbose) |
94 | 94 |
95 | 95 |
96 def CopyAllFilesToStagingDir(config, distribution, staging_dir, build_dir, | 96 def CopyAllFilesToStagingDir(config, distribution, staging_dir, build_dir, |
97 enable_hidpi): | 97 enable_hidpi): |
98 """Copies the files required for installer archive. | 98 """Copies the files required for installer archive. |
99 Copies all common files required for various distributions of Chromium and | 99 Copies all common files required for various distributions of Chromium and |
100 also files for the specific Chromium build specified by distribution. | 100 also files for the specific Chromium build specified by distribution. |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
683 MINI_INSTALLER_INPUT_FILE) | 683 MINI_INSTALLER_INPUT_FILE) |
684 | 684 |
685 return options | 685 return options |
686 | 686 |
687 | 687 |
688 if '__main__' == __name__: | 688 if '__main__' == __name__: |
689 options = _ParseOptions() | 689 options = _ParseOptions() |
690 if options.verbose: | 690 if options.verbose: |
691 print sys.argv | 691 print sys.argv |
692 sys.exit(main(options)) | 692 sys.exit(main(options)) |
OLD | NEW |