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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 | 348 |
349 # Set the correct API keys. | 349 # Set the correct API keys. |
350 # For overriding the client ID/secret via env vars, see google_api_keys.py. | 350 # For overriding the client ID/secret via env vars, see google_api_keys.py. |
351 apiClientId = google_api_keys.GetClientID('REMOTING') | 351 apiClientId = google_api_keys.GetClientID('REMOTING') |
352 apiClientSecret = google_api_keys.GetClientSecret('REMOTING') | 352 apiClientSecret = google_api_keys.GetClientSecret('REMOTING') |
353 | 353 |
354 if is_app_remoting_webapp and buildtype != 'Dev': | 354 if is_app_remoting_webapp and buildtype != 'Dev': |
355 if not app_client_id: | 355 if not app_client_id: |
356 raise Exception('Invalid app_client_id passed in: "' + | 356 raise Exception('Invalid app_client_id passed in: "' + |
357 app_client_id + '"') | 357 app_client_id + '"') |
358 apiClientIdV2 = app_client_id | 358 apiClientIdV2 = app_client_id + '.apps.googleusercontent.com' |
359 else: | 359 else: |
360 apiClientIdV2 = google_api_keys.GetClientID('REMOTING_IDENTITY_API') | 360 apiClientIdV2 = google_api_keys.GetClientID('REMOTING_IDENTITY_API') |
361 | 361 |
362 replaceString(destination, 'API_CLIENT_ID', apiClientId) | 362 replaceString(destination, 'API_CLIENT_ID', apiClientId) |
363 replaceString(destination, 'API_CLIENT_SECRET', apiClientSecret) | 363 replaceString(destination, 'API_CLIENT_SECRET', apiClientSecret) |
364 | 364 |
365 # Write the application capabilities. | 365 # Write the application capabilities. |
366 appCapabilities = ','.join( | 366 appCapabilities = ','.join( |
367 ['remoting.ClientSession.Capability.' + x for x in app_capabilities]) | 367 ['remoting.ClientSession.Capability.' + x for x in app_capabilities]) |
368 findAndReplace(os.path.join(destination, 'app_capabilities.js'), | 368 findAndReplace(os.path.join(destination, 'app_capabilities.js'), |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
443 parser.add_argument('--use_gcd', choices=['0', '1'], default='0') | 443 parser.add_argument('--use_gcd', choices=['0', '1'], default='0') |
444 | 444 |
445 args = parser.parse_args() | 445 args = parser.parse_args() |
446 args.use_gcd = (args.use_gcd != '0') | 446 args.use_gcd = (args.use_gcd != '0') |
447 args.app_capabilities = set(args.app_capabilities) | 447 args.app_capabilities = set(args.app_capabilities) |
448 return buildWebApp(**vars(args)) | 448 return buildWebApp(**vars(args)) |
449 | 449 |
450 | 450 |
451 if __name__ == '__main__': | 451 if __name__ == '__main__': |
452 sys.exit(main()) | 452 sys.exit(main()) |
OLD | NEW |