OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright 2014 The Chromium Authors. All rights reserved. | 3 # Copyright 2014 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 json | 7 import json |
8 import io | 8 import io |
9 import optparse | 9 import optparse |
10 import os | 10 import os |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 parser.add_option( | 50 parser.add_option( |
51 '-o', '--output_manifest', action='store', metavar='OUTPUT_MANIFEST', | 51 '-o', '--output_manifest', action='store', metavar='OUTPUT_MANIFEST', |
52 help='File to place generated manifest') | 52 help='File to place generated manifest') |
53 parser.add_option( | 53 parser.add_option( |
54 '--is_guest_manifest', default='0', action='store', metavar='NUM', | 54 '--is_guest_manifest', default='0', action='store', metavar='NUM', |
55 help='Whether to generate a guest mode capable manifest') | 55 help='Whether to generate a guest mode capable manifest') |
56 parser.add_option( | 56 parser.add_option( |
57 '--is_chromevox_classic', default='0', action='store', metavar='NUM', | 57 '--is_chromevox_classic', default='0', action='store', metavar='NUM', |
58 help='Whether to generate a ChromeVox Classic manifest') | 58 help='Whether to generate a ChromeVox Classic manifest') |
59 parser.add_option( | 59 parser.add_option( |
| 60 '--is_chromeos', default='0', action='store', metavar='NUM', |
| 61 help='Whether to add permissions specific to Chrome OS') |
| 62 parser.add_option( |
60 '--is_js_compressed', default='1', action='store', metavar='NUM', | 63 '--is_js_compressed', default='1', action='store', metavar='NUM', |
61 help='Whether compressed JavaScript files are used') | 64 help='Whether compressed JavaScript files are used') |
62 parser.add_option( | 65 parser.add_option( |
63 '--set_version', action='store', metavar='SET_VERSION', | 66 '--set_version', action='store', metavar='SET_VERSION', |
64 help='Set the extension version') | 67 help='Set the extension version') |
65 parser.add_option( | 68 parser.add_option( |
66 '--key', action='store', metavar='KEY', | 69 '--key', action='store', metavar='KEY', |
67 help='Set the extension key') | 70 help='Set the extension key') |
68 parser.add_option( | 71 parser.add_option( |
69 '--version_file', action='store', metavar='NAME', | 72 '--version_file', action='store', metavar='NAME', |
(...skipping 13 matching lines...) Expand all Loading... |
83 print >>sys.stderr, ('one of --set_version or --version_file option ' + | 86 print >>sys.stderr, ('one of --set_version or --version_file option ' + |
84 'must be specified') | 87 'must be specified') |
85 sys.exit(1) | 88 sys.exit(1) |
86 context = {k: v for k, v in parser.values.__dict__.items() if v is not None} | 89 context = {k: v for k, v in parser.values.__dict__.items() if v is not None} |
87 if options.version_file is not None: | 90 if options.version_file is not None: |
88 context['set_version'] = getChromeVersion(options.version_file) | 91 context['set_version'] = getChromeVersion(options.version_file) |
89 processJinjaTemplate(args[0], options.output_manifest, context) | 92 processJinjaTemplate(args[0], options.output_manifest, context) |
90 | 93 |
91 if __name__ == '__main__': | 94 if __name__ == '__main__': |
92 main() | 95 main() |
OLD | NEW |