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 1047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 | 1058 |
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 = os.path.splitext(output)[0] + '.nib' |
| 1069 # Compiled storyboard files are referred to by .storyboardc. |
| 1070 if output.endswith('.storyboard'): |
| 1071 output = os.path.splitext(output)[0] + '.storyboardc' |
1069 | 1072 |
1070 yield output, res | 1073 yield output, res |
1071 | 1074 |
1072 | 1075 |
1073 def GetMacInfoPlist(product_dir, xcode_settings, gyp_path_to_build_path): | 1076 def GetMacInfoPlist(product_dir, xcode_settings, gyp_path_to_build_path): |
1074 """Returns (info_plist, dest_plist, defines, extra_env), where: | 1077 """Returns (info_plist, dest_plist, defines, extra_env), where: |
1075 * |info_plist| is the source plist path, relative to the | 1078 * |info_plist| is the source plist path, relative to the |
1076 build directory, | 1079 build directory, |
1077 * |dest_plist| is the destination plist path, relative to the | 1080 * |dest_plist| is the destination plist path, relative to the |
1078 build directory, | 1081 build directory, |
(...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 new_config_dict['xcode_settings']['SDKROOT'] = 'iphoneos' | 1303 new_config_dict['xcode_settings']['SDKROOT'] = 'iphoneos' |
1301 target_dict['configurations'][new_config_name] = new_config_dict | 1304 target_dict['configurations'][new_config_name] = new_config_dict |
1302 return targets | 1305 return targets |
1303 | 1306 |
1304 def CloneConfigurationForDeviceAndEmulator(target_dicts): | 1307 def CloneConfigurationForDeviceAndEmulator(target_dicts): |
1305 """If |target_dicts| contains any iOS targets, automatically create -iphoneos | 1308 """If |target_dicts| contains any iOS targets, automatically create -iphoneos |
1306 targets for iOS device builds.""" | 1309 targets for iOS device builds.""" |
1307 if _HasIOSTarget(target_dicts): | 1310 if _HasIOSTarget(target_dicts): |
1308 return _AddIOSDeviceConfigurations(target_dicts) | 1311 return _AddIOSDeviceConfigurations(target_dicts) |
1309 return target_dicts | 1312 return target_dicts |
OLD | NEW |