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 """Creates a zip archive for the Chrome Remote Desktop Host installer. | 6 """Creates a zip archive for the Chrome Remote Desktop Host installer. |
7 | 7 |
8 This script builds a zip file that contains all the files needed to build an | 8 This script builds a zip file that contains all the files needed to build an |
9 installer for Chrome Remote Desktop Host. | 9 installer for Chrome Remote Desktop Host. |
10 | 10 |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 defs: Dictionary of variable definitions. | 183 defs: Dictionary of variable definitions. |
184 """ | 184 """ |
185 cleanDir(temp_dir) | 185 cleanDir(temp_dir) |
186 | 186 |
187 for f in source_files: | 187 for f in source_files: |
188 dst_file = remapSrcFile(temp_dir, source_file_roots, f) | 188 dst_file = remapSrcFile(temp_dir, source_file_roots, f) |
189 base_file = os.path.basename(f) | 189 base_file = os.path.basename(f) |
190 (base, ext) = os.path.splitext(f) | 190 (base, ext) = os.path.splitext(f) |
191 if ext == '.zip': | 191 if ext == '.zip': |
192 copyZipIntoArchive(temp_dir, source_file_roots, f) | 192 copyZipIntoArchive(temp_dir, source_file_roots, f) |
193 elif ext in ['.packproj', '.pkgproj', '.plist', '.sh']: | 193 elif ext in ['.packproj', '.pkgproj', '.plist', '.props', '.sh']: |
194 copyFileWithDefs(f, dst_file, defs) | 194 copyFileWithDefs(f, dst_file, defs) |
195 else: | 195 else: |
196 shutil.copy2(f, dst_file) | 196 shutil.copy2(f, dst_file) |
197 | 197 |
198 for bs, bd in zip(gen_files, gen_files_dst): | 198 for bs, bd in zip(gen_files, gen_files_dst): |
199 dst_file = os.path.join(temp_dir, bd) | 199 dst_file = os.path.join(temp_dir, bd) |
200 if os.path.isdir(bs): | 200 if os.path.isdir(bs): |
201 shutil.copytree(bs, dst_file) | 201 shutil.copytree(bs, dst_file) |
202 else: | 202 else: |
203 shutil.copy2(bs, dst_file) | 203 shutil.copy2(bs, dst_file) |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 | 283 |
284 result = buildHostArchive(temp_dir, zip_path, source_file_roots, | 284 result = buildHostArchive(temp_dir, zip_path, source_file_roots, |
285 source_files, generated_files, generated_files_dst, | 285 source_files, generated_files, generated_files_dst, |
286 defs) | 286 defs) |
287 | 287 |
288 return 0 | 288 return 0 |
289 | 289 |
290 | 290 |
291 if __name__ == '__main__': | 291 if __name__ == '__main__': |
292 sys.exit(main()) | 292 sys.exit(main()) |
OLD | NEW |