| 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 230 dest = join(STAGING_DIR, 'NaClARM') | 230 dest = join(STAGING_DIR, 'NaClARM') |
| 231 CopyWithReplacement(src, dest, arm_replacements) | 231 CopyWithReplacement(src, dest, arm_replacements) |
| 232 | 232 |
| 233 # Create PNaCl | 233 # Create PNaCl |
| 234 pnacl_replacements = { | 234 pnacl_replacements = { |
| 235 'NaCl64': 'PNaCl', | 235 'NaCl64': 'PNaCl', |
| 236 'x86_64': 'pnacl', | 236 'x86_64': 'pnacl', |
| 237 '64': '32', | 237 '64': '32', |
| 238 '.nexe': '.pexe', | 238 '.nexe': '.pexe', |
| 239 'nacl_link.xml': 'pnacl_link.xml', | 239 'nacl_link.xml': 'pnacl_link.xml', |
| 240 '$(ProjectName)_$(PlatformArchitecture)': '$(ProjectName)', | |
| 241 } | 240 } |
| 242 | 241 |
| 243 dest = join(STAGING_DIR, 'PNaCl') | 242 dest = join(STAGING_DIR, 'PNaCl') |
| 244 CopyWithReplacement(src, dest, pnacl_replacements) | 243 CopyWithReplacement(src, dest, pnacl_replacements) |
| 245 | 244 |
| 246 # Create archive | 245 # Create archive |
| 247 archive = tarfile.open(OUTPUT_NAME, 'w:gz') | 246 archive = tarfile.open(OUTPUT_NAME, 'w:gz') |
| 248 AddFolderToArchive(STAGING_DIR, archive) | 247 AddFolderToArchive(STAGING_DIR, archive) |
| 249 archive.close() | 248 archive.close() |
| 250 return 0 | 249 return 0 |
| 251 | 250 |
| 252 | 251 |
| 253 if __name__ == '__main__': | 252 if __name__ == '__main__': |
| 254 sys.exit(main(sys.argv[1:])) | 253 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |