OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import json | 5 import json |
6 import os | 6 import os |
7 import sys | 7 import sys |
8 | 8 |
9 import buildbot_common | 9 import buildbot_common |
10 import build_version | 10 import build_version |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 combined_permissions.append({'socket': socket_permissions}) | 153 combined_permissions.append({'socket': socket_permissions}) |
154 pretty_permissions = json.dumps(combined_permissions, | 154 pretty_permissions = json.dumps(combined_permissions, |
155 sort_keys=True, indent=4) | 155 sort_keys=True, indent=4) |
156 replace = { | 156 replace = { |
157 'name': desc['TITLE'], | 157 'name': desc['TITLE'], |
158 'description': '%s Example' % desc['TITLE'], | 158 'description': '%s Example' % desc['TITLE'], |
159 'key': True, | 159 'key': True, |
160 'channel': None, | 160 'channel': None, |
161 'permissions': pretty_permissions, | 161 'permissions': pretty_permissions, |
162 'multi_platform': desc.get('MULTI_PLATFORM', False), | 162 'multi_platform': desc.get('MULTI_PLATFORM', False), |
163 'version': build_version.ChromeVersionNoTrunk() | 163 'version': build_version.ChromeVersionNoTrunk(), |
| 164 'min_chrome_version': desc.get('MIN_CHROME_VERSION') |
164 } | 165 } |
165 RunTemplateFileIfChanged(srcpath, dstpath, replace) | 166 RunTemplateFileIfChanged(srcpath, dstpath, replace) |
166 | 167 |
167 | 168 |
168 def FindAndCopyFiles(src_files, root, search_dirs, dst_dir): | 169 def FindAndCopyFiles(src_files, root, search_dirs, dst_dir): |
169 buildbot_common.MakeDir(dst_dir) | 170 buildbot_common.MakeDir(dst_dir) |
170 for src_name in src_files: | 171 for src_name in src_files: |
171 src_file = FindFile(src_name, root, search_dirs) | 172 src_file = FindFile(src_name, root, search_dirs) |
172 if not src_file: | 173 if not src_file: |
173 ErrorExit('Failed to find: ' + src_name) | 174 ErrorExit('Failed to find: ' + src_name) |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
289 rel_path = os.path.relpath(pepperdir, os.path.dirname(out_path)) | 290 rel_path = os.path.relpath(pepperdir, os.path.dirname(out_path)) |
290 template_dict = { | 291 template_dict = { |
291 'projects': targets, | 292 'projects': targets, |
292 'deps' : deps, | 293 'deps' : deps, |
293 'rel_sdk' : rel_path, | 294 'rel_sdk' : rel_path, |
294 } | 295 } |
295 RunTemplateFileIfChanged(in_path, out_path, template_dict) | 296 RunTemplateFileIfChanged(in_path, out_path, template_dict) |
296 outdir = os.path.dirname(os.path.abspath(out_path)) | 297 outdir = os.path.dirname(os.path.abspath(out_path)) |
297 if getos.GetPlatform() == 'win': | 298 if getos.GetPlatform() == 'win': |
298 AddMakeBat(pepperdir, outdir) | 299 AddMakeBat(pepperdir, outdir) |
OLD | NEW |