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

Unified Diff: webrtc/build/ios/flatten_ios_headers

Issue 1829783003: Build dynamic framework with podspec for Objective-C API. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Import Foundation instead of UIKit Created 4 years, 9 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/export_headers ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/build/ios/flatten_ios_headers
diff --git a/webrtc/build/ios/flatten_ios_headers b/webrtc/build/ios/flatten_ios_headers
new file mode 100755
index 0000000000000000000000000000000000000000..67c06acc91ac731d0257dc88546145e862aef097
--- /dev/null
+++ b/webrtc/build/ios/flatten_ios_headers
@@ -0,0 +1,46 @@
+#!/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 optparse
+import os
+import shutil
+import sys
+
+def FlattenHeaders(lib_base_dir, framework_base_dir):
+ """Flattens iOS header file directory structure."""
+ include_dir = 'include'
+ unflattened_include_dir_path = os.path.join(lib_base_dir, include_dir)
+ flattened_include_dir_path = os.path.join(framework_base_dir, include_dir)
+
+ # Create output directories.
+ if not os.path.exists(framework_base_dir):
+ os.mkdir(framework_base_dir)
+ if not os.path.exists(flattened_include_dir_path):
+ os.mkdir(flattened_include_dir_path)
+
+ for dirpath, _, filenames in os.walk(unflattened_include_dir_path):
+ for filename in filenames:
+ current_path = os.path.join(dirpath, filename)
+ new_path = os.path.join(flattened_include_dir_path, filename)
+ shutil.copy(current_path, new_path)
+
+def Main():
+ parser = optparse.OptionParser()
+ _, args = parser.parse_args()
+ if len(args) != 2:
+ parser.error('Error: Exactly 2 arguments required.')
+ lib_base_dir = args[0]
+ framework_base_dir = args[1]
+ FlattenHeaders(lib_base_dir, framework_base_dir)
+
+if __name__ == '__main__':
+ sys.exit(Main())
« no previous file with comments | « webrtc/build/ios/export_headers ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698