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

Side by Side Diff: tools-webrtc/ios/build_ios_libs.py

Issue 2712263002: Copy public headers to the output dir after building static lib for iOS (Closed)
Patch Set: Created 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | 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
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. 3 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
4 # 4 #
5 # Use of this source code is governed by a BSD-style license 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 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 7 # tree. An additional intellectual property rights grant can be found
8 # in the file PATENTS. All contributing project authors may 8 # in the file PATENTS. All contributing project authors may
9 # be found in the AUTHORS file in the root of the source tree. 9 # be found in the AUTHORS file in the root of the source tree.
10 10
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 # Create FAT archive. 161 # Create FAT archive.
162 if args.build_type == 'static_only': 162 if args.build_type == 'static_only':
163 lib_paths = [os.path.join(args.output_dir, arch + '_libs', SDK_LIB_NAME) 163 lib_paths = [os.path.join(args.output_dir, arch + '_libs', SDK_LIB_NAME)
164 for arch in architectures] 164 for arch in architectures]
165 out_lib_path = os.path.join(args.output_dir, SDK_LIB_NAME) 165 out_lib_path = os.path.join(args.output_dir, SDK_LIB_NAME)
166 # Combine the slices. 166 # Combine the slices.
167 cmd = ['lipo'] + lib_paths + ['-create', '-output', out_lib_path] 167 cmd = ['lipo'] + lib_paths + ['-create', '-output', out_lib_path]
168 _RunCommand(cmd) 168 _RunCommand(cmd)
169 169
170 # Copy public headers into the output dir.
171 logging.info('Copying public headers.')
172 distutils.dir_util.copy_tree(
173 os.path.join(WEBRTC_SRC_DIR, 'webrtc', 'sdk', 'objc',
174 'Framework', 'Headers', 'WebRTC'),
175 os.path.join(args.output_dir, 'include'))
170 elif args.build_type == 'framework': 176 elif args.build_type == 'framework':
171 lib_paths = [os.path.join(args.output_dir, arch + '_libs') 177 lib_paths = [os.path.join(args.output_dir, arch + '_libs')
172 for arch in architectures] 178 for arch in architectures]
173 179
174 # Combine the slices. 180 # Combine the slices.
175 dylib_path = os.path.join(SDK_FRAMEWORK_NAME, 'WebRTC') 181 dylib_path = os.path.join(SDK_FRAMEWORK_NAME, 'WebRTC')
176 # Dylibs will be combined, all other files are the same across archs. 182 # Dylibs will be combined, all other files are the same across archs.
177 # Use distutils instead of shutil to support merging folders. 183 # Use distutils instead of shutil to support merging folders.
178 distutils.dir_util.copy_tree( 184 distutils.dir_util.copy_tree(
179 os.path.join(lib_paths[0], SDK_FRAMEWORK_NAME), 185 os.path.join(lib_paths[0], SDK_FRAMEWORK_NAME),
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 'Set :CFBundleVersion ' + version_number, infoplist_path] 225 'Set :CFBundleVersion ' + version_number, infoplist_path]
220 _RunCommand(cmd) 226 _RunCommand(cmd)
221 _RunCommand(['plutil', '-convert', 'binary1', infoplist_path]) 227 _RunCommand(['plutil', '-convert', 'binary1', infoplist_path])
222 228
223 logging.info('Done.') 229 logging.info('Done.')
224 return 0 230 return 0
225 231
226 232
227 if __name__ == '__main__': 233 if __name__ == '__main__':
228 sys.exit(main()) 234 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698