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

Side by Side Diff: tools/build_command_buffer.py

Issue 2165013003: Update build_command_buffer.py to copy libcommand_buffer_gles2.so from the correct dir on linux (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: Created 4 years, 5 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 2
3 # Copyright 2016 Google Inc. 3 # Copyright 2016 Google Inc.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license that can be 5 # Use of this source code is governed by a BSD-style license that can be
6 # found in the LICENSE file. 6 # found in the LICENSE file.
7 7
8 8
9 """ 9 """
10 Script to build the command buffer shared library and copy it to Skia tree 10 Script to build the command buffer shared library and copy it to Skia tree
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 error.cmd, chrome_src_dir)) 130 error.cmd, chrome_src_dir))
131 131
132 try: 132 try:
133 subprocess.check_call(['ninja'] + shlex.split(args.extra_ninja_args) + 133 subprocess.check_call(['ninja'] + shlex.split(args.extra_ninja_args) +
134 ['-C', chrome_target_dir_rel, 'command_buffer_gles2'], 134 ['-C', chrome_target_dir_rel, 'command_buffer_gles2'],
135 cwd=chrome_src_dir) 135 cwd=chrome_src_dir)
136 except subprocess.CalledProcessError as error: 136 except subprocess.CalledProcessError as error:
137 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode, 137 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode,
138 error.cmd, chrome_src_dir)) 138 error.cmd, chrome_src_dir))
139 139
140 shared_lib_src_dir = os.path.join(chrome_src_dir, chrome_target_dir_rel, 140 shared_lib_src_dir = os.path.join(chrome_src_dir, chrome_target_dir_rel)
141 shared_lib_subdir)
142 shared_lib_dst_dir = os.path.join(args.output_dir, shared_lib_subdir) 141 shared_lib_dst_dir = os.path.join(args.output_dir, shared_lib_subdir)
143 # Make the subdir for the dst if does not exist 142 # Make the subdir for the dst if does not exist
144 if shared_lib_subdir and not os.path.isdir(shared_lib_dst_dir): 143 if shared_lib_subdir and not os.path.isdir(shared_lib_dst_dir):
145 os.mkdir(shared_lib_dst_dir) 144 os.mkdir(shared_lib_dst_dir)
146 145
147 shared_lib_src = os.path.join(shared_lib_src_dir, shared_lib_name) 146 shared_lib_src = os.path.join(shared_lib_src_dir, shared_lib_name)
148 shared_lib_dst = os.path.join(shared_lib_dst_dir, shared_lib_name) 147 shared_lib_dst = os.path.join(shared_lib_dst_dir, shared_lib_name)
149 148
150 if not os.path.isfile(shared_lib_src): 149 if not os.path.isfile(shared_lib_src):
151 sys.exit('Command buffer shared library not at expected location: ' + 150 sys.exit('Command buffer shared library not at expected location: ' +
152 shared_lib_src) 151 shared_lib_src)
153 152
154 shutil.copy2(shared_lib_src, shared_lib_dst) 153 shutil.copy2(shared_lib_src, shared_lib_dst)
155 154
156 if not os.path.isfile(shared_lib_dst): 155 if not os.path.isfile(shared_lib_dst):
157 sys.exit('Command buffer library not copied to ' + shared_lib_dst) 156 sys.exit('Command buffer library not copied to ' + shared_lib_dst)
158 157
159 print('Command buffer library copied to ' + shared_lib_dst) 158 print('Command buffer library copied to ' + shared_lib_dst)
160 159
161 160
162 if __name__ == '__main__': 161 if __name__ == '__main__':
163 main() 162 main()
164 163
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698