Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(135)

Side by Side Diff: remoting/webapp/build-webapp.py

Issue 1143643003: [Chromoting] Add GN build support for ar_sample_app target. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 files.append(s.rstrip()) 162 files.append(s.rstrip())
163 163
164 # Ensure a fresh directory. 164 # Ensure a fresh directory.
165 try: 165 try:
166 shutil.rmtree(destination) 166 shutil.rmtree(destination)
167 except OSError: 167 except OSError:
168 if os.path.exists(destination): 168 if os.path.exists(destination):
169 raise 169 raise
170 else: 170 else:
171 pass 171 pass
172 os.mkdir(destination, 0775) 172 os.makedirs(destination, 0775)
173 173
174 if buildtype != 'Official' and buildtype != 'Release' and buildtype != 'Dev': 174 if buildtype != 'Official' and buildtype != 'Release' and buildtype != 'Dev':
175 raise Exception('Unknown buildtype: ' + buildtype) 175 raise Exception('Unknown buildtype: ' + buildtype)
176 176
177 jinja_context = { 177 jinja_context = {
178 'webapp_type': webapp_type, 178 'webapp_type': webapp_type,
179 'buildtype': buildtype, 179 'buildtype': buildtype,
180 } 180 }
181 181
182 # Copy all the files. 182 # Copy all the files.
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
456 parser.add_argument('--use_gcd', choices=['0', '1'], default='0') 456 parser.add_argument('--use_gcd', choices=['0', '1'], default='0')
457 457
458 args = parser.parse_args() 458 args = parser.parse_args()
459 args.use_gcd = (args.use_gcd != '0') 459 args.use_gcd = (args.use_gcd != '0')
460 args.app_capabilities = set(args.app_capabilities) 460 args.app_capabilities = set(args.app_capabilities)
461 return buildWebApp(**vars(args)) 461 return buildWebApp(**vars(args))
462 462
463 463
464 if __name__ == '__main__': 464 if __name__ == '__main__':
465 sys.exit(main()) 465 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698