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

Side by Side Diff: pylib/gyp/xcodeproj_file.py

Issue 762673002: Add support for iOS WatchKit apps in GYP (Closed) Base URL: http://gyp.googlecode.com/svn/trunk
Patch Set: Fix syntax error and remove unneeded files Created 6 years 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
OLDNEW
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
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', '', '.app'],
justincohen 2014/11/26 20:12:04 this seems harder to read.
2244 '', '.app'], 2244 'com.apple.product-type.app-extension': ['wrapper.app-extension', '',
2245 'com.apple.product-type.app-extension': ['wrapper.app-extension', 2245 '.appex'],
2246 '', '.appex'], 2246 'com.apple.product-type.watchkit-extension': ['wrapper.app-extension', '',
2247 'com.apple.product-type.bundle': ['wrapper.cfbundle', 2247 '.appex'],
2248 '', '.bundle'], 2248 'com.apple.product-type.application.watchapp': ['wrapper.application', '',
2249 'com.apple.product-type.framework': ['wrapper.framework', 2249 '.app'],
2250 '', '.framework'], 2250 'com.apple.product-type.bundle': ['wrapper.cfbundle', '', '.bundle'],
2251 'com.apple.product-type.library.dynamic': ['compiled.mach-o.dylib', 2251 'com.apple.product-type.framework': ['wrapper.framework', '', '.framework'],
2252 'lib', '.dylib'], 2252 'com.apple.product-type.library.dynamic': ['compiled.mach-o.dylib', 'lib',
2253 'com.apple.product-type.library.static': ['archive.ar', 2253 '.dylib'],
2254 'lib', '.a'], 2254 'com.apple.product-type.library.static': ['archive.ar', 'lib', '.a'],
2255 'com.apple.product-type.tool': ['compiled.mach-o.executable', 2255 'com.apple.product-type.tool': ['compiled.mach-o.executable', '', ''],
2256 '', ''], 2256 'com.apple.product-type.bundle.unit-test': ['wrapper.cfbundle', '',
2257 'com.apple.product-type.bundle.unit-test': ['wrapper.cfbundle', 2257 '.xctest'],
2258 '', '.xctest'], 2258 'com.googlecode.gyp.xcode.bundle': ['compiled.mach-o.dylib', '', '.so'],
2259 'com.googlecode.gyp.xcode.bundle': ['compiled.mach-o.dylib',
2260 '', '.so'],
2261 } 2259 }
2262 2260
2263 def __init__(self, properties=None, id=None, parent=None, 2261 def __init__(self, properties=None, id=None, parent=None,
2264 force_outdir=None, force_prefix=None, force_extension=None): 2262 force_outdir=None, force_prefix=None, force_extension=None):
2265 # super 2263 # super
2266 XCTarget.__init__(self, properties, id, parent) 2264 XCTarget.__init__(self, properties, id, parent)
2267 2265
2268 if 'productName' in self._properties and \ 2266 if 'productName' in self._properties and \
2269 'productType' in self._properties and \ 2267 'productType' in self._properties and \
2270 not 'productReference' in self._properties and \ 2268 not 'productReference' in self._properties and \
(...skipping 612 matching lines...) Expand 10 before | Expand all | Expand 10 after
2883 self._XCPrint(file, 0, '/* Begin ' + class_name + ' section */\n') 2881 self._XCPrint(file, 0, '/* Begin ' + class_name + ' section */\n')
2884 for object in sorted(objects_by_class[class_name], 2882 for object in sorted(objects_by_class[class_name],
2885 cmp=lambda x, y: cmp(x.id, y.id)): 2883 cmp=lambda x, y: cmp(x.id, y.id)):
2886 object.Print(file) 2884 object.Print(file)
2887 self._XCPrint(file, 0, '/* End ' + class_name + ' section */\n') 2885 self._XCPrint(file, 0, '/* End ' + class_name + ' section */\n')
2888 2886
2889 if self._should_print_single_line: 2887 if self._should_print_single_line:
2890 self._XCPrint(file, 0, '}; ') 2888 self._XCPrint(file, 0, '}; ')
2891 else: 2889 else:
2892 self._XCPrint(file, 1, '};\n') 2890 self._XCPrint(file, 1, '};\n')
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698