OLD | NEW |
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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 'WebRTC') | 197 'WebRTC') |
198 lib_dsym_paths = [os.path.join(path, dsym_path) for path in lib_paths] | 198 lib_dsym_paths = [os.path.join(path, dsym_path) for path in lib_paths] |
199 out_dsym_path = os.path.join(args.output_dir, dsym_path) | 199 out_dsym_path = os.path.join(args.output_dir, dsym_path) |
200 try: | 200 try: |
201 os.remove(out_dsym_path) | 201 os.remove(out_dsym_path) |
202 except OSError: | 202 except OSError: |
203 pass | 203 pass |
204 cmd = ['lipo'] + lib_dsym_paths + ['-create', '-output', out_dsym_path] | 204 cmd = ['lipo'] + lib_dsym_paths + ['-create', '-output', out_dsym_path] |
205 _RunCommand(cmd) | 205 _RunCommand(cmd) |
206 | 206 |
| 207 # Generate the license file. |
| 208 license_script_path = os.path.join(SCRIPT_DIR, 'generate_licenses.py') |
| 209 ninja_dirs = [os.path.join(args.output_dir, arch + '_libs') |
| 210 for arch in architectures] |
| 211 gn_target_full_name = '//webrtc/sdk:rtc_sdk_framework_objc' |
| 212 cmd = [sys.executable, license_script_path, gn_target_full_name, |
| 213 os.path.join(args.output_dir, SDK_FRAMEWORK_NAME)] + ninja_dirs |
| 214 _RunCommand(cmd) |
| 215 |
207 # Modify the version number. | 216 # Modify the version number. |
208 # Format should be <Branch cut MXX>.<Hotfix #>.<Rev #>. | 217 # Format should be <Branch cut MXX>.<Hotfix #>.<Rev #>. |
209 # e.g. 55.0.14986 means branch cut 55, no hotfixes, and revision 14986. | 218 # e.g. 55.0.14986 means branch cut 55, no hotfixes, and revision 14986. |
210 infoplist_path = os.path.join(args.output_dir, SDK_FRAMEWORK_NAME, | 219 infoplist_path = os.path.join(args.output_dir, SDK_FRAMEWORK_NAME, |
211 'Info.plist') | 220 'Info.plist') |
212 cmd = ['PlistBuddy', '-c', | 221 cmd = ['PlistBuddy', '-c', |
213 'Print :CFBundleShortVersionString', infoplist_path] | 222 'Print :CFBundleShortVersionString', infoplist_path] |
214 major_minor = subprocess.check_output(cmd).strip() | 223 major_minor = subprocess.check_output(cmd).strip() |
215 version_number = '%s.%s' % (major_minor, args.revision) | 224 version_number = '%s.%s' % (major_minor, args.revision) |
216 logging.info('Substituting revision number: %s', version_number) | 225 logging.info('Substituting revision number: %s', version_number) |
217 cmd = ['PlistBuddy', '-c', | 226 cmd = ['PlistBuddy', '-c', |
218 'Set :CFBundleVersion ' + version_number, infoplist_path] | 227 'Set :CFBundleVersion ' + version_number, infoplist_path] |
219 _RunCommand(cmd) | 228 _RunCommand(cmd) |
220 _RunCommand(['plutil', '-convert', 'binary1', infoplist_path]) | 229 _RunCommand(['plutil', '-convert', 'binary1', infoplist_path]) |
221 | 230 |
222 logging.info('Done.') | 231 logging.info('Done.') |
223 return 0 | 232 return 0 |
224 | 233 |
225 | 234 |
226 if __name__ == '__main__': | 235 if __name__ == '__main__': |
227 sys.exit(main()) | 236 sys.exit(main()) |
OLD | NEW |