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 """ | 5 """ |
6 This module contains classes that help to emulate xcodebuild behavior on top of | 6 This module contains classes that help to emulate xcodebuild behavior on top of |
7 other build systems, such as make and ninja. | 7 other build systems, such as make and ninja. |
8 """ | 8 """ |
9 | 9 |
10 import copy | 10 import copy |
(...skipping 1048 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1059 # Now split the path into (prefix,maybe.lproj). | 1059 # Now split the path into (prefix,maybe.lproj). |
1060 lproj_parts = os.path.split(res_parts[0]) | 1060 lproj_parts = os.path.split(res_parts[0]) |
1061 # If the resource lives in a .lproj bundle, add that to the destination. | 1061 # If the resource lives in a .lproj bundle, add that to the destination. |
1062 if lproj_parts[1].endswith('.lproj'): | 1062 if lproj_parts[1].endswith('.lproj'): |
1063 output = os.path.join(output, lproj_parts[1]) | 1063 output = os.path.join(output, lproj_parts[1]) |
1064 | 1064 |
1065 output = os.path.join(output, res_parts[1]) | 1065 output = os.path.join(output, res_parts[1]) |
1066 # Compiled XIB files are referred to by .nib. | 1066 # Compiled XIB files are referred to by .nib. |
1067 if output.endswith('.xib'): | 1067 if output.endswith('.xib'): |
1068 output = output[0:-3] + 'nib' | 1068 output = output[0:-3] + 'nib' |
1069 | 1069 # Compiled XIB files are referred to by .nib. |
1070 if output.endswith('.storyboard'): | |
1071 output = output[0:-10] + 'storyboardc' | |
pkl (ping after 24h if needed)
2013/10/30 16:47:14
os.path.basename(output) + '.storyboardc'
justincohen
2013/10/30 16:53:59
Won't that append .storyboardc to .storyboard? I
pkl (ping after 24h if needed)
2013/10/30 16:57:23
Isn't there some built-in os.path function that st
| |
1070 yield output, res | 1072 yield output, res |
1071 | 1073 |
1072 | 1074 |
1073 def GetMacInfoPlist(product_dir, xcode_settings, gyp_path_to_build_path): | 1075 def GetMacInfoPlist(product_dir, xcode_settings, gyp_path_to_build_path): |
1074 """Returns (info_plist, dest_plist, defines, extra_env), where: | 1076 """Returns (info_plist, dest_plist, defines, extra_env), where: |
1075 * |info_plist| is the source plist path, relative to the | 1077 * |info_plist| is the source plist path, relative to the |
1076 build directory, | 1078 build directory, |
1077 * |dest_plist| is the destination plist path, relative to the | 1079 * |dest_plist| is the destination plist path, relative to the |
1078 build directory, | 1080 build directory, |
1079 * |defines| is a list of preprocessor defines (empty if the plist | 1081 * |defines| is a list of preprocessor defines (empty if the plist |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1300 new_config_dict['xcode_settings']['SDKROOT'] = 'iphoneos' | 1302 new_config_dict['xcode_settings']['SDKROOT'] = 'iphoneos' |
1301 target_dict['configurations'][new_config_name] = new_config_dict | 1303 target_dict['configurations'][new_config_name] = new_config_dict |
1302 return targets | 1304 return targets |
1303 | 1305 |
1304 def CloneConfigurationForDeviceAndEmulator(target_dicts): | 1306 def CloneConfigurationForDeviceAndEmulator(target_dicts): |
1305 """If |target_dicts| contains any iOS targets, automatically create -iphoneos | 1307 """If |target_dicts| contains any iOS targets, automatically create -iphoneos |
1306 targets for iOS device builds.""" | 1308 targets for iOS device builds.""" |
1307 if _HasIOSTarget(target_dicts): | 1309 if _HasIOSTarget(target_dicts): |
1308 return _AddIOSDeviceConfigurations(target_dicts) | 1310 return _AddIOSDeviceConfigurations(target_dicts) |
1309 return target_dicts | 1311 return target_dicts |
OLD | NEW |