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

Side by Side Diff: tools/build_command_buffer.py

Issue 2207563002: Fix build_command_buffer for Windows (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 4 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 except subprocess.CalledProcessError as error: 128 except subprocess.CalledProcessError as error:
129 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode, 129 sys.exit('Error (ret code: %s) calling "%s" in %s' % (error.returncode,
130 error.cmd, chrome_src_dir)) 130 error.cmd, chrome_src_dir))
131 131
132 try: 132 try:
133 subprocess.check_call([gclient, 'runhooks'], cwd=chrome_src_dir) 133 subprocess.check_call([gclient, 'runhooks'], cwd=chrome_src_dir)
134 except subprocess.CalledProcessError as error: 134 except subprocess.CalledProcessError as error:
135 sys.exit('Error (ret code: %s) calling "%s" in %s' % ( 135 sys.exit('Error (ret code: %s) calling "%s" in %s' % (
136 error.returncode, error.cmd, chrome_src_dir)) 136 error.returncode, error.cmd, chrome_src_dir))
137 137
138 gn = 'gn'
138 platform = 'linux64' 139 platform = 'linux64'
139 if sys.platform == 'darwin': 140 if sys.platform == 'darwin':
140 platform = 'mac' 141 platform = 'mac'
141 elif sys.platform == 'win32': 142 elif sys.platform == 'win32':
142 platform = 'win' 143 platform = 'win'
143 gn = os.path.join(chrome_src_dir, 'buildtools', platform, 'gn') 144 gn = 'gn.exe'
145 gn = os.path.join(chrome_src_dir, 'buildtools', platform, gn)
144 try: 146 try:
145 subprocess.check_call([gn, 'gen', chrome_target_dir_rel], 147 subprocess.check_call([gn, 'gen', chrome_target_dir_rel],
146 cwd=chrome_src_dir) 148 cwd=chrome_src_dir)
147 except subprocess.CalledProcessError as error: 149 except subprocess.CalledProcessError as error:
148 sys.exit('Error (ret code: %s) calling "%s" in %s' % ( 150 sys.exit('Error (ret code: %s) calling "%s" in %s' % (
149 error.returncode, error.cmd, chrome_src_dir)) 151 error.returncode, error.cmd, chrome_src_dir))
150 152
151 try: 153 try:
152 subprocess.check_call(['ninja'] + shlex.split(args.extra_ninja_args) + 154 subprocess.check_call(['ninja'] + shlex.split(args.extra_ninja_args) +
153 ['-C', chrome_target_dir_rel, 'command_buffer_gles2'], 155 ['-C', chrome_target_dir_rel, 'command_buffer_gles2'],
(...skipping 19 matching lines...) Expand all
173 175
174 if not os.path.isfile(shared_lib_dst): 176 if not os.path.isfile(shared_lib_dst):
175 sys.exit('Command buffer library not copied to ' + shared_lib_dst) 177 sys.exit('Command buffer library not copied to ' + shared_lib_dst)
176 178
177 print('Command buffer library copied to ' + shared_lib_dst) 179 print('Command buffer library copied to ' + shared_lib_dst)
178 180
179 181
180 if __name__ == '__main__': 182 if __name__ == '__main__':
181 main() 183 main()
182 184
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