| 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 """Takes the output of the build step and turns it into a compressed | 6 """Takes the output of the build step and turns it into a compressed |
| 7 archive ready for distribution. | 7 archive ready for distribution. |
| 8 | 8 |
| 9 This script assumes the build script has been run to compile the add-in. | 9 This script assumes the build script has been run to compile the add-in. |
| 10 It zips up all files required for the add-in installation and places the | 10 It zips up all files required for the add-in installation and places the |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 # Regex list to exclude from the archive. If a file path matches any of the | 47 # Regex list to exclude from the archive. If a file path matches any of the |
| 48 # expressions during a call to AddFolderToArchive it is excluded from the | 48 # expressions during a call to AddFolderToArchive it is excluded from the |
| 49 # archive file. | 49 # archive file. |
| 50 EXCLUDES = [ | 50 EXCLUDES = [ |
| 51 r'\.svn', # Exclude .svn directories. | 51 r'\.svn', # Exclude .svn directories. |
| 52 r'\.swp', # Exclude .swp files. | 52 r'\.swp', # Exclude .swp files. |
| 53 r'examples\\.*\\chrome_data', | 53 r'examples\\.*\\chrome_data', |
| 54 r'examples\\.*\\Debug', | 54 r'examples\\.*\\Debug', |
| 55 r'examples\\.*\\newlib', | 55 r'examples\\.*\\newlib', |
| 56 r'examples\\.*\\glibc', |
| 57 r'examples\\.*\\PNaCl', |
| 56 r'examples\\.*\\win', | 58 r'examples\\.*\\win', |
| 57 r'examples\\.*\\ipch', | 59 r'examples\\.*\\ipch', |
| 58 r'examples\\.*\\*.sdf', | 60 r'examples\\.*\\*.sdf', |
| 59 r'examples\\.*\\*.suo', | 61 r'examples\\.*\\*.suo', |
| 60 # Exclude .AddIn file for now since we need to modify it with version info. | 62 # Exclude .AddIn file for now since we need to modify it with version info. |
| 61 re.escape(ADDIN_METADATA)] | 63 re.escape(ADDIN_METADATA)] |
| 62 | 64 |
| 63 # List of source/destination pairs to include in archive file. | 65 # List of source/destination pairs to include in archive file. |
| 64 FILE_LIST = [ | 66 FILE_LIST = [ |
| 65 (ADDIN_ASSEMBLY, ''), | 67 (ADDIN_ASSEMBLY, ''), |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 187 dest = join(BUILD_DIR, 'PNaCl') | 189 dest = join(BUILD_DIR, 'PNaCl') |
| 188 CopyWithReplacement(src64, dest, replacements) | 190 CopyWithReplacement(src64, dest, replacements) |
| 189 AddFolderToArchive(dest, archive, "PNaCl") | 191 AddFolderToArchive(dest, archive, "PNaCl") |
| 190 | 192 |
| 191 AddVersionModifiedAddinFile(archive) | 193 AddVersionModifiedAddinFile(archive) |
| 192 archive.close() | 194 archive.close() |
| 193 | 195 |
| 194 | 196 |
| 195 if __name__ == '__main__': | 197 if __name__ == '__main__': |
| 196 main() | 198 main() |
| OLD | NEW |