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

Side by Side Diff: samples/samples_gen.py

Issue 353017: Change build to only have one place to list... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/o3d/
Patch Set: Created 11 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 | Annotate | Revision Log
« no previous file with comments | « samples/o3djs/js_list.manifest ('k') | 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 # Copyright (c) 2009 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 import posixpath 6 import posixpath
7 import sys 7 import sys
8 import os.path
8 9
9 output_filename = 'samples_gen.gyp' 10 output_filename = 'samples_gen.gyp'
10 try: 11 try:
11 output_file = open(output_filename, "w+") 12 output_file = open(output_filename, "w+")
12 except IOError: 13 except IOError:
13 sys.stderr.write('Unable to write to generated gyp file %s\n', 14 sys.stderr.write('Unable to write to generated gyp file %s\n',
14 output_filename) 15 output_filename)
15 16
16 x_up = '1,0,0' 17 x_up = '1,0,0'
17 y_up = '0,1,0' 18 y_up = '0,1,0'
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 output_dir = posixpath.dirname(output) 137 output_dir = posixpath.dirname(output)
137 if output_dir in copies: 138 if output_dir in copies:
138 # Make sure we don't add any twice. 139 # Make sure we don't add any twice.
139 if not output in copies[output_dir]: 140 if not output in copies[output_dir]:
140 copies[output_dir] += [output] 141 copies[output_dir] += [output]
141 else: 142 else:
142 copies[output_dir] = [output] 143 copies[output_dir] = [output]
143 144
144 # Add in all the MANIFEST files to be copied, 145 # Add in all the MANIFEST files to be copied,
145 # Skipping the ones in the assets above (if any). 146 # Skipping the ones in the assets above (if any).
146 manifest = open("MANIFEST", "r") 147 items = eval(open("MANIFEST", "r").read())
147 for item in manifest.read().splitlines(): 148 if os.path.exists("../../o3d-internal/jscomp/JSCompiler_deploy.jar"):
149 # add in the o3djs files.
150 js_files = eval(open("o3djs/js_list.manifest", "r").read())
151 js_files = ["o3djs/" + f for f in js_files]
152 items = items + js_files
153 for item in items:
148 item_dir = posixpath.dirname(item) 154 item_dir = posixpath.dirname(item)
149 if item_dir in copies: 155 if item_dir in copies:
150 if not item in copies[item_dir]: 156 if not item in copies[item_dir]:
151 copies[item_dir] += [item] 157 copies[item_dir] += [item]
152 else: 158 else:
153 copies[item_dir] = [item] 159 copies[item_dir] = [item]
154 160
155 output_file.write(" 'copies': [\n") 161 output_file.write(" 'copies': [\n")
156 for (dir, paths) in copies.items(): 162 for (dir, paths) in copies.items():
157 output_file.write(" {\n") 163 output_file.write(" {\n")
(...skipping 12 matching lines...) Expand all
170 output_file.write(" ],\n") 176 output_file.write(" ],\n")
171 output_file.write(" },\n") 177 output_file.write(" },\n")
172 178
173 output_file.write(" ],\n") 179 output_file.write(" ],\n")
174 output_file.write(" },\n") 180 output_file.write(" },\n")
175 output_file.write(" ],\n") 181 output_file.write(" ],\n")
176 output_file.write("}\n") 182 output_file.write("}\n")
177 183
178 print output_filename 184 print output_filename
179 sys.exit(0) 185 sys.exit(0)
OLDNEW
« no previous file with comments | « samples/o3djs/js_list.manifest ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698