Chromium Code Reviews| Index: ios/build/tools/convert_gn_xcodeproj.py |
| diff --git a/ios/build/tools/convert_gn_xcodeproj.py b/ios/build/tools/convert_gn_xcodeproj.py |
| index c7b8c12d37c2c9c97695fcc5bcf8516ef6a1f392..ab86b2b4aeee6b63905176f0667ba4e68afba5ec 100755 |
| --- a/ios/build/tools/convert_gn_xcodeproj.py |
| +++ b/ios/build/tools/convert_gn_xcodeproj.py |
| @@ -168,20 +168,24 @@ def ConvertGnXcodeProject(input_dir, output_dir, configurations): |
| UpdateProductsProject(product_input, product_output, configurations) |
| # Copy sources project and all workspace. |
|
sdefresne
2017/01/17 10:08:40
nit: Please update comment (as this no longer copy
liaoyuke
2017/01/17 18:35:19
Done.
|
| - sources = os.path.join('sources.xcodeproj', 'project.pbxproj') |
| - CopyFileIfChanged(os.path.join(input_dir, sources), |
| - os.path.join(output_dir, sources)) |
| xcwspace = os.path.join('all.xcworkspace', 'contents.xcworkspacedata') |
| CopyFileIfChanged(os.path.join(input_dir, xcwspace), |
| os.path.join(output_dir, xcwspace)) |
| - |
| + # TODO(crbug.com/679110): gn has been modified to remove 'sources.xcodeproj' |
| + # and keep 'all.xcworkspace' and 'products.xcodeproj'. The following code is |
| + # here to support both old and new projects setup and will be removed once gn |
| + # has rolled past it. |
| + if 'sources.xcodeproj' in os.listdir(input_dir): |
|
sdefresne
2017/01/17 10:08:40
nit: I would just test whether the file "sources"
liaoyuke
2017/01/17 18:35:19
Done.
|
| + sources = os.path.join('sources.xcodeproj', 'project.pbxproj') |
| + CopyFileIfChanged(os.path.join(input_dir, sources), |
| + os.path.join(output_dir, sources)) |
| def Main(args): |
| parser = argparse.ArgumentParser( |
| description='Convert GN Xcode projects for iOS.') |
| parser.add_argument( |
| 'input', |
| - help='directory containing [product|sources|all] Xcode projects.') |
| + help='directory containing [product|all] Xcode projects.') |
| parser.add_argument( |
| 'output', |
| help='directory where to generate the iOS configuration.') |
| @@ -194,7 +198,7 @@ def Main(args): |
| sys.stderr.write('Input directory does not exists.\n') |
| return 1 |
| - required = set(['products.xcodeproj', 'sources.xcodeproj', 'all.xcworkspace']) |
| + required = set(['products.xcodeproj', 'all.xcworkspace']) |
| if not required.issubset(os.listdir(args.input)): |
| sys.stderr.write( |
| 'Input directory does not contain all necessary Xcode projects.\n') |