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

Side by Side Diff: bin/sync-and-gyp

Issue 1715423003: Fix gyp-and-sync for windows (Closed) Base URL: https://skia.googlesource.com/skia.git@gyp
Patch Set: Created 4 years, 10 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/env python 1 #!/usr/bin/env python
2 2
3 # Copyright 2015 Google Inc. 3 # Copyright 2015 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 # This script will update Skia's dependencies as necessary and run 8 # This script will update Skia's dependencies as necessary and run
9 # gyp if needed. 9 # gyp if needed.
10 10
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 "url" : "https://skia.googlesource.com/skia.git", 67 "url" : "https://skia.googlesource.com/skia.git",
68 "deps_file" : "DEPS", 68 "deps_file" : "DEPS",
69 "managed" : False, 69 "managed" : False,
70 "custom_deps" : { 70 "custom_deps" : {
71 }, 71 },
72 "safesync_url": "", 72 "safesync_url": "",
73 }, 73 },
74 ] 74 ]
75 cache_dir = None 75 cache_dir = None
76 ''' 76 '''
77
78 # Must use gclient.bat rather than gclient on windows (at least on mingw)
79 gclient = 'gclient'
80 if sys.platform == 'win32' or sys.platform == 'cygwin':
81 gclient = 'gclient.bat'
82
77 if current_deps_hash != deps_hash: 83 if current_deps_hash != deps_hash:
78 # `gclient sync` is very slow, so skip whenever we can. 84 # `gclient sync` is very slow, so skip whenever we can.
79 try: 85 try:
80 subprocess.call(['gclient', '--version']) 86 subprocess.call([gclient, '--version'])
81 except: 87 except:
82 sys.stdout.write('gclient missing from $PATH, please install ' + 88 sys.stdout.write('gclient missing from $PATH, please install ' +
83 'depot_tools\n https://skia.org/user/quick/desktop\n') 89 'depot_tools\n https://skia.org/user/quick/desktop\n')
84 exit(1) 90 exit(1)
85 if not os.path.isfile('.gclient'): 91 if not os.path.isfile('.gclient'):
86 with open('.gclient', 'w') as o: 92 with open('.gclient', 'w') as o:
87 o.write(default_gclient_config) 93 o.write(default_gclient_config)
88 gclient_sync_command = ['gclient', 'sync'] + skia_opt_deps 94 gclient_sync_command = [gclient, 'sync'] + skia_opt_deps
89 try: 95 try:
90 sys.stdout.write('%r\n' % gclient_sync_command) 96 sys.stdout.write('%r\n' % gclient_sync_command)
91 subprocess.check_call(gclient_sync_command) 97 subprocess.check_call(gclient_sync_command)
92 except: 98 except:
93 sys.stderr.write('\n`gclient sync` failed.\n') 99 sys.stderr.write('\n`gclient sync` failed.\n')
94 try: 100 try:
95 os.remove('.deps_sha1') # Unknown state. 101 os.remove('.deps_sha1') # Unknown state.
96 except: 102 except:
97 pass 103 pass
98 exit(1) 104 exit(1)
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 return f.read() 140 return f.read()
135 return '' 141 return ''
136 142
137 if cat_if_exists(hash_path).strip() != gyp_hash: 143 if cat_if_exists(hash_path).strip() != gyp_hash:
138 env = os.environ.copy() 144 env = os.environ.copy()
139 if skia_out: 145 if skia_out:
140 env['SKIA_OUT'] = skia_out 146 env['SKIA_OUT'] = skia_out
141 subprocess.call(['python', './gyp_skia'], env=env) 147 subprocess.call(['python', './gyp_skia'], env=env)
142 with open(hash_path, 'w') as o: 148 with open(hash_path, 'w') as o:
143 o.write(gyp_hash) 149 o.write(gyp_hash)
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