| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 import glob | 7 import glob |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import shutil | 10 import shutil |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 | 81 |
| 82 | 82 |
| 83 def GenerateChromeDriverFileList(srcpath): | 83 def GenerateChromeDriverFileList(srcpath): |
| 84 return CHROMEDRIVER_FILES | 84 return CHROMEDRIVER_FILES |
| 85 | 85 |
| 86 | 86 |
| 87 def ZipDir(zipFile, directory): | 87 def ZipDir(zipFile, directory): |
| 88 if HOST_OS == 'win': | 88 if HOST_OS == 'win': |
| 89 cmd = os.path.normpath(os.path.join( | 89 cmd = os.path.normpath(os.path.join( |
| 90 os.path.dirname(__file__), | 90 os.path.dirname(__file__), |
| 91 '../third_party/lzma_sdk/Executable/7za.exe')) | 91 '../../../third_party/lzma_sdk/Executable/7za.exe')) |
| 92 options = ['a', '-r', '-tzip'] | 92 options = ['a', '-r', '-tzip'] |
| 93 else: | 93 else: |
| 94 cmd = 'zip' | 94 cmd = 'zip' |
| 95 options = ['-yr'] | 95 options = ['-yr'] |
| 96 utils.runCommand([cmd] + options + [zipFile, directory]) | 96 utils.runCommand([cmd] + options + [zipFile, directory]) |
| 97 | 97 |
| 98 | 98 |
| 99 def GenerateZipFile(zipFile, stageDir, fileList): | 99 def GenerateZipFile(zipFile, stageDir, fileList): |
| 100 # Stage files. | 100 # Stage files. |
| 101 for fileName in fileList: | 101 for fileName in fileList: |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 195 action='store', type='string', | 195 action='store', type='string', |
| 196 help='(Release|Debug)') | 196 help='(Release|Debug)') |
| 197 (options, args) = parser.parse_args() | 197 (options, args) = parser.parse_args() |
| 198 Archive(srcpath, options.mode, options.dartium, options.contentshell, | 198 Archive(srcpath, options.mode, options.dartium, options.contentshell, |
| 199 options.chromedriver) | 199 options.chromedriver) |
| 200 return 0 | 200 return 0 |
| 201 | 201 |
| 202 | 202 |
| 203 if __name__ == '__main__': | 203 if __name__ == '__main__': |
| 204 sys.exit(main()) | 204 sys.exit(main()) |
| OLD | NEW |