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 directory with with the unpacked contents of the remoting webapp. | 6 """Creates a directory with with the unpacked contents of the remoting webapp. |
7 | 7 |
8 The directory will contain a copy-of or a link-to to all remoting webapp | 8 The directory will contain a copy-of or a link-to to all remoting webapp |
9 resources. This includes HTML/JS and any plugin binaries. The script also | 9 resources. This includes HTML/JS and any plugin binaries. The script also |
10 massages resulting files appropriately with host plugin data. Finally, | 10 massages resulting files appropriately with host plugin data. Finally, |
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 if len(sys.argv) < 6: | 265 if len(sys.argv) < 6: |
266 print ('Usage: build-webapp.py ' | 266 print ('Usage: build-webapp.py ' |
267 '<build-type> <version> <dst> <zip-path> <manifest_template> ' | 267 '<build-type> <version> <dst> <zip-path> <manifest_template> ' |
268 '<webapp_type> <other files...> ' | 268 '<webapp_type> <other files...> ' |
269 '[--locales <locales...>]') | 269 '[--locales <locales...>]') |
270 return 1 | 270 return 1 |
271 | 271 |
272 arg_type = '' | 272 arg_type = '' |
273 files = [] | 273 files = [] |
274 locales = [] | 274 locales = [] |
275 for arg in sys.argv[8:]: | 275 for arg in sys.argv[7:]: |
276 if arg in ['--locales']: | 276 if arg in ['--locales']: |
277 arg_type = arg | 277 arg_type = arg |
278 elif arg_type == '--locales': | 278 elif arg_type == '--locales': |
279 locales.append(arg) | 279 locales.append(arg) |
280 else: | 280 else: |
281 files.append(arg) | 281 files.append(arg) |
282 | 282 |
283 return buildWebApp(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], | 283 return buildWebApp(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], |
284 sys.argv[5], sys.argv[6], files, locales) | 284 sys.argv[5], sys.argv[6], files, locales) |
285 | 285 |
286 | 286 |
287 if __name__ == '__main__': | 287 if __name__ == '__main__': |
288 sys.exit(main()) | 288 sys.exit(main()) |
OLD | NEW |