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

Unified Diff: webrtc/build/ios/flatten_ios_headers.py

Issue 1875003004: Fix WebRTC API framework build. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 4 years, 8 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 | « webrtc/build/ios/flatten_ios_headers ('k') | webrtc/build/ios/merge_ios_libs » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/build/ios/flatten_ios_headers.py
diff --git a/webrtc/build/ios/flatten_ios_headers.py b/webrtc/build/ios/flatten_ios_headers.py
new file mode 100755
index 0000000000000000000000000000000000000000..ae58fc80ba328fc7c5deb0887ee73decb1296713
--- /dev/null
+++ b/webrtc/build/ios/flatten_ios_headers.py
@@ -0,0 +1,49 @@
+#!/usr/bin/python
+
+# Copyright 2016 The WebRTC project authors. All Rights Reserved.
+#
+# Use of this source code is governed by a BSD-style license
+# that can be found in the LICENSE file in the root of the source
+# tree. An additional intellectual property rights grant can be found
+# in the file PATENTS. All contributing project authors may
+# be found in the AUTHORS file in the root of the source tree.
+
+"""Script for flattening iOS header structure."""
+
+import sys
+
+import argparse
+import os
+import shutil
+
+
+def FlattenHeaders(input_dir, output_dir):
+ """Flattens iOS header file directory structure."""
+ # Create output directories.
+ if not os.path.exists(output_dir):
+ os.mkdir(output_dir)
+
+ for dirpath, _, filenames in os.walk(input_dir):
+ for filename in filenames:
+ current_path = os.path.join(dirpath, filename)
+ new_path = os.path.join(output_dir, filename)
+ shutil.copy(current_path, new_path)
+
+
+def Main():
+ parser_description = 'Flatten WebRTC ObjC API headers.'
+ parser = argparse.ArgumentParser(description=parser_description)
+ parser.add_argument('input_dir',
+ help='Output directory to write headers to.',
+ type=str)
+ parser.add_argument('output_dir',
+ help='Input directory to read headers from.',
+ type=str)
+ args = parser.parse_args()
+ input_dir = args.input_dir
+ output_dir = args.output_dir
+ FlattenHeaders(input_dir, output_dir)
+
+
+if __name__ == '__main__':
+ sys.exit(Main())
« no previous file with comments | « webrtc/build/ios/flatten_ios_headers ('k') | webrtc/build/ios/merge_ios_libs » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698