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 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
272 "'THIRD_PARTY_AUTH_REDIRECT_URL'", | 272 "'THIRD_PARTY_AUTH_REDIRECT_URL'", |
273 thirdPartyAuthUrlJs) | 273 thirdPartyAuthUrlJs) |
274 findAndReplace(os.path.join(destination, 'manifest.json'), | 274 findAndReplace(os.path.join(destination, 'manifest.json'), |
275 "THIRD_PARTY_AUTH_REDIRECT_URL", | 275 "THIRD_PARTY_AUTH_REDIRECT_URL", |
276 thirdPartyAuthUrlJson) | 276 thirdPartyAuthUrlJson) |
277 | 277 |
278 # Set the correct API keys. | 278 # Set the correct API keys. |
279 # For overriding the client ID/secret via env vars, see google_api_keys.py. | 279 # For overriding the client ID/secret via env vars, see google_api_keys.py. |
280 apiClientId = google_api_keys.GetClientID('REMOTING') | 280 apiClientId = google_api_keys.GetClientID('REMOTING') |
281 apiClientSecret = google_api_keys.GetClientSecret('REMOTING') | 281 apiClientSecret = google_api_keys.GetClientSecret('REMOTING') |
282 apiClientIdV2 = google_api_keys.GetClientID('REMOTING_IDENTITY_API') | |
Jói
2013/08/15 09:26:08
It would be good to also add this to the debugging
Jamie
2013/08/15 18:29:59
Done.
| |
282 | 283 |
283 findAndReplace(os.path.join(destination, 'plugin_settings.js'), | 284 findAndReplace(os.path.join(destination, 'plugin_settings.js'), |
284 "'API_CLIENT_ID'", | 285 "'API_CLIENT_ID'", |
285 "'" + apiClientId + "'") | 286 "'" + apiClientId + "'") |
286 findAndReplace(os.path.join(destination, 'plugin_settings.js'), | 287 findAndReplace(os.path.join(destination, 'plugin_settings.js'), |
287 "'API_CLIENT_SECRET'", | 288 "'API_CLIENT_SECRET'", |
288 "'" + apiClientSecret + "'") | 289 "'" + apiClientSecret + "'") |
290 findAndReplace(os.path.join(destination, 'manifest.json'), | |
291 '"REMOTING_IDENTITY_API_CLIENT_ID"', | |
292 '"' + apiClientIdV2 + '"') | |
289 | 293 |
290 # Use a consistent extension id for unofficial builds. | 294 # Use a consistent extension id for unofficial builds. |
291 if buildtype != 'Official': | 295 if buildtype != 'Official': |
292 manifestKey = '"key": "remotingdevbuild",' | 296 manifestKey = '"key": "remotingdevbuild",' |
293 else: | 297 else: |
294 manifestKey = '' | 298 manifestKey = '' |
295 findAndReplace(os.path.join(destination, 'manifest.json'), | 299 findAndReplace(os.path.join(destination, 'manifest.json'), |
296 'MANIFEST_KEY_FOR_UNOFFICIAL_BUILD', manifestKey) | 300 'MANIFEST_KEY_FOR_UNOFFICIAL_BUILD', manifestKey) |
297 | 301 |
298 # Make the zipfile. | 302 # Make the zipfile. |
(...skipping 23 matching lines...) Expand all Loading... | |
322 patches.append(arg) | 326 patches.append(arg) |
323 else: | 327 else: |
324 files.append(arg) | 328 files.append(arg) |
325 | 329 |
326 return buildWebApp(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], | 330 return buildWebApp(sys.argv[1], sys.argv[2], sys.argv[3], sys.argv[4], |
327 sys.argv[5], sys.argv[6], files, locales, patches) | 331 sys.argv[5], sys.argv[6], files, locales, patches) |
328 | 332 |
329 | 333 |
330 if __name__ == '__main__': | 334 if __name__ == '__main__': |
331 sys.exit(main()) | 335 sys.exit(main()) |
OLD | NEW |