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

Side by Side Diff: native_client_sdk/src/build_tools/generate_make.py

Issue 690403002: [NaCl SDK] Add filesystem passing example. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes Created 6 years, 1 month 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
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/parse_dsc.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 nmf, ' '.join(tools), ' '.join(configs), path), 140 nmf, ' '.join(tools), ' '.join(configs), path),
141 } 141 }
142 RunTemplateFileIfChanged(srcpath, dstpath, replace) 142 RunTemplateFileIfChanged(srcpath, dstpath, replace)
143 143
144 144
145 def GenerateManifest(srcroot, dstroot, desc): 145 def GenerateManifest(srcroot, dstroot, desc):
146 outdir = os.path.join(dstroot, desc['DEST'], desc['NAME']) 146 outdir = os.path.join(dstroot, desc['DEST'], desc['NAME'])
147 srcpath = os.path.join(SDK_RESOURCE_DIR, 'manifest.json.template') 147 srcpath = os.path.join(SDK_RESOURCE_DIR, 'manifest.json.template')
148 dstpath = os.path.join(outdir, 'manifest.json') 148 dstpath = os.path.join(outdir, 'manifest.json')
149 permissions = desc.get('PERMISSIONS', []) 149 permissions = desc.get('PERMISSIONS', [])
150 combined_permissions = list(permissions)
150 socket_permissions = desc.get('SOCKET_PERMISSIONS', []) 151 socket_permissions = desc.get('SOCKET_PERMISSIONS', [])
151 combined_permissions = list(permissions)
152 if socket_permissions: 152 if socket_permissions:
153 combined_permissions.append({'socket': socket_permissions}) 153 combined_permissions.append({'socket': socket_permissions})
154 filesystem_permissions = desc.get('FILESYSTEM_PERMISSIONS', [])
155 if filesystem_permissions:
156 combined_permissions.append({'fileSystem': filesystem_permissions})
154 pretty_permissions = json.dumps(combined_permissions, 157 pretty_permissions = json.dumps(combined_permissions,
155 sort_keys=True, indent=4) 158 sort_keys=True, indent=4)
156 replace = { 159 replace = {
157 'name': desc['TITLE'], 160 'name': desc['TITLE'],
158 'description': '%s Example' % desc['TITLE'], 161 'description': '%s Example' % desc['TITLE'],
159 'key': True, 162 'key': True,
160 'channel': None, 163 'channel': None,
161 'permissions': pretty_permissions, 164 'permissions': pretty_permissions,
162 'multi_platform': desc.get('MULTI_PLATFORM', False), 165 'multi_platform': desc.get('MULTI_PLATFORM', False),
163 'version': build_version.ChromeVersionNoTrunk(), 166 'version': build_version.ChromeVersionNoTrunk(),
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 rel_path = os.path.relpath(pepperdir, os.path.dirname(out_path)) 276 rel_path = os.path.relpath(pepperdir, os.path.dirname(out_path))
274 template_dict = { 277 template_dict = {
275 'projects': targets, 278 'projects': targets,
276 'deps' : deps, 279 'deps' : deps,
277 'rel_sdk' : rel_path, 280 'rel_sdk' : rel_path,
278 } 281 }
279 RunTemplateFileIfChanged(in_path, out_path, template_dict) 282 RunTemplateFileIfChanged(in_path, out_path, template_dict)
280 outdir = os.path.dirname(os.path.abspath(out_path)) 283 outdir = os.path.dirname(os.path.abspath(out_path))
281 if getos.GetPlatform() == 'win': 284 if getos.GetPlatform() == 'win':
282 AddMakeBat(pepperdir, outdir) 285 AddMakeBat(pepperdir, outdir)
OLDNEW
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/parse_dsc.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698