OLD | NEW |
1 # Copyright (c) 2012 Google Inc. All rights reserved. | 1 # Copyright (c) 2012 Google Inc. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """Xcode project file generator. | 5 """Xcode project file generator. |
6 | 6 |
7 This module is both an Xcode project file generator and a documentation of the | 7 This module is both an Xcode project file generator and a documentation of the |
8 Xcode project file format. Knowledge of the project file format was gained | 8 Xcode project file format. Knowledge of the project file format was gained |
9 based on extensive experience with Xcode, and by making changes to projects in | 9 based on extensive experience with Xcode, and by making changes to projects in |
10 Xcode.app and observing the resultant changes in the associated project files. | 10 Xcode.app and observing the resultant changes in the associated project files. |
(...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2233 'buildRules': [1, PBXBuildRule, 1, 1, []], | 2233 'buildRules': [1, PBXBuildRule, 1, 1, []], |
2234 'productReference': [0, PBXFileReference, 0, 1], | 2234 'productReference': [0, PBXFileReference, 0, 1], |
2235 'productType': [0, str, 0, 1], | 2235 'productType': [0, str, 0, 1], |
2236 }) | 2236 }) |
2237 | 2237 |
2238 # Mapping from Xcode product-types to settings. The settings are: | 2238 # Mapping from Xcode product-types to settings. The settings are: |
2239 # filetype : used for explicitFileType in the project file | 2239 # filetype : used for explicitFileType in the project file |
2240 # prefix : the prefix for the file name | 2240 # prefix : the prefix for the file name |
2241 # suffix : the suffix for the file name | 2241 # suffix : the suffix for the file name |
2242 _product_filetypes = { | 2242 _product_filetypes = { |
2243 'com.apple.product-type.application': ['wrapper.application', | 2243 'com.apple.product-type.application': ['wrapper.application', |
2244 '', '.app'], | 2244 '', '.app'], |
2245 'com.apple.product-type.app-extension': ['wrapper.app-extension', | 2245 'com.apple.product-type.application.watchapp': ['wrapper.application', |
2246 '', '.appex'], | 2246 '', '.app'], |
| 2247 'com.apple.product-type.watchkit-extension': ['wrapper.app-extension', |
| 2248 '', '.appex'], |
| 2249 'com.apple.product-type.app-extension': ['wrapper.app-extension', |
| 2250 '', '.appex'], |
2247 'com.apple.product-type.bundle': ['wrapper.cfbundle', | 2251 'com.apple.product-type.bundle': ['wrapper.cfbundle', |
2248 '', '.bundle'], | 2252 '', '.bundle'], |
2249 'com.apple.product-type.framework': ['wrapper.framework', | 2253 'com.apple.product-type.framework': ['wrapper.framework', |
2250 '', '.framework'], | 2254 '', '.framework'], |
2251 'com.apple.product-type.library.dynamic': ['compiled.mach-o.dylib', | 2255 'com.apple.product-type.library.dynamic': ['compiled.mach-o.dylib', |
2252 'lib', '.dylib'], | 2256 'lib', '.dylib'], |
2253 'com.apple.product-type.library.static': ['archive.ar', | 2257 'com.apple.product-type.library.static': ['archive.ar', |
2254 'lib', '.a'], | 2258 'lib', '.a'], |
2255 'com.apple.product-type.tool': ['compiled.mach-o.executable', | 2259 'com.apple.product-type.tool': ['compiled.mach-o.executable', |
2256 '', ''], | 2260 '', ''], |
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2883 self._XCPrint(file, 0, '/* Begin ' + class_name + ' section */\n') | 2887 self._XCPrint(file, 0, '/* Begin ' + class_name + ' section */\n') |
2884 for object in sorted(objects_by_class[class_name], | 2888 for object in sorted(objects_by_class[class_name], |
2885 cmp=lambda x, y: cmp(x.id, y.id)): | 2889 cmp=lambda x, y: cmp(x.id, y.id)): |
2886 object.Print(file) | 2890 object.Print(file) |
2887 self._XCPrint(file, 0, '/* End ' + class_name + ' section */\n') | 2891 self._XCPrint(file, 0, '/* End ' + class_name + ' section */\n') |
2888 | 2892 |
2889 if self._should_print_single_line: | 2893 if self._should_print_single_line: |
2890 self._XCPrint(file, 0, '}; ') | 2894 self._XCPrint(file, 0, '}; ') |
2891 else: | 2895 else: |
2892 self._XCPrint(file, 1, '};\n') | 2896 self._XCPrint(file, 1, '};\n') |
OLD | NEW |