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'examples\\.*\\chrome_data', | 52 r'examples\\.*\\chrome_data', |
53 r'examples\\.*\\Debug', | 53 r'examples\\.*\\Debug', |
54 r'examples\\.*\\newlib', | 54 r'examples\\.*\\newlib', |
55 r'examples\\.*\\win', | 55 r'examples\\.*\\win', |
| 56 r'examples\\.*\\ipch', |
| 57 r'examples\\.*\\*.sdf', |
| 58 r'examples\\.*\\*.suo', |
56 # Exclude .AddIn file for now since we need to modify it with version info. | 59 # Exclude .AddIn file for now since we need to modify it with version info. |
57 re.escape(ADDIN_METADATA)] | 60 re.escape(ADDIN_METADATA)] |
58 | 61 |
59 # List of source/destination pairs to include in archive file. | 62 # List of source/destination pairs to include in archive file. |
60 FILE_LIST = [ | 63 FILE_LIST = [ |
61 (ADDIN_ASSEMBLY, ''), | 64 (ADDIN_ASSEMBLY, ''), |
62 (join(ASSEMBLY_DIRECTORY, 'NaCl.Build.CPPTasks.dll'), 'NaCl')] | 65 (join(ASSEMBLY_DIRECTORY, 'NaCl.Build.CPPTasks.dll'), 'NaCl')] |
63 | 66 |
64 | 67 |
65 def AddFolderToArchive(path, archive, root=""): | 68 def AddFolderToArchive(path, archive, root=""): |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 open(destfile, "wb").write(data) | 162 open(destfile, "wb").write(data) |
160 | 163 |
161 AddFolderToArchive(join(BUILD_DIR, "NaCl32"), archive, "NaCl32") | 164 AddFolderToArchive(join(BUILD_DIR, "NaCl32"), archive, "NaCl32") |
162 | 165 |
163 AddVersionModifiedAddinFile(archive) | 166 AddVersionModifiedAddinFile(archive) |
164 archive.close() | 167 archive.close() |
165 | 168 |
166 | 169 |
167 if __name__ == '__main__': | 170 if __name__ == '__main__': |
168 main() | 171 main() |
OLD | NEW |