OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2008 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2008 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 Commandline modification of Xcode project files | 6 Commandline modification of Xcode project files |
7 """ | 7 """ |
8 | 8 |
9 import sys | 9 import sys |
10 import os | 10 import os |
(...skipping 494 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
505 # Best guess | 505 # Best guess |
506 if len(non_root_groups): | 506 if len(non_root_groups): |
507 return non_root_groups[0] | 507 return non_root_groups[0] |
508 elif len(groups_with_source): | 508 elif len(groups_with_source): |
509 return groups_with_source[0] | 509 return groups_with_source[0] |
510 else: | 510 else: |
511 return possible_groups[0] | 511 return possible_groups[0] |
512 | 512 |
513 def AddSourceFile(self, path): | 513 def AddSourceFile(self, path): |
514 """Add a source file to the project, attempting to position it | 514 """Add a source file to the project, attempting to position it |
515 in the GUI group heirarchy reasonably. | 515 in the GUI group hierarchy reasonably. |
516 | 516 |
517 NOTE: Adding a source file does not add it to any targets | 517 NOTE: Adding a source file does not add it to any targets |
518 | 518 |
519 Args: | 519 Args: |
520 path: Absolute path to the file to add | 520 path: Absolute path to the file to add |
521 | 521 |
522 Returns: | 522 Returns: |
523 PBXFileReference instance for the newly added source. | 523 PBXFileReference instance for the newly added source. |
524 """ | 524 """ |
525 # Guess at file type | 525 # Guess at file type |
(...skipping 739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1265 elif args[0] == 'parse_sanity': | 1265 elif args[0] == 'parse_sanity': |
1266 if ''.join(project.FileContent()) != ''.join(project._raw_content): | 1266 if ''.join(project.FileContent()) != ''.join(project._raw_content): |
1267 option_parser.error('Project rewrite sanity fail "%s"' % project.path) | 1267 option_parser.error('Project rewrite sanity fail "%s"' % project.path) |
1268 | 1268 |
1269 else: | 1269 else: |
1270 Usage(option_parser) | 1270 Usage(option_parser) |
1271 | 1271 |
1272 | 1272 |
1273 if __name__ == '__main__': | 1273 if __name__ == '__main__': |
1274 Main() | 1274 Main() |
OLD | NEW |