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

Unified Diff: pylib/gyp/generator/xcode.py

Issue 42394: Cleanup remove mac specific type 'application'... (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: '' Created 11 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pylib/gyp/generator/scons.py ('k') | pylib/gyp/input.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pylib/gyp/generator/xcode.py
===================================================================
--- pylib/gyp/generator/xcode.py (revision 374)
+++ pylib/gyp/generator/xcode.py (working copy)
@@ -475,12 +475,14 @@
xccl.AppendProperty('buildConfigurations', xcbc)
xccl.SetProperty('defaultConfigurationName', configuration_names[0])
- # Create an XCTarget subclass object for the target.
+ # Create an XCTarget subclass object for the target. We use the type
+ # with "+bundle" append if the target has "mac_bundle" set.
Mark Mentovai 2009/03/19 18:22:50 appended
_types = {
- 'application': 'com.apple.product-type.application',
- 'executable': 'com.apple.product-type.tool',
- 'shared_library': 'com.apple.product-type.library.dynamic',
- 'static_library': 'com.apple.product-type.library.static',
+ 'executable': 'com.apple.product-type.tool',
+ 'shared_library': 'com.apple.product-type.library.dynamic',
+ 'static_library': 'com.apple.product-type.library.static',
+ 'executable+bundle': 'com.apple.product-type.application',
+ # TODO: add 'shared_library+bundle' -> Framework
}
target_properties = {
@@ -490,8 +492,11 @@
type = spec['type']
if type != 'none':
+ type_bundle_key = type
+ if spec.get('mac_bundle', 0):
+ type_bundle_key += '+bundle'
xctarget_type = gyp.xcodeproj_file.PBXNativeTarget
- target_properties['productType'] = _types[type]
+ target_properties['productType'] = _types[type_bundle_key]
else:
xctarget_type = gyp.xcodeproj_file.PBXAggregateTarget
@@ -815,10 +820,8 @@
else:
pbxp.AddOrGetFileInRootGroup(source)
- # TODO(mark): Hard-coded to "application" now, but this should match any
- # bundled type.
- if spec['type'] == 'application':
- # Add "mac_bundle_resources".
+ # Add "mac_bundle_resources" if it's a bundle of any type.
+ if spec.get('mac_bundle', 0):
for resource in spec.get('mac_bundle_resources', []):
AddResourceToTarget(resource, pbxp, xct)
« no previous file with comments | « pylib/gyp/generator/scons.py ('k') | pylib/gyp/input.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698