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

Unified Diff: ios/build/tools/convert_gn_xcodeproj.py

Issue 2623203004: Consolidate Xcode Project Setup (Closed)
Patch Set: Rebase Created 3 years, 11 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 | « no previous file | tools/gn/xcode_object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..0e1af638cd7cca4d2d3da80336c295bbf0618770 100755
--- a/ios/build/tools/convert_gn_xcodeproj.py
+++ b/ios/build/tools/convert_gn_xcodeproj.py
@@ -167,21 +167,25 @@ def ConvertGnXcodeProject(input_dir, output_dir, configurations):
product_output = os.path.join(output_dir, products)
UpdateProductsProject(product_input, product_output, configurations)
- # Copy sources project and all workspace.
- sources = os.path.join('sources.xcodeproj', 'project.pbxproj')
- CopyFileIfChanged(os.path.join(input_dir, sources),
- os.path.join(output_dir, sources))
+ # Copy all workspace.
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.
+ sources = os.path.join('sources.xcodeproj', 'project.pbxproj')
+ if os.path.isfile(os.path.join(input_dir, sources)):
+ 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')
« no previous file with comments | « no previous file | tools/gn/xcode_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698