OLD | NEW |
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 import os.path |
9 | 9 |
10 output_filename = 'samples_gen.gyp' | 10 output_filename = 'samples_gen.gyp' |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 if output_dir in copies: | 138 if output_dir in copies: |
139 # Make sure we don't add any twice. | 139 # Make sure we don't add any twice. |
140 if not output in copies[output_dir]: | 140 if not output in copies[output_dir]: |
141 copies[output_dir] += [output] | 141 copies[output_dir] += [output] |
142 else: | 142 else: |
143 copies[output_dir] = [output] | 143 copies[output_dir] = [output] |
144 | 144 |
145 # Add in all the MANIFEST files to be copied, | 145 # Add in all the MANIFEST files to be copied, |
146 # Skipping the ones in the assets above (if any). | 146 # Skipping the ones in the assets above (if any). |
147 items = eval(open("MANIFEST", "r").read()) | 147 items = eval(open("MANIFEST", "r").read()) |
148 if os.path.exists("../../o3d-internal/jscomp/JSCompiler_deploy.jar"): | 148 if not os.path.exists("../../o3d-internal/jscomp/JSCompiler_deploy.jar"): |
149 # add in the o3djs files. | 149 # add in the o3djs files. |
150 js_files = eval(open("o3djs/js_list.manifest", "r").read()) | 150 js_files = eval(open("o3djs/js_list.manifest", "r").read()) |
151 js_files = ["o3djs/" + f for f in js_files] | 151 js_files = ["o3djs/" + f for f in js_files] |
152 items = items + js_files | 152 items = items + js_files |
153 for item in items: | 153 for item in items: |
154 item_dir = posixpath.dirname(item) | 154 item_dir = posixpath.dirname(item) |
155 if item_dir in copies: | 155 if item_dir in copies: |
156 if not item in copies[item_dir]: | 156 if not item in copies[item_dir]: |
157 copies[item_dir] += [item] | 157 copies[item_dir] += [item] |
158 else: | 158 else: |
(...skipping 17 matching lines...) Expand all Loading... |
176 output_file.write(" ],\n") | 176 output_file.write(" ],\n") |
177 output_file.write(" },\n") | 177 output_file.write(" },\n") |
178 | 178 |
179 output_file.write(" ],\n") | 179 output_file.write(" ],\n") |
180 output_file.write(" },\n") | 180 output_file.write(" },\n") |
181 output_file.write(" ],\n") | 181 output_file.write(" ],\n") |
182 output_file.write("}\n") | 182 output_file.write("}\n") |
183 | 183 |
184 print output_filename | 184 print output_filename |
185 sys.exit(0) | 185 sys.exit(0) |
OLD | NEW |