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

Side by Side 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, 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 unified diff | Download patch
« no previous file with comments | « webrtc/build/ios/export_headers ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/usr/bin/python
2
3 # Copyright 2016 The WebRTC project authors. All Rights Reserved.
4 #
5 # Use of this source code is governed by a BSD-style license
6 # that can be found in the LICENSE file in the root of the source
7 # tree. An additional intellectual property rights grant can be found
8 # in the file PATENTS. All contributing project authors may
9 # be found in the AUTHORS file in the root of the source tree.
10
11 """Script for flattening iOS header structure."""
12
13 import optparse
14 import os
15 import shutil
16 import sys
17
18 def FlattenHeaders(lib_base_dir, framework_base_dir):
19 """Flattens iOS header file directory structure."""
20 include_dir = 'include'
21 unflattened_include_dir_path = os.path.join(lib_base_dir, include_dir)
22 flattened_include_dir_path = os.path.join(framework_base_dir, include_dir)
23
24 # Create output directories.
25 if not os.path.exists(framework_base_dir):
26 os.mkdir(framework_base_dir)
27 if not os.path.exists(flattened_include_dir_path):
28 os.mkdir(flattened_include_dir_path)
29
30 for dirpath, _, filenames in os.walk(unflattened_include_dir_path):
31 for filename in filenames:
32 current_path = os.path.join(dirpath, filename)
33 new_path = os.path.join(flattened_include_dir_path, filename)
34 shutil.copy(current_path, new_path)
35
36 def Main():
37 parser = optparse.OptionParser()
38 _, args = parser.parse_args()
39 if len(args) != 2:
40 parser.error('Error: Exactly 2 arguments required.')
41 lib_base_dir = args[0]
42 framework_base_dir = args[1]
43 FlattenHeaders(lib_base_dir, framework_base_dir)
44
45 if __name__ == '__main__':
46 sys.exit(Main())
OLDNEW
« 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